PrimeFi Lending
PrimeFi is an Aave-style lending and borrowing protocol built for Mersennet. It enables users to supply assets to earn interest and borrow against collateralβpowering the DeFi credit layer of the ecosystem.
Overviewβ
| Feature | PrimeFi |
|---|---|
| Model | Aave-style (pool-based) |
| Supply | Deposit assets, earn variable APY |
| Borrow | Over-collateralized loans |
| Liquidations | Automatic when health factor < 1 |
| Status | Contracts built, ready for deployment |
info
PrimeFi smart contracts are built and audited. They are ready for deployment to Mersennet testnet. The PrimeFi UI (v2) and liquidator bot are also built and will be deployed alongside the contracts.
How It Worksβ
Supply (Deposit)β
- Approve the PrimeFi pool contract to spend your tokens.
- Call
supply(asset, amount, onBehalfOf)to deposit. - Receive aTokens (interest-bearing receipt tokens) in return.
- Your balance grows as interest accruesβredeem aTokens anytime for underlying + interest.
Borrowβ
- Supply collateral first (e.g., WPRIM, USDC).
- Call
borrow(asset, amount, interestRateMode, onBehalfOf). - Receive borrowed assets to your wallet.
- Interest accrues on the borrowed amount. Repay with
repay()to reduce debt and free collateral.
Interest Ratesβ
- Variable rate β Fluctuates based on utilization (how much of the pool is borrowed).
- Stable rate (if supported) β More predictable, may have different parameters.
- Higher utilization β higher borrow APY, higher supply APY for lenders.
Liquidationsβ
When a borrower's health factor drops below 1 (e.g., collateral value falls or debt value rises), the position becomes liquidatable:
- Liquidators can repay part or all of the debt.
- In exchange, they receive collateral at a discount (liquidation bonus).
- This keeps the protocol solvent and incentivizes risk management.
Supported Assets (Planned)β
PrimeFi will support the core Mersennet assets:
| Asset | Use Case |
|---|---|
| WPRIM | Collateral, supply |
| USDC | Collateral, supply, borrow |
| USDT | Collateral, supply, borrow |
| DAI | Collateral, supply, borrow |
Exact support depends on deployment configuration and oracle integration.
Architectureβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PrimeFi Protocol β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Pool (LendingPool) β
β - supply() / withdraw() β
β - borrow() / repay() β
β - liquidationCall() β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PoolAddressesProvider β Oracle β aToken / debtToken β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
PrimeFi Componentsβ
| Component | Description |
|---|---|
| PrimeFi Contracts | Solidity, Hardhat, Aave-style logic |
| PrimeFi UI v2 | React 19, Vite, wagmi β lending frontend |
| PrimeFi Liquidator | Node.js bot for monitoring and liquidating unhealthy positions |
| PrimeFi Omni | Cross-chain lending via LayerZero v2 (contracts ready) |
Integration with Mersennetβ
- PrimeSwap β Borrow stablecoins, swap on PrimeSwap, supply for yield.
- PrimeOrders β Future: collateralize positions, use CLOB for hedging.
- WPRIM β Native token wrapper used as collateral and supply asset.
Deployment Statusβ
| Component | Status |
|---|---|
| Lending contracts | Ready for deployment |
| PrimeFi UI v2 | Built (dist/) |
| Liquidator bot | Ready |
| PrimeFi Omni (cross-chain) | Contracts ready |
Once deployed, contract addresses will be published in Deployed Contracts.
Related Resourcesβ
- PrimeSwap DEX β Swap and provide liquidity
- Deployed Contracts β Contract addresses when live
- Network Information β RPC and configuration