Skip to main content

Unit Size

unit_size is a variable that sets the unit amount of trades of each orderbook. Given unit_size, the maximum trade size is capped at (2^64-1) * unit_size. For example, setting the unit_size to 1 for ETH restricts the maximum order size to 18.45 ETH, which is too constraining. This is because ETH is an 18-decimal token, so unit_size of 1, in this case, means that the unit amount of trade is 10^(-18) ETH. For this reason, it is usually recommended to set the unit_size higher, like 10^12, for such assets. Likewise, for assets with small decimals like USDC, unit_size of 1 is recommended.