#defi #solana #ponzu

solana_timelock

Delayed transaction execution on Solana

1 unstable release

0.1.0 Aug 9, 2023

#31 in #defi

LGPL-3.0

8KB
162 lines

Solana Timelock

License LGPLv3

A simple program for delayed transaction execution on Solana. Unaudited; use at your own risk.

Why use a timelock?

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.

How to use

Example usage is demonstrated in tests/solana_timelock.ts.

Deployment address

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.


lib.rs:

A simple program that allows users, DAOs, and multisigs to delay transaction execution. May be useful in enhancing an application's decentralization and/or security.

Dependencies

~19–28MB
~453K SLoC