Custody
Locked
Earning fees means handing your coins to a pool.
- A pool contract holds the deposit, not you
- Withdraw before you can pay anyone
- Each pool needs its own copy of your capital
One wallet balance makes FX markets on Solana and 1inch Aqua
and backs every stablecoin when one breaks
The problem
Stablecoins in wallets and treasuries earn nothing. Pools pay fees, but they take custody, split one basket into dozens of pairs, and fill up with the coin that breaks.
Custody
Earning fees means handing your coins to a pool.
8 coins
Pair pools split one basket into dozens of thin books.
USDC $0.88 · March 2023
When one coin breaks, the pool fills up with it.
How it works
Peglo is an FX market made of wallets. You keep your coins, they earn spread, and when one coin breaks the same balance catches it.
Your strategy is a set of virtual balances on Aqua. Coins stay in your wallet and move only when a trade fills, straight to the taker.
Sphere AMM math from Paradigm's research prices USDC, USDT, DAI, USDS, USDe, EURC, BRZ and IDRX on one curve, as a new SwapVM instruction with one square root per swap.
A CRE workflow pushes EUR, BRL and IDR rates, bounded onchain by Chainlink feeds. A stale rate stops the swap instead of mispricing it.
CRE halts it on every range. Your backstop buys it at a discount you choose below market, paid from the same wallet balance that runs your FX range.
The math
The pricing follows Paradigm's research on AMMs for many stablecoins, extended to live FX rates and written as two SwapVM instructions. These are the equations the contracts run.
x is your Aqua balance of coin k, rho its USD rate from Chainlink CRE, m the floor that concentrates the range. Every coin trades against every other on one surface.
S and Q are the sum and the sum of squares of v. The radius is recomputed on every swap, so fees grow it and compound to the LP.
Only the two traded balances move, so the output is exact and in closed form, rounded in favor of the LP.
Past the edge a range refuses its heaviest coin and keeps trading the rest. Each width picks K: Tight stops at a 0.5% depeg, Balanced at 2%, Wide at 8%. An exposure cap limits how much of one coin a range can hold.
Checked after every fill on both routers. A swap that would shrink the LP's position reverts.
p comes from Chainlink CRE and the Chainlink market feed, A is what it already bought, a this sale, C its cap. Dormant until CRE halts the coin.
See it
Both charts are computed in your browser by the Peglo SDK, which matches the contracts to the wei.
Price impact by trade size
One range, five USD coins, $1M each. Fees excluded. Each line ends where the range refuses more size.
A coin breaks its peg
Five USD coins, one breaks. Arbitrageurs sell it into the range until its price matches the market. Value change of the LP position, computed with the same math as the contracts.
What a backstop pays
Per coin, as its cap fills, with the broken coin at $0.930.
Pays $0.911 first, $0.837 when full. Market (red) is $0.930, never above $1.
Built for 1inch Aqua
Aqua's promise is that one balance can back many strategies without being locked. Peglo is built entirely on that promise.
One wallet backs an FX range and a backstop at the same time. A $67 test wallet backed $108 of strategies: a 1.6x Shared Liquidity Ratio.
PegloTick (opcode 34) prices the sphere curve. PegloBackstop (opcode 35) buys a depegged coin only while Chainlink says it is broken.
The same pricing runs on 1inch's AquaSwapVMRouter at 0x1111…C0De through Extruction, so any taker on the official router can fill it.
A batch taker splits each swap across every live strategy on our router and yours, settled in one transaction.
One ship() covers 8 coins and 28 pairs. A wallet that spends its coins is skipped cleanly instead of failing the trade.
All 56 swap directions filled on a Base mainnet fork against official Aqua and the official router, with real EURC, BRZ and IDRX.
one transaction
each leg
same pricing
Built for Chainlink CRE
The workflow sets the FX rates every swap uses, and decides when a coin is broken. Without it, Peglo cannot price a euro.
$ cre workflow simulate depeg-sentinel -T fork-settings --broadcast
EURC ref=1.116385 feed=1.117162 api=1.038238
halt=true offchain 700bps >= hard 300bps
USDe feed=0.998752 halt=false back within resume band
BRZ ref=0.181687 halt=false within peg
oracle updated pushed [USDe:false EURC:true BRZ:false IDRX:false]
tx 0x3c298e53…bd63e5dcVersus
| Property | Uniswap v3 | Curve | Other builds of the paper | Peglo |
|---|---|---|---|---|
| Coins per pool | 2 | 2 to 4 | N | Up to 8 per strategy, routed together |
| Concentrated liquidity | Yes | Amplified curve | Yes | Yes, three widths |
| Where LP funds sit | Pool contract | Pool contract | v4 PoolManager | Your own wallet |
| Spend while providing | No | No | No | Yes |
| Non-USD stablecoins | One pair per pool | Separate pools | USD coins | EUR, BRL and IDR on one curve |
| When a coin breaks | No protection | No protection | Range edge | Edge, Chainlink CRE halt, backstop |
| Same capital, second job | No | No | No | Backstop on the same balance |
| Venue | Uniswap | Curve | Uniswap v4 hook | 1inch Aqua, both routers |
Measured, not promised
Swap costs are live trades on Base Sepolia over test liquidity; costs move as trades tilt the pool. The depeg numbers come from a Base mainnet fork with real coins and both 1inch routers.