Skip to main content
Stake2Earn transactions that touch fees must pass fresh DAMM v1 pool, lock escrow, Dynamic Vault, LP mint, and token vault accounts. The TypeScript SDK builds these account bundles automatically.

Instruction Index

All public user/admin instructions in the source use Anchor Event CPI, so generated clients include event_authority and program accounts.

initialize_vault

Creates the root vault and list accounts for a DAMM v1 pool. Emits VaultCreated.

initialize_stake_escrow

Creates a user stake escrow for one vault. The handler increments total_stake_escrow_count, initializes an empty stake escrow, and appends a full-balance entry when capacity remains. Emits StakeEscrowCreated.

Fee Claim Account Bundle

These accounts are required by stake, claim_fee, request_unstake, cancel_unstake, and claim_fee_crank because each flow first claims and distributes fees from the DAMM v1 lock escrow.

stake

Transfers stake tokens from the user into the vault and syncs list state.

claim_fee

Claims fees from a stake escrow.

request_unstake

Creates a pending unstake request.

cancel_unstake

Closes an open Unstake account and returns the amount to active stake.

withdraw

Transfers stake tokens from the vault back to the owner after the release time.

claim_fee_crank

Permissionlessly claims fees from the DAMM v1 lock escrow and updates drip accounting without a user claim.

Admin Updates

Admin public keys are hardcoded in the program source for public builds.

Gotchas