Skip to content

mMITOc

Collateral Vault with Variable Exchange Rate

ERC4626 Vault that accepts WMITO as collateral and issues mMITOc shares.

mMITOcmMITOc

Basic Info

FieldValue
StandardERC4626
Underlying AssetWMITO
Share TokenmMITOc
Withdrawal Wait7 days
Slashing ExposureYes

Mechanism

Share Calculation

shares = assets × totalSupply / totalAssets
 
assets = shares × totalAssets / totalSupply

totalAssets reflects collateral value reported by Oracle. Decreases when slashing occurs.

Deposit

  1. User deposits WMITO
  2. Vault mints mMITOc at current exchange rate
  3. Vault delegates WMITO as collateral to validators
  4. totalCollateralDeposited increases

Slashing Detection

_syncCollateralWithOracle() function syncs with Oracle:

bookValue = validatorCollateral[validator]  // Book value
oracleValue = COLLATERAL_ORACLE.getCollateralOwnership(...)  // Oracle reported value
 
if (oracleValue < bookValue) {
    // Slashing occurred
    loss = bookValue - oracleValue
    totalAssets -= loss
    // Exchange rate drops
}

Exchange Rate Change Example

Initial state:
├─ totalAssets: 1000 WMITO
├─ totalSupply: 1000 mMITOc
└─ Rate: 1 mMITOc = 1 WMITO
 
After 10% slashing:
├─ totalAssets: 900 WMITO (Oracle reported)
├─ totalSupply: 1000 mMITOc (unchanged)
└─ Rate: 1 mMITOc = 0.9 WMITO

Reward Distribution

Reward flow (mMITOc only):

Collateral Oracle → RewardRouter → gmMITO Vault

              "Dividend of provided collateral"
  • RewardRouter calculates dividend based on collateral provided
  • Receives collateral info feed from Collateral Oracle
  • Rewards distributed as gmMITO

Rewards accumulated separately from share value:

struct RewardState {
  uint256 rewardPerShareStored;      // Accumulated rewards per share
  mapping(address => uint256) userRewardPerSharePaid;  // User's last settlement point
  mapping(address => uint256) rewards;  // User's unclaimed rewards
}

Reward calculation:

earned = balanceOf(user) × (rewardPerShareStored - userRewardPerSharePaid[user])

Withdrawal

  1. User requests withdrawal (mMITOc burned)
  2. WithdrawalNFT minted
  3. Wait 7 days
  4. After maturity, burn NFT and receive WMITO
struct WithdrawalState {
  uint256 pendingWithdrawals;       // Number of pending withdrawals
  uint256 totalPendingWithdrawal;   // Total pending withdrawal amount
  Checkpoints.History exchangeRateHistory;  // Exchange rate history (for slashing tracking)
}

State Variables

struct CollateralData {
  uint256 totalCollateralDeposited;  // Total deposited collateral
  mapping(address validator => uint256) validatorCollateral;  // Collateral per validator
  mapping(address validator => uint256) lastSyncedOracleValue;  // Last Oracle value
}

Integrated Contracts

ContractPurpose
WMITOUnderlying asset
GM_MITOReward token (gmMITO)
COLLATERAL_ORACLECollateral state Oracle
VALIDATOR_MANAGERValidator management
WITHDRAWAL_NFTWithdrawal NFT
REWARD_ROUTERReward distributor

Risks