Loops HouseEbbFlow

NEAR HACKATHON
Links
Team
1 member- ESOwner
Eshita Kundu
Overview
Ebbflow is an on-chain liquidity book on NEAR where every order is a curve, not a single price.
On a normal order book, a maker posts fixed price levels. Once a level fills, it stays empty until the maker signs again. On Ebbflow, a maker posts one position with an ask curve and a bid curve. For example: sell 400 wNEAR starting at $5.04 and rising to $5.20 as it fills, and buy starting at $4.96 and falling to $4.80. The shape setting (alpha) controls how much liquidity sits near the market price.
Takers don't pick makers. Our solver splits each order across up to 8 makers so they all fill at one common price, and works out every leg exactly with the same maths as the contract. The whole route is a single ft_transfer_call. Every leg settles in the same transaction or the taker gets a full refund, and any unused input comes back. Buying 200 wNEAR across two makers costs 1010.11 USDC, compared with 1010.67 from the best single maker.
Liquidity recycles itself. When a maker's ask fills, the USDC goes straight into their bid in the same receipt, and the reverse when the bid fills. A maker keeps quoting both sides and earns the spread without signing again. In our worked example, a round trip of 100 wNEAR earns the maker +8.54 USDC.
What we shipped:
- A Rust smart contract (near-sdk 5) live on testnet at book.ebbflow-team.testnet, with exact integer curve maths and clear error codes
- A routing solver, deployed as an API
- A web app at ebbflow-omega.vercel.app with Trade, Make, Portfolio, Activity and Faucet pages, plus full docs with worked calculations
- An MCP server, so AI agents can quote and trade the same book with hard spending limits
- A shared TypeScript curve-maths package, tested against the contract