A Solana Anchor program for interacting with Marinade Finance, enabling users to:
- Deposit SOL and receive mSOL
- Liquid unstake mSOL for SOL
- Order delayed unstake tickets
- Claim SOL from completed tickets
- Deposit SOL: Stake SOL via Marinade and receive mSOL
- Liquid Unstake: Instantly swap mSOL for SOL
- Order Unstake: Start a delayed unstake (ticket-based)
- Claim: Claim SOL from a completed unstake ticket
- Anchor (v0.31.1 or later)
- Solana CLI
- Node.js & Yarn
yarn installanchor buildanchor testBelow are example transactions for each main function, executed on Solana devnet:
- Function:
deposit_sol - View Transaction on Solana Explorer
- Function:
liquid_unstake - View Transaction on Solana Explorer
- Function:
order_unstake - View Transaction on Solana Explorer
- Function:
claim - View Transaction on Solana Explorer
drox_project/
├── programs/
│ └── drox_project/
│ ├── src/
│ │ ├── instructions/
│ │ │ ├── claim.rs # Claim SOL from completed ticket
│ │ │ ├── deposit_sol.rs # Deposit SOL and receive mSOL
│ │ │ ├── liquid_unstake.rs # Liquid unstake mSOL for SOL
│ │ │ ├── order_unstake.rs # Order delayed unstake ticket
│ │ │ └── mod.rs # Instruction module declarations
│ │ ├── constants.rs # Important public keys and addresses
│ │ ├── error.rs # Custom error codes
│ │ └── lib.rs # Program entrypoint and handlers
│ ├── Cargo.toml # Rust crate manifest
│ └── Xargo.toml # Xargo config (if needed)
├── tests/
│ ├── drox_project.ts # TypeScript integration tests
│ └── constant.ts # Test constants (public keys, etc.)
├── migrations/
│ └── deploy.ts # Anchor deployment script
├── Anchor.toml # Anchor project config
├── Cargo.toml # Workspace manifest
├── package.json # Node.js dependencies
├── tsconfig.json # TypeScript config
├── yarn.lock # Yarn lockfile
└── README.md # Project documentation
- programs/drox_project/src/instructions/: All instruction handlers for the Anchor program
- programs/drox_project/src/constants.rs: Important public keys and addresses
- programs/drox_project/src/error.rs: Custom error codes for the program
- programs/drox_project/src/lib.rs: Main program entrypoint and instruction routing
- tests/: TypeScript integration tests and test constants
- migrations/: Anchor deployment scripts
- Anchor.toml, Cargo.toml, package.json, etc.: Project configuration files
MIT