@marinade.finance/incentives-distribution-sdk
v1.0.15
Published
SDK of the incentives distribution contract
Downloads
107
Maintainers
Readme
SDK of incentives distribution program
A contract to distribute incentives for using MNDE token.
The basic workflow is:
an admin creates a
treasury
account that configures admin holds statistics and defines token store, a vault for tokens to be distributedthe treasury stands for a root configuration account that's aligned to one token type
the admin creates a
claimRecord
account for an wallet addressthe admin funds the
treasury
vault (token store account)the admin appoints a part of the funded tokens from
treasury
vault to theclaimRecord
the owner of the wallet (the claim authority) proceed
claim
operation onclaimRecord
to withdraw the appointed token amountAll amounts works in
lamports
of the tokenThe on-chain
claimRecord
works withtotalAmount
andnonClaimedAmount
. To calculate claimed amount for a claim record one gets it as a subtractiontotalAmount - nonClaimedAmount
Marinade MNDE Treasuries
Marinade Incentives Distribution Program address indiXdKbsC4QSLQQnn6ngZvkqfywn6KgEeQbkGSpk1V
.
The treasuries configured are available via src/sdk.ts
.
- MSOL and native SOL stakers treasury at
inTrQECqatDmvAt7ahYeWg82efX5PsxhiFXzQk9eKYG
(STAKERS_TREASURY
) - Referrers treasury at
iNTrR8cP5Vw86X17sDNwuGxKyqR57sYZ8HvpRY7r1FF
(REFERRERS_TREASURY
) - Season 2 treasury at
iNtR2h6yAUDXawbiVBHVUBZ5qN3qsFCezZJABgfWT8h
(SEASON2_TREASURY
)
Claiming
Claiming of the tokens means to deposit tokens to SPL Governance Voter State Registry (VSR) plugin. The wallet owner then can unlock the tokens via SPL Gov UI or use them for voting when they are locked.
To claim the amount from the incentives distribution program one should
use claimOwnerAndDepositInstructions
.
That generates set of instructions that checks the VSR plugin accounts
and may add instructions that creates the Voter account and configure deposit entries.
The last call is claimAndDeposit
that do the transfer from incentives program
to VSR program.