Expand description

SAVE Token: A Simple Agreement for Vote-Escrowed Tokens

About

The Simple Agreement for Vote-Escrowed Tokens, SAVE, is a derivative which enforces that tokens must be locked for a specific period of time.

As they are not directly convertible to the underlying token, SAVEs are a powerful primitive for issuing grants for DAO participants that do not restrict transferability of tokens.

We’re in active development. For the latest updates, please join our community:

Architecture

SAVE tokens consist of three tokens:

  • The underlying token, which is the token intended to be staked into the DAO.
  • The Yi token, which backs the SAVE token. This token is usually backed 1:1 by the underlying token; however, one can increase the conversion rate of the SAVE tokens by increasing the Yi’s conversion rate.
  • The SAVE token, which is the primary token issued by this protocol.

Note

  • SAVE is in active development, so all APIs are subject to change.
  • This code is unaudited. Use at your own risk.

Addresses

Program addresses are the same on devnet, testnet, and mainnet-beta.

Contribution

Thank you for your interest in contributing to Tribeca Protocol! All contributions are welcome no matter how big or small. This includes (but is not limited to) filing issues, adding documentation, fixing bugs, creating examples, and implementing features.

When contributing, please make sure your code adheres to some basic coding guidlines:

  • Code must be formatted with the configured formatters (e.g. rustfmt and prettier).
  • Comment lines should be no longer than 80 characters and written with proper grammar and punctuation.
  • Commit messages should be prefixed with the package(s) they modify. Changes affecting multiple packages should list all packages. In rare cases, changes may omit the package name prefix.

License

Tribeca Protocol is licensed under the GNU Affero General Public License v3.0.

Modules

An Anchor generated module, providing a set of structs mirroring the structs deriving Accounts, where each field is a Pubkey. This is useful for specifying accounts for a client.

An Anchor generated module containing the program’s set of instructions, where each method handler in the #[program] mod is associated with a struct defining the input arguments to the method. These should be used directly, when one wants to serialize Anchor instruction data, for example, when speciying instructions on a client.

Module representing the program.

The save_token program.

Macros

Generates the signer seeds for a crate::Save.

Structs

A class of tokens that must be ve-locked for a minimum duration.

Enums

Errors.

Statics

The static program ID

Functions

Confirms that a given pubkey is equivalent to the program ID

The Anchor codegen exposes a programming model where a user defines a set of methods inside of a #[program] module in a way similar to writing RPC request handlers. The macro then generates a bunch of code wrapping these user defined methods into something that can be executed on Solana.

Returns the program ID