1. Abstract & Protocol Thesis
Mezo Network establishes an EVM-compatible Bitcoin economic layer. At its foundation lies MUSD, a decentralized stablecoin minted against native Bitcoin collateral via Liquity-derived Trove contracts. While this system offers unprecedented capital efficiency, the structural realities of Bitcoin volatility demand automated protective infrastructure.
2. Mezo MUSD Trove Dynamics & The Borrower Dilemma
Each borrower on Mezo interacts with the core protocol by maintaining a Trove—a collateralized debt position holding BTC and issuing MUSD debt. Trove solvency is governed by the Individual Collateral Ratio (ICR):
If ICR falls below the Minimum Collateral Ratio of 110%, any third party can liquidate the trove. The borrower's collateral is seized by the Stability Pool, resulting in a complete loss of the 10% collateral premium plus a liquidation penalty fee.
If Total Collateral Ratio (TCR) across all system troves falls below 150%, the protocol enters Recovery Mode. In this state, any trove with an ICR under 150% is eligible for immediate liquidation, drastically expanding the hazard zone.
Unlike typical lending protocols that only liquidate at MCR, Mezo allows anyone to redeem 1 MUSD for exactly $1 worth of Bitcoin collateral at face value. Redemptions do not pick troves randomly: they walk the on-chain doubly linked list (SortedTroves.sol) starting strictly from the lowest ICR trove. A borrower sitting at 120% ICR may be completely safe from liquidation, yet have their precious Bitcoin redeemed away bit-by-bit during a stablecoin peg deviation.
3. System Architecture & Vault Topology
Ballast decomposes protective operations into deterministic, un-ruggable components:
The factory utilizes EIP-1167 minimal proxy cloning to deploy lightweight, low-gas instances of BallastVault for each borrower. Each proxy holds an immutable reference to the master implementation while maintaining isolated state, user ownership, and custom rule configurations.
Holds the borrower's pre-funded reserve (MUSD or BTC). Only the borrower (the vault owner) can withdraw funds or alter defense parameters. The contract exposes an open external function executeDefense(address borrower) which is gated by an on-chain ICR sanity check.
Off-chain keeper nodes continuously index the Mezo SortedTroves contract. When a registered vault's trove ICR drops beneath its preconfigured trigger (e.g., 130%), keepers submit a defense transaction. Simultaneously, our Convex cloud service dispatches immediate push notifications via the Telegram bot webhook (@BallastGuardBot).
4. Mathematical Formalization & Waterline Calculations
Ballast's defense calculations are deterministic and verified against integer rounding in 18-decimal precision (1e18).
To elevate a degraded ICR (ICR_current) to a safe target waterline (τ_target), the exact amount of debt ΔD that the vault must repay is given by:
Where: D = Current Trove Debt, C = Collateral in BTC, P = Current Oracle Price (USD/BTC), τ_target = Desired Target Ratio (e.g., 1.40 for 140%).
The percentage decline in Bitcoin price that a trove can absorb before breaching liquidation ($MCR = 1.10$) is defined as:
Example: At 140% ICR, a borrower can withstand a 21.4% price shock before liquidation occurs.
5. Security Guarantees & Formal Invariant Proofs
Every line of smart contract code adhering to the Ballast standard complies with strict solidity invariants verified through Foundry fork testing:
A keeper executing defense never receives custody of user reserves. The vault code is mathematically constrained to route MUSD or BTC exclusively to Mezo'sBorrowerOperations contract for the borrower's trove address.
All state transitions enforce the Checks-Effects-Interactions (CEI) paradigm and use OpenZeppelin's battle-tested ReentrancyGuard. Keeper execution is strictly blocked if the trove ICR is already above the trigger threshold.
To prevent economic drain attacks, the keeper compensation fee is capped on-chain at an absolute maximum threshold configured by the borrower during vault initialization.
Zero mocks in production. All contract ABIs and interfaces map 1:1 to Mezo's official mUSD protocol contracts deployed on Matsnet (Chain ID 31611).
6. Verified Contract Matrix (Mezo Matsnet)
The table below details all contracts involved in the Ballast defense engine. Official Mezo contracts are verified on-chain and badged accordingly:
| Contract Name | Role & Function | Status / Badge | Matsnet Address |
|---|---|---|---|
| BallastFactory | Deterministic Proxy Factory | Ballast Core | |
| BallastVault Implementation | Master Defense Execution Logic | Ballast Core | |
| TroveManager | Liquidations, Redemptions, ICR Query | Official Mezo | |
| BorrowerOperations | Collateral Top-up & Debt Repayment | Official Mezo | |
| SortedTroves | Doubly Linked List of Solvency | Official Mezo | |
| MUSD Token | Bitcoin-backed Stablecoin | Official Mezo | |
| ActivePool | Global Collateral & Debt Custodian | Official Mezo |
7. Permissionless Keeper Economics
A defense protocol is only as reliable as its execution engine. Ballast implements a game-theoretically sound keeper ecosystem:
Any entity running the Ballast open-source keeper client can submit execution transactions. No whitelisting, staking, or permission is required.
The borrower sets a fixed keeper tip (e.g. 10–25 MUSD) that is paid out atomically upon successful intervention, covering gas overhead with a guaranteed profit margin.
Keepers compute off-chain hints for insertion into Mezo's SortedTroves linked list, reducing on-chain gas costs to $O(1)$ complexity.
8. Conclusion & Future Roadmap
By uncoupling the borrower's physical presence from the survival of their Bitcoin trove, Ballast transforms DeFi borrowing on Mezo Network from a high-stress, sleepless endeavor into an institutional-grade, set-and-forget financial primitive.