Skip to main content

Overview

The Fees mixin provides simple utilities related to setting and retrieving the maximum fee rate that can be applied to orders. The maximum fee rate is hardcoded at 1000 basis points (10%). Source: src/exchange/mixins/Fees.sol

Constants

MAX_FEE_RATE_BIPS

uint256 internal constant MAX_FEE_RATE_BIPS = 1000
The maximum fee rate that can be signed into an order, expressed in basis points. This equals 1000 bips or 10%.

Functions

getMaxFeeRate

function getMaxFeeRate() public pure override returns (uint256)
Returns the maximum fee rate for an order.

Returns

  • uint256: The maximum fee rate in basis points (1000 = 10%)

Events

FeeCharged

event FeeCharged(address indexed receiver, uint256 tokenId, uint256 amount)
Emitted when a fee is charged during order execution.

Parameters

  • receiver (address): The address receiving the fee
  • tokenId (uint256): The token ID for which the fee was charged
  • amount (uint256): The amount of the fee

Errors

FeeTooHigh

error FeeTooHigh()
Thrown when an order specifies a fee rate higher than the maximum allowed rate.