Ballast - leveraged, oracle-anchored liquidity on 1inch Aqua
Ballast helps an LP make their liquidity work harder, without taking on the usual risk that comes with it.
The problem: in a normal AMM, an LP faces a trade-off. To offer tight prices (low slippage) on big trades, you need a lot of capital sitting in the pool. And when markets move fast, the pool's price can fall out of line with the real market price. When that happens, arbitrage traders buy from the pool at the stale, wrong price and the LP loses money.
Ballast fixes both sides of that trade-off with two pieces:
Leverage gives the pool depth while the Chainlink anchor keeps that deep, leveraged pool honest so the LP doesn't get picked off.
The price feed is read on-chain, inside the trade itself, and it directly sets how many tokens change hands - it's part of the TX.
Proof: I ran it on a FORKED ethereum mainnet using real WETH and USDC and the real Chainlink ETH/USD feed. On a pool deliberately knocked 2x off-market, a trader could grab ~11.9ETH for 10,000 DAI without the anchor. With the anchor on, the same trade is capped to the fair 5.94 WETH and the LP keeps the difference.
17 automated tests demonstrate that.
Stack: 1inch SwapVM and Aqua, Solidity, Foundry for tests and the demo, Chainlink Price Feeds for prices.
I wrote two custom opcodes:
Both run on every swap, anchor first, then leverage.
Chainlink: the price feed is read on-chain inside the swap, and the price sets how many tokens change hands — it's not just displayed. The opcode handles different token decimals (e.g. WETH 18 vs USDC 6), trade direction, and stale-price rejection.
Two technical notes:

