Skip to content

📸 Voting Escrow Snapshots: Historical snapshots of previous voting escrow balances.

License

Notifications You must be signed in to change notification settings

saber-hq/snapshots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snapshots

Crates.io Docs.rs License Build Status Contributors NPM

Voting Escrow Snapshots: Historical snapshots of previous voting escrow balances.

Motivation

There are several instances in which one may want to use an instantaneous snapshot of all vote escrow balances, for example:

  • Fee distribution. One may want to send protocol revenue to veToken holders.
  • Airdrops. One may want to send tokens to holders of a veToken.

Mechanism

veToken balances are recorded for every period. A period is recorded for every 3 days.

There are two accounts that are used to compute historical balances:

  • [LockerHistory], which stores the total number of veTokens for each period, and
  • [EscrowHistory], which stores the veTokens in each Escrow per period.

Any time someone refreshes and/or modifies their vote escrow, they should refresh their [EscrowHistory] accounts.

Program Addresses

License

The [snapshots] program is licensed under the Affero General Public License version 3.

About

📸 Voting Escrow Snapshots: Historical snapshots of previous voting escrow balances.

Resources

License

Stars

Watchers

Forks

Packages

No packages published