Skip to content

Commit 2452563

Browse files
committed
basic docs functionally of vesting contract + relationship with staking
1 parent 87ea104 commit 2452563

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

solana/merkle-distributor/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,20 @@ The Merkle distributor is also significantly easier to manage from an operations
2424
## License
2525

2626
The Merkle distributor program and SDK is distributed under the GPL v3.0 license.
27+
28+
## Functionality
29+
Main logic based on gito distribution source code but modified tio support extra logic.
30+
https://github.com/jito-foundation/distributor
31+
32+
- Admin executes new_distributor instruction to set all settings for vesting contract.
33+
34+
- User call claim_locked instruction to create PDA that will hold they unlocked/locked amount
35+
36+
- User claims all unlocked tokens from start of this vesting program and only able to get rest if stake tokens in staking contract. For example (at the begining user claimed 10 Mantis tokens. to get the rest he need to stake 10 Mantis for X period of time to be capable to claim the rest. If user stake only 3 tokens for X duration he would be able to claim only 30% of tokens after X duration time.)
37+
38+
- When user call stake/unstake on staking(not vesting) contract side it executes CPI update_stake request. So vesting contract recieves updates about stake/unstake actions and update PDAs of correspoding staker to store and use during claim_locked instruction to calculate what % of locked tokens should be unlocked already and then transfer to claimant account.
39+
40+
- Admin is able to set a new admin account, clawback all tokens that left after clawback_time expired, set_clawback_receiver to update the clawback_receiver address.
41+
42+
- Vesting Distributor ATA containing the tokens to distribute. Any of vesting PDA's does not receive or hold tokens related to staking feature(contract).
43+

0 commit comments

Comments
 (0)