Aori's Settlement Infrastructure

Introduction to Aori's Settlement Layer

Aori utilizes Seaport.sol, a clearing layer originally designed for NFT trades by OpenSea, to manage order placement and execution. This integration allows Aori to offer unique features, such as gas-less order creation and cancellation, traditional limit order dynamics, and direct on-chain settlement.

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.

Seaport as Settlement and Intent Layer

We use Seaport for both defining our limit order intents and the settlement of them. Users sign off these intent objects into signatures.

Seaport is renowned for its ability to facilitate the transfer of various token types. Aori, to our knowledge, is among the first to build a dedicated DEX for ERC20 swaps atop Seaport. This integration ensures:

Security: Aori's orders contain both the order details and a user-generated signature of these details. This structure prevents any external platform from altering a user's order post-creation, ensuring that the only potential risk is censorship.

Gasless Cancellations: A unique feature in Aori, made possible by a router contract that adds extra security layers on top of Seaport.

Order Execution: The AoriProtocol.sol smart contract requires three inputs for trade settlement: the order details, the user signature, and a server-generated signature. This structure ensures that only the intended parties can execute the order and within the specified parameters.

Any intent and intent settlement layer like Seaport can be used for Order, as long as they follow these assumptions:

  • A user’s signature of an intent is deterministic - a user’s signature must be re-computable with that wallet’s private key and the intent object and must return the same result.
  • A user’s signature of an intent is unique - there must be no collisions.

By using Seaport as an intent and intent settlement layer that fulfills the above assumptions, it is not possible for us to edit a user’s orders or their signature will become invalid to use. We inherit Seaport’s guarantees of not being able to steal user assets without a user’s intent and merely be a matching engine for makers and takers to be matched - this is alike the guarantees of a centralized sequencer.

For censorship resistance, Seaport enables users to also cancel orders globally should they believe that the matching engine is censoring the user’s orders. As Order’s trades are done in a non-custodial fashion, users always have access to their funds to trade on another venue.

In the future, we may have plans to support other intent schemes to facilitate more advanced ways of trading.