Navigating the Structure of Seaport (Opensea)
There are over 60 types of trades possible - let me make them simpler for you to understand.
Opensea is one of the oldest and largest NFT marketplaces on Ethereum. In May of 2022, they released a new version of their smart contract protocol, called Seaport. This new protocol forms a “marketplace of marketplaces”, breaking down orders, validation, and execution into composable parts that anyone can deploy and utilize.
I’ve created a dashboard that showcases the 60+ types of orders into a simpler to digest framework. Let’s get into it!
The Basic Concepts Behind Seaport
The idea is that orders can designate a “conduit” their assets flow through with their own custom validation on fulfillment using “zones”. Your need to know the following terms:
Offer: the tokens up for bids/listings
Consideration: the required payment for said tokens (usually three considerations: the token payment, the platform fee, and the royalty fee).
Orderhash: each set of offers that are signed together have a unique hash. This exists off-chain first.
the offer items are approved to the conduit for transfer, and a zone is specified for validating the trade (if needed)
Fulfillment: once someone is willing to pay the consideration items, the order is fulfilled and an onchain transaction occurs.
Conduit: this is the contract tokens are approved to, so it can handle the actual executing of a trade.
conduitKey: each conduit has a hash given to it at creation, referenced in order signing.
Zone: this is the contract that is checked for validation before and after the order goes to the conduit for execution. (Currently only after, the before pre-hook is coming in version 1.6)
zoneHash: the validation requirements are typically hashed and passed to the zone. See validateOrder()
What is important to note is that anyone can deploy a new conduit or zone, while still sharing the same overall Seaport interface.
Any marketplace could have their own “conduits” that tokens are listed on, while also setting up custom “zones” to handle unlocking of said tokens for a trade. Currently the only live conduit besides the Opensea one belongs to PartyBid.
Types of Orders
The order is signed offchain, usually through the Opensea frontend. Here is an example that I’ve pulled using reservoir.asks
in Dune:
{
"kind": "single-token",
"salt": "0x75647e326924a30abb7956a7e96e5e83",
"zone": "0x004c00500000ad104d7dbd00e3ae0a5c00560c00",
"offer": [
{
"token": "0xc4a5025c4563ad0acc09d92c2506e6744dad58eb",
"itemType": 2,
"endAmount": "1",
"startAmount": "1",
"identifierOrCriteria": "37501"
}
],
"counter": "0",
"endTime": 1678398472,
"offerer": "0xdf3c501ef5abefff2d7ce1eb75b205f60c66778a",
"zoneHash": "0x3000000000000000000000000000000000000000000000000000000000000000",
"orderType": 2,
"signature": "0x6887c90ecdd12312d4544f5d4f94c810f358c735c64c50207af839fafd87763e7ab470798fef4cf8042070f3bcf4d8446a53b8d95ccea6d744cb3fae2b5728231c",
"startTime": 1675806472,
"conduitKey": "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
"consideration": [
{
"token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"itemType": 1,
"endAmount": "97500000000000",
"recipient": "0xdf3c501ef5abefff2d7ce1eb75b205f60c66778a",
"startAmount": "97500000000000",
"identifierOrCriteria": "0"
},
{
"token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"itemType": 1,
"endAmount": "2500000000000",
"recipient": "0x0000a26b00c1f0df003000390027140000faa719",
"startAmount": "2500000000000",
"identifierOrCriteria": "0"
}
]
}
Boiling down these variables, we get four main order distinctions:
Order Type:
“Full” means the order needs to be all fulfilled at once. “Partial” means it can be fulfilled in many different transactions.
“Restricted” orders require zone validation, while “Open” orders get to skip the zone validation
Order Settings:
This one gets complex, but on top of restricted/open you have either a contract or wallet (EOA) zone. An EOA zone means that only that wallet can approve the order, making it a “private” order.
Offer/Consideration:
Trades can contain native, erc20, erc721, or erc1155 tokens.
Auction Type:
Most trades are just normal bid/list auctions, but there are also Dutch and English auction implementations.
The dashboard has this chart that makes it easy for you to find examples of every combination of order types. You can check the logic from the query below to see how I come up with these categories:
Covering Seaport history a bit, the change in order type from all restricted to all open is due to seaport 1.1 to 1.2 migration from pausable zones (signed zones).
Unsurprisingly, most orders are just ERC721-native token trades. There was a big boost in ERC1155 trades in 2022 summer during the open editions trend. I think those were also the bulk of the partial orders.
Make sure to check out the dashboard for more trends, and to search for examples by zone and orderhash.
Lifecycle of an Order
In case you’re curious, this is what the execution flow of a Seaport order looks like in practice, where all orders call the Seaport interface contract first:
That’s pretty complex! But hopefully being able to look up trade types and understand the key components makes it easier for you to analyze and build on top of Seaport.
We’re already on Seaport 1.5 now, with 1.6 on the way with even more fancy functions. Follow along in the Seaport Improvement Proposals repo.
Check out Onur ‘s Seaport deep dive as well.