1.0.15 • Published 1 month ago

@marinade.finance/incentives-distribution-sdk v1.0.15

Weekly downloads
-
License
ISC
Repository
github
Last release
1 month ago

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 distributed
  • the treasury stands for a root configuration account that's aligned to one token type
  • the admin creates a claimRecord account for an wallet address
  • the admin funds the treasury vault (token store account)
  • the admin appoints a part of the funded tokens from treasury vault to the claimRecord
  • the owner of the wallet (the claim authority) proceed claim operation on claimRecord to withdraw the appointed token amount

  • All amounts works in lamports of the token

  • The on-chain claimRecord works with totalAmount and nonClaimedAmount. To calculate claimed amount for a claim record one gets it as a subtraction totalAmount - 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.

1.0.11

2 months ago

1.0.15

1 month ago

1.0.14

1 month ago

1.0.13

1 month ago

1.0.12

2 months ago

1.0.9

4 months ago

1.0.10

4 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

9 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago