Skip to content
Unimod

Advanced UX

Advanced usage is organized around the four roles a power user can take.

Leveraged liquidity provider

Lever your liquidity production against your own position, atomically:

router.flashLeverage(poolId, [tokA, tokB], [userA, userB], [borrowA, borrowB], you, deadline);

One transaction: borrow a balanced basket, mint liquidity with it, post the position as collateral. The health check runs once, at the end. Leverage is per-asset and balanced — borrowAmounts[i] ≤ borrowLtv/(1−borrowLtv) · userAmounts[i] — topping out around 4×4\times at the default parameters. Unwind symmetrically with flashDeleverage (release collateral, redeem, repay — zero upfront capital).

Health is oracle-free and per-asset: for each borrowed asset, your debt must stay below borrowLtv times your redeemable claim on that asset. Watch it via the Lens (getUserPosition, previewMaxBorrow).

Asset supplier

Beyond simple supplying: choose your market. Isolated markets (per-pool, permissionless) price risk individually; permissioned markets share lending across a sponsor's pools under curated parameters. Shares-denominated entry points (supplyShares / withdrawShares) are available where exact share accounting matters.

Liquidator

Zero-capital, zero-approval liquidations — see the liquidator function for the mechanism:

router.liquidate(poolId, assetIdx, borrower, seizedLp, repaidShares, profitsTo, deadline);

Pass exactly one of seizedLp / repaidShares; the contract derives the other. Reverts on healthy positions. The bonus (~2% at default LLTV) pays for keeping the market clean.

Solver

Route intents through the protocol. Star topology makes routing explicit: one path between any two assets, priced consistently through the hub — no path search, no internal arbitrage to model. Quotes are pure eth_call reads on the Lens; batching composes through the Router's multicall.