MarianmarianDocs
Getting Started

Protocol Architecture

Marian is a set of nine core contracts on the Robinhood Chain - Testnet, wired through a single oracle registry and a shared risk engine. Every value-bearing token is ERC-20 compatible and every vault is ERC-4626 compliant.

Contract topology

  ┌───────────────┐   settle    ┌─────────────────────┐
  │  Custodian    │────────────▶│ DividendDistributor │
  │  Oracle (RWA) │             │  (streams USDC/blk) │
  └───────┬───────┘             └──────────┬──────────┘
          │ NAV                              │ pro-rata
          ▼                                  ▼
  ┌─────────────────┐    mint    ┌─────────────────────┐
  │  BasketVault    │◀───────────│      User EOA       │
  │   (ERC-4626)    │───shares──▶│   holds bMRN-SPx   │
  └────────┬────────┘            └──────────┬──────────┘
           │ lockable                        │
           ▼                                  ▼
  ┌─────────────────┐            ┌─────────────────────┐
  │   mLocker      │──boost────▶│    RiskEngine       │
  │  (6–48 mo)      │            │  computes HF, CF    │
  └────────┬────────┘            └──────────┬──────────┘
           │ fee share                       │ liquidatable?
           ▼                                  ▼
  ┌─────────────────┐            ┌─────────────────────┐
  │  FeeSplitter    │◀──interest─│   BorrowMarket      │
  │  70/20/10       │            │   (mints mUSD)      │
  └─────────────────┘            └─────────────────────┘
Solid arrows are value flows; dashed arrows are read-only price/state calls.

Contracts

ContractStandardPurposeUpgradable
BasketVaultERC-4626Holds tokenized equities, mints basket shares at NAVUUPS proxy
DividendDistributorERC-4626 hookConverts custodian cash → USDC → per-block streamUUPS proxy
mLockerERC-721Non-transferable lock NFT, decay-weighted vote powerImmutable
MRN TokenERC-20Governance / emissions, 1B capImmutable
EmissionsCustomveBoost curve, 90-day linear vestUUPS proxy
BorrowMarketERC-20 mUSDIsolated per-basket debt marketUUPS proxy
RiskEngineViewHF, CF, liquidation mathImmutable + params gov
FeeSplitterRouter70/20/10 revenue routingImmutable
OracleRegistryChainlink+Median of 3 price feeds, 30s heartbeatImmutable + feed gov

Oracle stack

Every basket references three independent price feeds: (1) Chainlink CCIP, (2) Pyth network, (3) a Robinhood Chain - Testnet–native custodian oracle signed by the KYC-registered market maker. The RiskEngine consumes the median, which is only accepted if the max deviation across feeds is below 75 basis points.

P_accepted = median(P₁, P₂, P₃)
    iff  max|Pᵢ − Pⱼ| / median  <  0.0075   ∀ i,j
Oracle acceptance rule
Failsafe
If deviation exceeds 75 bps for more than 3 consecutive heartbeats (90 seconds), the affected basket enters freeze mode: mints and redemptions are suspended and liquidations pause. Lockers continue to accrue emissions.

Upgrade governance

All UUPS proxies point at a 48-hour timelock controlled by veMRN holders. A quorum of 4% of vote-weighted supply is required to propose, and 50% + 1 of votes cast to pass. Immutable contracts (the MRN token itself, the RiskEngine core, and the FeeSplitter) have no upgrade path — only their parameter setters do.