◆ 01the problem
PancakeSwap is the largest source of automated market-maker liquidity on BNB Chain. Across V2, V3, and the new Infinity hook architecture, the protocol routinely holds billions of dollars in liquidity provider deposits.
That capital earns swap fees. But it is locked for everything else. A liquidity provider's $1M position cannot be borrowed against without first being withdrawn — and withdrawing kills the fee stream.
You can earn swap fees, OR use the tokens as collateral. Not both.
The same pattern repeats across DeFi: tokens locked into LP, into staking, into vaults are dead weight for any purpose other than their primary one. For a fair-launched community token, this means the deepest pool of capital — the LP itself — can never finance its own users.
◆ 02the idea
What if the AMM itself could lend? Every block, the Infinity pool knows precisely how much BNB it holds and at what price. That is a perfect oracle and a perfect treasury, owned by the protocol — not a third party.
lo0p is an Infinity hook that does exactly this. When a user wants to borrow BNB, the hook reaches into one of the LP positions backing the LOOP/BNB pool, pulls the requested BNB out, and hands it over. The LP shrinks slightly — but the spot price does not move, because we draw from a band that sits below the current spot.
(crossed bands)
sits here
The key insight: Infinity's concentrated liquidity is divided into discrete tick ranges. Each range can hold BNB-only, LOOP-only, or a mix, depending on where the current spot is. We treat each range as a separate "band" of capital and lend from bands that have BNB to spare.
◆ 03the math
↳ 3.1 the curve
Like a vanilla constant-product AMM, lo0p maintains:
where V = 20 BNB is a fixed virtual reserve so the curve is well-defined even with zero real BNB, and K = 20,000,000 is the product constant set at deployment to fix the launch supply at 1,000,000 LOOP.
Spot price is (V + realBNB) / realTokens BNB per LOOP. As BNB flows in, realTokens drops and price rises. Standard stuff.
↳ 3.2 30-BNB bands
The pool is sliced into 100 discrete bands, each covering 30 BNB of cumulative inflow. Band i holds the LOOP that the constant-product curve would have sold across the BNB range [30i, 30(i+1)):
Mapped to Infinity ticks, this gives 100 single-sided LOOP positions at deploy, covering pool-BNB inflow up to 3,000 BNB. As buyers push BNB into the pool, bands cross one by one — each band's LOOP is converted to BNB at exactly the prices it was priced at.
| band | BNB range | LOOP allocation | % of supply |
|---|---|---|---|
| 0 | 0–30 | 600,000 | 60.00 % |
| 1 | 30–60 | 150,000 | 15.00 % |
| 2 | 60–90 | 68,181 | 6.82 % |
| 3 | 90–120 | 38,961 | 3.90 % |
| … | … | … | tail bands shrink rapidly |
| 29 | 870–900 | 732 | 0.07 % |
| … | … | … | long tail to 3,000 BNB |
| 99 | 2970–3000 | 67 | 0.007 % |
The 100-band design covers a price range of ~7,000× from launch to band 99 saturation — well beyond any realistic short/medium-term protocol life.
↳ 3.3 borrowing — bound band selection
When a user locks C LOOP as collateral, we lend BNB at a 40 % loan-to-value:
Liquidation triggers when collateral value falls to 1.5 × debt — i.e. spot price drops to 60 % of the borrow price. Solving for that price level on the curve gives the predicted liquidation pool BNB:
The "bound band" is then floor(bnbLiq / 30). The hook draws the borrow's BNB from this specific band's LP. Since the band sits below current spot, removing BNB from it does not move the price — borrows are slippage-free.
↳ 3.4 dead zones & the shift
Sometimes the predicted bound band is the same band the spot price currently sits in (a "straddle"). Infinity's concentrated liquidity requires single-sided positions for BNB-only extraction, so a straddling band cannot supply pure BNB.
The hook resolves this with two mechanisms:
Together these guarantee every borrow can be served regardless of where the spot price is — no warmup period, no dead zones.
↳ 3.5 self-healing liquidation
When a position becomes underwater (collateral value < 1.5 × debt), anyone can call liquidate() for a small bounty. The hook:
min(1 % × debt, 0.01 BNB) — the hard cap prevents disproportionate payouts on large positions.The pool gets stronger every time a position liquidates. That's self-healing.
If the spot has moved so far during the liquidation swap that the original band is no longer above spot, the refill falls back to the closest other band that is above. If even that fails, the surplus goes to the FeeCollector as protocol revenue. BNB never sits unaccounted in the hook.
◆ 04a complete cycle
Concretely, here is what happens when a user borrows then later gets liquidated:
◆ 05honest limits
Things to know:
◆ 06parameters
| parameter | value | rationale |
|---|---|---|
| LOOP supply | 1,000,000 | fixed at deploy, no mint/burn |
| Virtual BNB (V) | 20 BNB | phantom reserve to seed the curve |
| LDF bands | 30 × 30 BNB | covers 0–900 BNB cumulative inflow |
| LTV | 40 % | debt = 0.40 × collateralValue |
| Origination fee | 1 % of debt | → FeeCollector at borrow time |
| Liq threshold | 150 % | underwater when collateralValue < 1.5 × debt |
| Liq bounty | 1 % × debt, max 0.01 BNB | per-call cap, prevents whale subsidies |
| Repay cooldown | 2 blocks | post-borrow lockout |
| Min collateral | 0.1 BNB value | floor to prevent dust |
◆ 07references
Open the dashboard to see live curve depth, place trades, and manage open positions.