Aori Protocol Documentation
Welcome to the Aori Protocol documentation, your comprehensive guide to exploring crypto's newest high-performance order book protocol. Navigate your way through these docs to learn everything there is to know about Aori.
Resources
Traders
From retail traders to institutions, learn the high level of how trading on Aori works.
Developers
The ins and outs of the Aori protocol, learn how to integrate with our tech stack.
What Is Aori
Aori is a maker-oriented high-frequency off-chain order book offering non-custodial, on-chain settlement for spot trading.
Our thesis is that sophisticated market makers, HFT firms and MEV searchers are the best players to price on-chain liquidity efficiently. A truly efficient trading environment must empower these crucial market participants with sufficient trading guarantees (zero counterparty risk, non-custodial trustlessness, zero slippage, no order stealing, etc.) and must not impede on their liberties.
We provide market makers with a number of capabilities that aren’t provided to them currently when operating on-chain:
- Intra-block price pre-confirmations
- Gasless order creation and cancellation
- Traditional limit order dynamics
- Protection from frontrunning, sandwiching, order stealing whilst preserving transaction visibility
- Ability to settle the orders directly on-chain (without needing to bridge) and collect any MEV
- Liquidity can be provided just-in-time
Our on-chain settlement contract currently wraps around Seaport, OpenSea’s settlement smart contract. Most will recognize Seaport for the trading of ERC721s (NFTs) for ERC20s (tokens), but it also contains the functionality to directly trade ERC20 tokens for ERC20 tokens. We built on top of Seaport to reuse its safety properties, testing infrastructure, and decentralisation guarantees.
The perfect trading and settlement platform.
Transfer assets between two counterparties without the need for escrow in one transaction.
Aori is a next generation on-chain trading application that:
- Simplifies clearing between known counter-parties
- Enables CEX speeds with no exchange risk
- Sell large quantities of tokens without the need to manually trade directly on an exchange.
- Works out of the box with on-chain primitives like flash-loans and LP tokens
Historically trades have cleared through centralized exchanges or brokers trusting one another. Now, traders can settle and place simple swaps or block trades through the trust-less Aori Aoribook. The Aori orderbook under the hood uses Seaport for guaranteed swaps, ensuring both parties in the same block transfer their assets, or else the transaction fails. This ensures no counterparty has the uncomfortable burden of sending their assets first, or trusting a centralized exchange for holding 1:1 reserves.
This benefits both:
MEV Searchers
- Searchers can now bypass the capital and infrastructure requirements historically needed to compete in the CEX-DEX arbitrage space. Rather than running a block builder and having the large amounts of capital in reserve on CEX’s to close the second leg of a trade, searchers can simply pull from the Aori orderbook and execute flash trades and liquidations using on-chain orders.
Centralized Exchange Liquidity Providers
- CEX liquidity providers can plug into Aori exactly the same way they would with a CEX API, know that unlike most CEX’s takers are what is actually in excess due to the ability for Searchers to flash take most orders near the top of book.
How it Works
Aori utilizes seaport.sol to handle order placement and execution. A maker on order is simply a signature containing the order information and an approval for a taker to execute an transaction of the order information parameters, this allows makers to gas-lessly and without fees place and cancel orders. Additionally, the maker retains custody of the assets they've listed for sale until the time of execution by a taker.
When a taker fulfills an order it is removed from the orderbook upon the receipt of the API call, enabling taking without on-chain confirmation. A server signature is then generated and provided to the taker to fill the order within a set number of blocks dependent upon the intended chain. If the taker does not fill the order within that time the signature becomes invalid and the order is returned to the orderbook. To avoid DDOS attacks takers are limited in the number of orders they are able to take without on-chain events confirming the fulfillment of that order.
Aori uses an off chain database to log and store the seaport signatures and embedded order information and provides an off chain server generated key for every order to allow takers to execute orders.
Aori supports the following chains: Ethereum Mainnet, Arbitrum one, Avalanche C-Chain, Polygon, Binance Smart Chain, and Optimism.