Skip to main content

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​

FeaturePrimeFi
ModelAave-style (pool-based)
SupplyDeposit assets, earn variable APY
BorrowOver-collateralized loans
LiquidationsAutomatic when health factor < 1
StatusContracts 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)​

  1. Approve the PrimeFi pool contract to spend your tokens.
  2. Call supply(asset, amount, onBehalfOf) to deposit.
  3. Receive aTokens (interest-bearing receipt tokens) in return.
  4. Your balance grows as interest accruesβ€”redeem aTokens anytime for underlying + interest.

Borrow​

  1. Supply collateral first (e.g., WPRIM, USDC).
  2. Call borrow(asset, amount, interestRateMode, onBehalfOf).
  3. Receive borrowed assets to your wallet.
  4. 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:

AssetUse Case
WPRIMCollateral, supply
USDCCollateral, supply, borrow
USDTCollateral, supply, borrow
DAICollateral, 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​

ComponentDescription
PrimeFi ContractsSolidity, Hardhat, Aave-style logic
PrimeFi UI v2React 19, Vite, wagmi β€” lending frontend
PrimeFi LiquidatorNode.js bot for monitoring and liquidating unhealthy positions
PrimeFi OmniCross-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​

ComponentStatus
Lending contractsReady for deployment
PrimeFi UI v2Built (dist/)
Liquidator botReady
PrimeFi Omni (cross-chain)Contracts ready

Once deployed, contract addresses will be published in Deployed Contracts.