DEV Community

Peter
Peter

Posted on

Technical Walkthrough: Staking on Solana with Marinade Native & mSOL

For Solana developers and stakers, optimizing for yield while supporting decentralization is key. Marinade Finance Solana provides two distinct pathways to achieve this: traditional liquid staking and the innovative Marinade Native Staking. This guide offers a technical breakdown of both.

Method 1: mSOL Liquid Staking
This is the classic liquid staking model. It's designed for users who want to remain liquid and use their staked assets in DeFi.

The Process: You deposit SOL into the Marinade stake pool. In return, you receive mSOL (Marinade SOL).

The Token: mSOL is a liquid token that accrues staking rewards. Its value increases relative to SOL as rewards are earned by the ~200 high-performing validators Marinade delegates to.

The Code:

JavaScript
// Pseudocode for staking via Marinade SDK
import { Marinade, MarinadeConfig } from '@marinade.finance/marinade-ts-sdk'

const config = new MarinadeConfig({ connection: solanaConnection })
const marinade = new Marinade(config)

const { transaction, associatedMSolTokenAccountAddress } = await marinade.deposit(new BN(10 * LAMPORTS_PER_SOL))
// --> Sign and send transaction
This mSOL Liquid Staking process is a core component of the Marinade Finance Guide.

Method 2: Marinade Native Staking
This is a newer, more direct model for those who don't need a liquid token. It's staking-as-a-service, without the smart contract risk of a stake pool.

The Process: You still use the Marinade interface, but you select "Native." Marinade's delegation strategy is used to create a traditional stake account for you, delegated to one of the validators in the set.

The Benefit: You get 100% of the staking rewards, including MEV. You are not exposed to the smart contract risk of the liquid staking pool and pay 0% commission to Marinade. This is a crucial point in understanding Marinade Security Explained.

Control: You retain full control over your stake account and can undelegate directly on-chain at any time.

This answers the question of How to Stake with Marinade for purists who want direct chain delegation with an optimized strategy.

For a complete architectural overview and SDK documentation, refer to the Full Official Documentation.

Top comments (0)