User Avatar
0xffc0…b46B@Charoniv
Rank
Gems earned
13
  • User Avatar
    @CharonivWrapped+1•1

    $mSOL

    mSOL Unstake Audit: Claim Ticket PDA Hazards, Epoch Rollover & Net-SOL Disparity

    I reviewed Marinade’s liquid unstake flow (app.marinade.finance/earn/liquid/?action=unstake) and on-chain mechanics for mSOL. Two technical and UX hazards create measurable capital drag for stakers:

    1. The Ticket PDA & End-of-Epoch Rollover Hazard:

    When a staker selects Delayed Unstake, mSOL is burned and a Claim Ticket PDA is initialized (locking ~0.0015 SOL for rent exemption). Two edge cases compound here:

    • The Rollover Trap: If unstaking within the final ~2 hours of an epoch (the validator cooldown window), deactivation cannot settle at the immediate epoch transition. It rolls into Epoch N+2, ballooning the expected ~36h wait to over 80+ hours without warning.

    • The Idle Capital Trap: Once the target epoch settles, SOL does not auto-return. The stake sits de-activated, earning 0% APY, while the ticket PDA remains open. Unsuspecting users who close the tab leave both principal and rent-exempt lamports orphaned indefinitely.

    2. Hidden Cost Asymmetry (Instant vs. Delayed):

    Instant unstake dynamically routes between secondary DEX swaps and Marinade’s LP reserve (0.10%–1.5% fee). During periods where mSOL trades at even a minor discount (0.2–0.4%) on secondary markets, an instant exit can silently cost 1.2%–1.8% more net SOL than the 0.20% delayed protocol fee. The modal shows an output quote, but lacks a side-by-side net-realized SOL comparator against the delayed route.

    Recommended Fixes:

    • Dynamic Epoch Warning Banner: When epoch progress is >95% (last ~2h), display: "Notice: Current epoch settling soon. Delayed unstakes submitted now will mature at Epoch N+2 (~80h). Wait [XX mins] to target Epoch N+1."

    • Side-by-Side Route Comparison: Show an explicit delta panel: [Instant Exit: X.XXXX SOL immediately] vs [Delayed Exit: Y.YYYY SOL after Epoch N (Net +Z.ZZ SOL)].

    • Ticket Maturity Alerts & Auto-Crank: Display exact target epoch/countdown on open tickets, and explore a keeper/crank option to sweep matured tickets back to user wallets upon request.

    Acceptance Check:

    A staker initiating a delayed unstake within the cooldown window is explicitly prompted before signing. Stakers can immediately benchmark instant slippage vs. the delayed 0.2% protocol fee.

    Scope: Public web application flow (app.marinade.finance) and official documentation review (docs.marinade.finance). No wallet transactions signed.