When a trade executes, fees are deducted from the payment. All fees are paid by the buyer, and the seller receives the sale price minus the deducted fees.
Fee Units: Fees are specified in the smallest unit of the currency (wei for native tokens, smallest decimal unit for ERC-20s). For example:
The orderbook automatically queries royalty information using the ERC-2981 interface when creating orders
Royalty amounts are re-validated during order fulfillment
zkEVM limitation: Royalties can only be paid to a single wallet address. If you need to split royalties among multiple wallets, contact your Immutable account manager about fee splitter contracts.
For ERC-1155 tokens that support partial fills, taker fees must reflect the full order amount, not the partial fill amount:
Copy
Ask AI
// ❌ WRONG: Scaling fee for partial fillconst listing = { sell: { amount: '10' }, buy: { amount: '1000000000000000000' } }; // 10 items at 0.1 IMX eachconst amountToFill = '5'; // Buying 5 of 10const takerFee = '5000000000000000'; // 0.005 IMX (scaled) - INCORRECT// ✅ CORRECT: Fee for full order amountconst takerFee = '10000000000000000'; // 0.01 IMX (1% of full order) - CORRECT// The orderbook will automatically pro-rate this to 0.005 IMX for the partial fill
For ERC-1155 orders, always provide taker fees for the complete order, even when partially filling. The orderbook automatically pro-rates the fee based on the quantity executed. Setting a scaled-down fee will result in incorrect marketplace compensation.
When fulfilling an order, the orderbook provides up-to-date fee information and validates all fees server-side:
Copy
Ask AI
const { actions, order, expiration } = await orderbookClient.fulfillOrder( orderId, buyerAddress, [] // taker fees array);console.log({ order: order, // Order with CURRENT fees (may differ from listing query) expiration: expiration // Transaction must be submitted within 3 minutes});// User must complete transaction before expiration// After 3 minutes, request new fulfillment data
Important Fee Timing Rules:
Fee changes: Fees at fulfillment time may differ from when the order was queried (e.g., promotional periods with reduced protocol fees)
3-minute expiration: Transaction data expires 3 minutes after generation. After expiration, request new fulfillment data with updated fees.
Display to users: Always show users the final fee breakdown from the fulfillOrder response before they sign, not from the listing query.