A simple program for delayed transaction execution on Solana. Unaudited; use at your own risk.
Basically, a timelock can provide extra security and/or decentralization. Benefits include:
- if a deployer key is compromised, users can move their funds out of the protocol before the attacker can upgrade the program
- users can verify that new changes to the program or to protocol parameters (e.g., fees) are acceptable
- projects can claim some level of decentralization even when a central team (i.e., x Labs) has the ability to update the program and/or protocol parameters
Timelocks were introduced by Compound Finance in 2020, and have been well-adopted by the Ethereum DeFi ecosystem.
Example usage is demonstrated in tests/solana_timelock.ts.
The program is currently live on
devnet and mainnet at tiME1hz9F5C5ZecbvE5z6Msjy8PKfTqo1UuRYXfndKF
.
You may verify that the deployed program matches the source by using the
solana-verify verify-from-repo -um --program-id tiME1hz9F5C5ZecbvE5z6Msjy8PKfTqo1UuRYXfndKF https://github.com/metaDAOproject/solana-timelock
command.