A: https://interfaces-steel.vercel.app/ B: https://polyindex-factory.vercel.app/
PolynanceLend is a single-market lending pool that marries three elements:
| Element | Role in PolynanceLend |
|---|---|
| Aave v3 Money-Market | Base yield engine. 100 % of supplied stable-assets are flash-deposited into Aave, earning its variable deposit APY. |
| Prediction-market tokens (ERC-20) | Accepted as collateral. Each pool is hard-wired to one “YES/NO” outcome token and one supply asset (e.g. USDC). |
| Polynance spread layer | Adds an adjustable spread on top of Aave’s borrow rate. The spread is where Polynance captures risk premium, protocol fee, and additional LP yield. |
The result is a “lending wrapper around prediction markets.” Liquidity providers (LPs) supply stable-coins, borrowers pledge outcome tokens to obtain working capital, and settlement happens automatically when the underlying market resolves.
| Actor | What they deposit | What they receive |
|---|---|---|
| LP (supplier) | supplyAsset (e.g. USDC) |
NFT Supply Position (ERC-721) representing their deposit. Balance grows with (Aave APY + Polynance supply rate). |
| Borrower | collateralAsset (prediction token) |
Up-front transfer of supplyAsset, plus a debt position recorded on-chain. |
| Curator | Market admin address (sets oracle, maturity date, can trigger resolve) | No economic token; earns no spread — purely operational. |
| Protocol | Retains a slice of spread interest via reserveFactor (bps). |
All rates are calculated in Ray precision (1 Ray = 1 × 10²⁷).
Piece-wise linear around an optimal utilisation point:
Parameters are stored in Storage.RiskParams:
| Parameter | Meaning | Typical example |
|---|---|---|
baseSpreadRate |
Minimum markup over Aave (Ray) | 0.02 Ray (≈ 2 %) |
optimalUtilization |
Target pool usage (Ray) | 0.8 Ray (80 %) |
slope1,slope2
|
Rate steepness below / above |
0.1 Ray / 0.3 Ray |
reserveFactor |
% of spread routed to protocol (bps) | 1 000 bps (10 %) |
LPs earn both the underlying Aave deposit APY and their pro-rata share of the spread:
Reserve factor is netted out before the spread is sent to LPs.
| Symbol in code | Description | Typical value |
|---|---|---|
ltv |
Maximum borrow as % of collateral value (bps) | 70 % |
liquidationThreshold |
HF = 1 trigger (bps) | 75 % |
lpShareOfRedeemed |
% of excess collateral routed to LPs at resolve | 20 % |
priceOracle (externally injected) returns collateral price in Ray.
Value is normalised to the supply-asset decimals inside Core.calculateMaxBorrow.
Liquidation occurs when
-
Pool creation – Deployer sets
RiskParams(assets, oracle, maturityDate, rate slopes, etc.). Pool is inactive until the curator flipsisActive. -
Supply –
-
LP deposits USDC → tokens are immediately forwarded to Aave.
-
Contract mints an ERC-721 Supply Position whose internal fields store:
supplyAmount(principal)scaledSupplyBalancePrincipal(Aave-side principal + Aave interest)scaledSupplyBalance(Polynance spread index)
-
-
Borrow –
-
Borrower transfers prediction tokens.
-
Core.calculateMaxBorrowenforces LTV. -
Contract itself borrows from Aave, drawing the user’s USDC and sending it to them.
-
Two indices track debt:
scaledDebtBalancePrincipal(Aave)scaledDebtBalance(Polynance spread)
-
-
Ongoing accrual – Every supply/borrow/repay touchpoint updates:
variableBorrowIndex– cumulative Polynance spread index- Aave’s indices are read via
ILiquidityLayer.
-
Repay / Withdraw – Reverse of steps 2–3 including proportional accounting of principal vs interest (see
SupplyLogic.withdrawAllandBorrowLogic.repay). -
Maturity & Resolve
-
After
maturityDatecurator callsMarketResolveLogic.resolve(). -
Prediction tokens are redeemed for USDC (via oracle or on-chain conversion).
-
Flow of funds
-
Repay Aave principal debt for all borrowers (pool-level).
-
Excess
-
If redemption ≥ total debt → surplus split:
lpShareOfRedeemedto LP profit pool- Remainder to borrowers (pro-rata to their original debt)
-
If redemption < total debt → deficit (
marketLoss) socialised across LP principal.
-
-
-
LPs and borrowers call
redeemByLp()/redeemByBorrower()to pull their share.
-
| Step | Pool totals | Comments |
|---|---|---|
| T0 supply | LPs deposit 1 000 000 USDC → Aave | — |
| Pool utilisation 40 % | Borrowers draw 400 000 USDC, collateral YES-tokens worth 600 000 USDC | HF = 1.5 |
| Rates (example) | Aave deposit 3 %; Aave variable borrow 4 % | — |
| Spread |
base 2 % + slope1 10 %×0.4 = 6 % | Borrow APR = 10 % |
| Projected LP APY | 3 % (Aave) + 6 %×0.4 = 5.4 % | Before fees |
| Protocol fee | reserveFactor 10 % → 0.54 % captured by DAO | — |
- Spread fee –
reserveFactor% of interest paid above Aave. - Liquidation penalty (future) – share of seized collateral.
- Idle cash – none (all funds stay in Aave, minimising utilisation risk).
| Risk | Source | Mitigation lever |
|---|---|---|
| Oracle failure / market manipulation | Wrong collateral price | Use TWAP + multi-sig curator, small loan caps until liquidity deepens. |
| Prediction market resolves 0 | Collateral worthless | Conservative ltv, higher slope2 to discourage high utilisation, socialise loss via marketLoss. |
| Aave insolvency / de-peg event | Underlying money market | Pool supports only high-quality stables; can migrate modules (interface ILiquidityLayer). |
| Liquidity crunch | High utilisation locks LP withdrawals | Dynamic spread sharply increases above optimalUtilization, incentivising repay/supply. |
| Smart-contract bug | Solidity code | Full suite of unit + fuzz tests, audit before main-net. |