Marinade Native

For the product documentation, head over to this page.

Technical overview

Marinade Native leverages Solana's stake account structure. As explained in Solana's documentation, stake accounts have two different authorities that can belong to separate addresses: the stake authority and the withdraw authority.

The stake authority is used to sign transactions for the following operations:

  • Delegating stake

  • Deactivating the stake delegation

  • Splitting the stake account, creating a new stake account with a portion of the funds in the first account

  • Merging two stake accounts into one

  • Setting a new stake authority

The withdraw authority signs transactions for the following:

  • Withdrawing un-delegated stake into a wallet address

  • Setting a new withdraw authority

  • Setting a new stake authority

Marinade Native was designed to receive the stake authority of the user's stake account without touching the withdraw authority that stays assigned to the user's wallet.

The stake authority that Marinade will use is a PDA of a Solana program. The contract will allow a Marinade bot to call delegation instructions on behalf of this PDA. This way, Marinade’s multisig (4/7) can revoke the bot's access and create a new one if needed.

How does the unstake work?

Staking on Solana is subject to a cooldown period. When a stake account is delegated, the stake account has to be deactivated first. Then, at the beginning of the next epoch (epochs take slightly over two days), the user holding the withdraw authority can withdraw funds from the stake account.

Users of this product always maintain ultimate power over the stake accounts and can revoke the stake authority previously granted to Marinade using most wallets.

However, Marinade splits the stake between over 100 validators to spread the risk and support well-performing validators. Therefore, It would be inconvenient for our users to revoke the stake authority, deactivate and withdraw each of the stake accounts one by one.

Marinade has thought of this, and users can use the dApp to help them with the withdrawal - Marinade will prepare the stake accounts for withdraw on your behalf.

  • Users ask for the amount of SOL they want to withdraw.

  • We deactivate stake accounts amounting to how much users want to withdraw.

  • We merge deactivated stake accounts at the beginning of the next epoch, so there is a single deactivated stake account

  • Users can withdraw funds in a single transaction

To avoid some draining attacks (as Marinade pays for deactivation, and timely merging of all the stake accounts), a small fixed fee of 0.001 SOL is applied for this service.

This can be integrated easily through the SDK.

Does Marinade Native support locked-up stake accounts?

Yes.

When users give Marinade stake authority over stake accounts with different lockup periods and users then want to withdraw some part of the stake, Marinade prioritizes the unlocked stake accounts and then stake accounts with the shortest lockup periods.

Marinade Native on-chain addresses

Marinade Native uses two on-chain addresses:

stWirqFCf2Uts1JBL1Jsd3r6VBWhgnpdPxCTe1MFjrq

This authority is used to manage the stake of all Marinade Native users.

ex9CfkBZZd6Nv9XdnoDmmB45ymbu4arXVk7g5pWnt3N

This authority is used to prepare and merge the stake accounts of Native users that required an unstake.

Those two authorities are PDAs derived from a proxy contract, so no private key exists for them, and they are controlled and can be changed by Marinade's Council.

Marinade Native SDK and API

Marinade Native SDK

Marinade Native API

Last updated