Settlement
The TradeMatched
event is sent after a market maker has been matched with the taker based on whether a successful market order has been matched.
{
"tradeId": "aori-7qn8l",
"event": "TradeMatched",
"data": {
"orderType": "limit", // can be "limit" or "rfq",
"makerOrder": { ... }, // <AoriOrder>
"takerOrder": { ... }, // <AoriOrder>
"matching": {
// These matching details are necessary to execute the trade on-chain.
// Normally, the executor can just use the `to`, `value`, and `data` fields
// for this, but in the case of a hook, the executor may need to use these
// fields to construct new calldata.
"makerSignature": "0x123...",
"takerSignature": "0x123...",
"feeTag": "aori",
"feeRecipient": "0x123...",
},
"matchingSignature": "0x123...",
"chainId": 42161,
"zone": "0x123...",
"to": "0x123",
"value": 1000000000000000000,
"data": "0x123",
},
"timestamp": 1714285714,
}
The winning market maker or solver will then execute the order on-chain using the to
, value
, and data
fields. This can be a direct transaction or a call to the contract in an embedded call e.g multicall.
The TradeSettled
event is sent after the trade has been settled on-chain.
{
"tradeId": "aori-7qn8l",
"event": "TradeSettled",
"data": {
"orderType": "limit", // can be "limit" or "rfq",
"makerOrder": { ... }, // <AoriOrder>
"takerOrder": { ... }, // <AoriOrder>
"transactionHash": "0x123...",
},
"timestamp": 1714285714,
}