Skip to content
Unimod

Liquidity supplier

Provides assets to producers through a lending / borrowing function.

The lending side of Unimod is a Morpho-style system of isolated markets with one deliberate inversion: instead of lending out the assets sitting inside the liquidity pools, the liquidity position itself is the collateral. Suppliers lend ERC20 assets; producers borrow against their LP shares to lever their liquidity production. The pool's reserves never leave the liquidity function.

supply(poolId, assetIdx, assets, recipient, deadline)
withdraw(poolId, assetIdx, assets, onBehalf, receiver, deadline)
borrow(poolId, assetIdx, assets, onBehalf, receiver, deadline)
repay(poolId, assetIdx, assets, onBehalf, deadline)
depositCollateral(poolId, lpShares, recipient, deadline)
withdrawCollateral(poolId, lpShares, onBehalf, receiver, deadline)

Oracle-free credit

Collateral is valued on the pool's reserves, never on a price feed. For each borrowed asset ii, a borrower holding share ss of the pool's LP supply must satisfy

biltvsBi,b_i \le \mathrm{ltv} \cdot s \cdot B_i,

where bib_i is their debt in asset ii and BiB_i the pool's balance of it — the borrower's redeemable claim on that very asset. No manipulable input enters the credit function. Borrowing power is per-asset: each asset's debt is backed by the borrower's claim on that same asset.

Atomic leverage

Because shares are fungible and directly creditable, leverage composes in one transaction — the flash-leverage path: borrow, mint liquidity, post the position as collateral, with the health check running once at the end.

flashLeverage(poolId, tokens[], userAmounts[], borrowAmounts[], user, deadline)
flashDeleverage(poolId, tokens[], lpToBurn, repayAssetIdx, repayShares, user, deadline)

Leverage is balanced (a basket is borrowed in pool proportion), capped by the borrow LTV at roughly 4×4\times.

Interest and risk

Rates follow an adaptive-curve interest rate model: each market's rate drifts toward equilibrium utilization, per market, with no governance in the loop. Suppliers earn the interest borrowers pay, minus a market fee where one is set. Debt is isolated per market: a shortfall in one market cannot reach another. If a liquidation exhausts a borrower's collateral with residual debt, the residual is absorbed by that market's suppliers — the standard isolated-lending backstop, kept rare by the liquidation design.