Order struct contains all necessary information to execute a trade on-chain.
Order Struct Definition
The complete Order struct is defined inOrderStructs.sol:
OrderStructs.sol
Field Descriptions
salt
salt
Unique Salt
Type:uint256Purpose: Ensures entropy and uniqueness for each order, even if all other parameters are identical.The salt allows users to create multiple orders with the same parameters while ensuring each order has a unique hash. This is critical for proper order tracking and cancellation.
maker
maker
Maker Address
Type:addressPurpose: The address that creates the order and is the source of funds.- For BUY orders: The maker provides collateral (C)
- For SELL orders: The maker provides outcome tokens (A or A’)
The maker’s assets are transferred from this address when the order is matched.
signer
signer
Signer Address
Type:addressPurpose: The address that signs the order.- For
SignatureType.EOA: Must be the same asmaker - For
SignatureType.POLY_PROXY: The EOA that owns the proxy wallet - For
SignatureType.POLY_GNOSIS_SAFE: The EOA that owns the Gnosis Safe - For
SignatureType.POLY_1271: Must be the same asmaker(smart contract)
taker
taker
Taker Address
Type:addressPurpose: Specifies who can fill this order.- Zero address (
0x0): Public order that anyone can fill - Specific address: Private order that only the specified address can fill
tokenId
tokenId
Token ID
Type:uint256Purpose: Identifies the CTF ERC1155 outcome token being traded.The interpretation depends on the order side:- BUY orders:
tokenIdis the asset to be bought (maker receives this) - SELL orders:
tokenIdis the asset to be sold (maker provides this)
Token IDs are generated by the Conditional Tokens Framework based on condition and partition data.
makerAmount
makerAmount
Maker Amount
Type:uint256Purpose: The maximum amount of tokens the maker is willing to sell/provide.- BUY orders: Amount of collateral (C) the maker provides
- SELL orders: Amount of outcome tokens (A or A’) the maker provides
This represents the maker’s commitment. Orders can be partially filled, so the actual amount transferred may be less.
takerAmount
takerAmount
Taker Amount
Type:uint256Purpose: The minimum amount of tokens the maker expects to receive.- BUY orders: Amount of outcome tokens (A or A’) the maker expects
- SELL orders: Amount of collateral (C) the maker expects
expiration
expiration
nonce
nonce
Nonce
Type:uint256Purpose: Used for on-chain order cancellations.The nonce system allows users to:- Cancel individual orders by incrementing the nonce
- Cancel multiple orders simultaneously by using nonce ranges
When a nonce is invalidated on-chain, all orders with that nonce become unfillable.
feeRateBps
feeRateBps
Fee Rate (Basis Points)
Type:uint256Purpose: Fee rate charged to the order maker, expressed in basis points.- 1 BPS = 0.01%
- 100 BPS = 1%
- Maximum: 1000 BPS = 10%
Fees are always charged on proceeds (what you receive), not on what you provide. See Fee Structure for detailed calculations.
side
side
Side (BUY or SELL)
Type:Side enumPurpose: Indicates whether the maker is buying or selling outcome tokens.OrderStructs.sol
signatureType
signatureType
Signature Type
Type:SignatureType enumPurpose: Specifies how the order signature should be validated.OrderStructs.sol
signature
signature
Signature
Type:bytesPurpose: The cryptographic signature proving the order was authorized by the signer.The signature format and validation method depend on the signatureType:- EOA: Standard ECDSA signature
- POLY_PROXY: ECDSA signature + proxy ownership verification
- POLY_GNOSIS_SAFE: ECDSA signature + safe ownership verification
- POLY_1271: EIP-1271 contract signature
EIP-712 Type Hash
The order is hashed using the following EIP-712 type hash:OrderStructs.sol
Supporting Enums
Side
SignatureType
Order Status Tracking
The exchange tracks order status using theOrderStatus struct:
OrderStructs.sol
isFilledOrCancelled: Whether the order is completely filled or has been cancelledremaining: Remaining maker amount that can still be filled
Related Resources
Matching Scenarios
Learn how orders are matched in different scenarios
Fee Structure
Understand how fees are calculated
Signature Types
Explore different signature validation methods