Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MarinadeStakePool

Hierarchy

  • MarinadeStakePool

Implements

Index

Constructors

Properties

label: StakePoolLabel = "Marinade"
mSolMintAuthority: PublicKey
outputToken: PublicKey
program: MarinadeFinanceProgram
stakeDepositAuthority: PublicKey
stakeWithdrawAuthority: PublicKey
state: null | MarinadeStateResponse
stateAddr: PublicKey
validatorRecords: null | ValidatorRecord[]
validatorRecordsAddr: PublicKey
DEPOSIT_WAIT_EPOCHS: number = 2

Methods

  • Marinade stake pool only accepts:

    • activated stake accounts (can cancel deactivation in setup)
    • cannot have excess lamport balance (can withdraw excess in setup)
    • no lockup
    • staked to validators in the validator list
    • delegation.stake >= stake_system.min_stake
    • currentEpoch >= activation_epoch + DEPOSIT_WAIT_EPOCHS
    • below its staking cap
    • staker not already set to marinade's stake authority
    • withdrawer not already set to marinade's withdraw authority

    Parameters

    Returns boolean

  • createCleanupInstruction(): TransactionInstruction[]
  • Commmon setup instructions:

    • un-deactivate stake account

    Common setup instructions that are not covered:

    • split stake. Why?
      • This involves generation and returning of a Keypair and Signer. Simpler to just handle this outside of this interface
    • creating outputToken ATA if user does not have it yet. Why?
      • This involves a RPC call to check if the user's ATA exists.

    Parameters

    Returns TransactionInstruction[]

  • Create the instructions for swapping the given stake account to outputToken assuming setup is done Only accepts entire stake accounts.

    Parameters

    Returns TransactionInstruction[]

  • findDuplicationFlag(__namedParameters: ValidatorRecord): PublicKey
  • Parameters

    • __namedParameters: ValidatorRecord

    Returns PublicKey

  • getAccountsForUpdate(): PublicKey[]
  • totalCoolingDown(): BN
  • totalLamportsUnderControl(): BN
  • totalVirtualStakedLamports(): BN
  • update(accountInfoMap: AccountInfoMap): void
  • Parameters

    • accountInfoMap: AccountInfoMap

    Returns void

Generated using TypeDoc