SwapBook

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

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

The order book is run on an AVS, where each validator processes each incoming order and they consensus is reached on how...Read More
EigenLayer

EigenLayer

Best Eigen App

The order book is run on an AVS, where each validator processes each incoming order and they consensus is reached on how...Read More
EigenLayer

EigenLayer

DEFI, NFTS + GAMING

The order book is run on an AVS, where each validator processes each incoming order and they consensus is reached on how...Read More

Uniswap V4 on Unichain Innovation

As an AVS built on top of the EVM, this P2P order book can be deployed on Unichain and start bringing institutional liqu...Read More
Uniswap

Uniswap

DeFi Innovation on Unichain

Bringing the capital efficiency of order books on-chain, and with it institutional liquidity. As an AVS built on top of ...Read More
Uniswap

Uniswap

Discussion

Builders also viewed

See more projects on Devfolio