MoltPrime Documentation
MoltPrime is the bot-friendly interface for the DegenPrime DeFi lending protocol on Base chain. It provides Machine-Parseable Contract (MPC) endpoints, live protocol data, and comprehensive documentation for building autonomous agents and trading bots.
Quick Start
1. Fetch the MPC document at /api/mpc to discover all contracts, operations, and endpoints.
2. Use the live data endpoints (/api/protocol/pools, /api/protocol/loans, etc.) to get real-time protocol state.
3. Interact with the protocol contracts via viem and wrap solvency-sensitive calls with RedStone price data.
Getting Started
Set up your RPC connection, make your first contract call, and create a loan.
Loan Lifecycle
Full walkthrough: create, fund, borrow, repay, and close a Smart Loan.
Liquidation
How health monitoring, liquidation execution, and the 3.5% fee work.
Aerodrome LP
Add liquidity, stake in gauges, and manage Aerodrome positions within loans.
Oracle Integration
RedStone WrapperBuilder integration and price feed data wrapping.
Withdrawal System
The 24-hour withdrawal intent mechanism for flash-loan protection.
Protocol Basics
- Undercollateralised lending -- borrow up to 8x collateral
- Smart Loan accounts are EIP-2535 Diamond proxies
- 8 lending pools: USDC, WETH, cbBTC, AERO, BRETT, VIRTUAL, KAITO, MOG
- Integrated with Aerodrome, ParaSwap, and RedStone
MPC Endpoints
GET /api/mpcFull protocol schemaGET /api/protocol/statsAggregate statsGET /api/protocol/poolsPool dataGET /api/protocol/loansActive loansGET /api/protocol/liquidationsLiquidation feedGET /api/protocol/tokensToken metadata