What you can do
| stake | Deposit SOL to get mSOL | call deposit(lamports) on program MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD with SOL attached; mSOL is minted to the signer |
| unstake-instant | Swap mSOL for SOL now | call liquid_unstake(msol_amount); the liquidity pool pays SOL and takes a fee |
| unstake-delayed | Unstake without the pool's liquidity | call order_unstake(msol_amount), wait until the ticket is ready, then call claim() |
| hold-msol | Hold and transfer mSOL | SPL Token transfer or transferChecked of mint mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So between token accounts |
| check-state | Read pool state and mSOL supply | read account 8szGkuLTAux9XMgZ2vtY39jVSowEcpBfFfD8hXSEqdGC and getTokenSupply on the mSOL mint |
Instant unstake (liquid_unstake) pays a fee and can only pay out as much SOL as the liquidity pool holds.
Delayed unstake takes at least one epoch while the stake is deactivated, so the SOL is not immediate.
The program is upgradeable and governed by Marinade. Its behavior can change through upgrades.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).Marinade liquid staking programstaking on solanaMarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD
write deposit(lamports: u64)
Stake SOL and receive mSOL. Argument: lamports to deposit. The SOL is sent with the call and mSOL is minted to the signer's token account. No approval step.
write deposit_stake_account(validator_index: u32)
Deposit an existing stake account into the pool and receive mSOL for its value. Argument: index of the validator in the pool's validator list.
write liquid_unstake(msol_amount: u64)
Swap mSOL back to SOL right away using the liquidity pool. Argument: mSOL amount in base units. A protocol fee applies, and the amount you can get depends on the pool's SOL balance.
write order_unstake(msol_amount: u64)
Start a delayed unstake. Argument: mSOL amount. Burns the mSOL and creates a ticket that is paid out later with claim.
write claim()
Claim SOL from a delayed unstake ticket once it is ready. No arguments.
write add_liquidity(lamports: u64)
Deposit SOL into the mSOL/SOL liquidity pool and receive LP tokens. Argument: lamports.
write remove_liquidity(tokens: u64)
Burn LP tokens to receive SOL and mSOL from the liquidity pool. Argument: LP token amount in base units.
write withdraw_stake_account(stake_index: u32, validator_index: u32, msol_amount: u64, beneficiary: Pubkey)
Redeem mSOL for a stake account split from the pool, paid to the beneficiary. Arguments: stake index, validator index, mSOL amount, beneficiary address.
Marinade main state accountother on solana8szGkuLTAux9XMgZ2vtY39jVSowEcpBfFfD8hXSEqdGC
mSOL token minttoken on solanamSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So
write transfer(amount: u64)
Standard SPL Token transfer of mSOL between two token accounts (Tokenkeg program).
write transferChecked(amount: u64, decimals: u8)
SPL Token transfer that checks the decimals against the mint. Read the decimals from the mint account first.
write approve(amount: u64)
Delegate an amount of mSOL to a spender token account.
write burn(amount: u64)
Burn mSOL from a token account owned by the signer.
read getTokenSupply(mint)
Total mSOL supply and decimals from the mint account.