#solana #defi #ponzu

solana_timelock

Delayed transaction execution on Solana

1 unstable release

0.1.0 Aug 9, 2023

#23 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 at TiMEYuk7rCBAFYMvhN3hae9PRc1NUYL71Zu3MCaCBVe. You may verify that the deployed program matches the source by using the anchor verify 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

~18–27MB
~445K SLoC