MagmaV2 is a liquid staking protocol built specifically for the Monad blockchain. It implements ERC-4626 with asynchronous withdrawal capabilities.
- ERC-4626 Compliance: Standard vault interface with extended async withdrawal support
- UUPS Upgradeable: Future-proof upgrade mechanism with admin controls
- Dual Vault System: CoreVault for equal distribution, gVault for targeted delegation
| Contract | Description | Mainnet Address |
|---|---|---|
| MagmaV2 | Main ERC-4626 vault with async withdrawal extensions (ERC-7540). User-facing interface for deposits, mints, and withdrawal requests | TBD |
| CoreVault | Validator management vault for equal stake distribution across whitelisted validators | TBD |
| gVault | Targeted delegation vault with per-validator stake caps and curated validator sets | TBD |
| WrappedMonad | ERC-20 wrapper for native MON tokens | TBD |
graph TB
Users[Users] --> MagmaV2[MagmaV2 Vault<br/>ERC-4626]
MagmaV2 --> CoreVault[CoreVault<br/>Equal Distribution]
MagmaV2 --> gVault[gVault<br/>Targeted Delegation]
CoreVault --> Precompile[Monad Staking<br/>Precompile]
gVault --> Precompile
Admin[Admin/Governor] --> MagmaV2
Admin --> CoreVault
Admin --> gVault
- WMON Deposits:
deposit()→ unwrap WMON → delegate native MON - Native Deposits:
depositMon()→ directly delegate native MON - Immediate Delegation: Assets are staked immediately through CoreVault
- Request:
requestRedeem()→ lock shares → queue undelegation - Processing: System batches requests when withdrawal IDs become available
- Claiming: After delay period,
redeem()→ receive WMON or native MON
The protocol integrates with Monad's native staking through a precompile at 0x0000000000000000000000000000000000001000.
# Clone the repository
git clone https://github.com/your-org/magma-protocol
cd magma-protocol
# Install dependencies
forge install
# Install Node dependencies (if any)
npm install# Compile contracts
forge build# Run all tests
forge test- OpenZeppelin for battle-tested contract libraries
- Foundry for the development toolkit
- Monad for the high-performance blockchain infrastructure