SwapBook
P2P order book running on EigenLayer that settles transactions on-chain. Uniswap hook integration: a swap is caught before it happens and rerouted to the order book if the price is better.
Created on 1st March 2025
•
SwapBook
P2P order book running on EigenLayer that settles transactions on-chain. Uniswap hook integration: a swap is caught before it happens and rerouted to the order book if the price is better.
The problem SwapBook solves
Order books match buyers and sellers perfectly, but blockchains can’t handle them. AMMs are the workaround—clunky, expensive, and loss-prone. We use an EigenLayer AVS to run an order book off-chain, have validators reach consensus on how to process each order, and have settlement on-chain.
User Interaction and Data Flow
Please see README on GitHub repo to try it out and watch the demo video.
The project architecture and development process
An order is submitted to a network of validors (an AVS using the Othentic framework), which each process the order in their local instance of the given currency pair's order book, and once they reach a consensus, settlement occurs on-chain. We integrate with a Uniswap V4 hook to catch AMM orders before they happen and, if the user can get a better price on our order book than they can through the pool, their order is rerouted to the order book instead.
Additional Features
Built for the EigenGames hackathon (run in parallel to the BUIDLathon).
Tracks Applied (5)
Best EigenLayer AVS
EigenLayer
Best Eigen App
EigenLayer
DEFI, NFTS + GAMING
Uniswap V4 on Unichain Innovation
Uniswap
DeFi Innovation on Unichain
Uniswap
Technologies used