When calling OrderBook::getOrderDetailsString
, the function will display the tokenSymbol only for tokens hardcoded in the constructor (iWETH, iWBTC, iWSOL).
If a new token is later added via OrderBook::setAllowedSellToken
, its symbol will not be displayed in the order details string, leading to inconsistent or incomplete UI data for those orders.
LowSeverity: Low
Likelihood: Medium
Impact: Low
Likelihood:
Reason 1
The issue will occur any time a new ERC20 token is added via OrderBook::setAllowedSellToken
.
Impact:
Impact 1
Orders created with newly added tokens will have missing or blank token symbols in the returned order details string.
Impact 2
This can affect frontends or UIs that display token data to users, leading to confusion or reduced trust.
Note: MockCoolToken is a standard ERC20-compatible mock with a mint() function for testing (similar to the other mock tokens).
User creates a sell order with a pre-approved token (e.g., wBTC) using OrderBook::createSellOrder
, and retrieves the order details using OrderBook::getOrderDetailsString
. The returned string includes the token symbol (e.g., wBTC).
The contract owner allows a new token (coolToken) via setAllowedSellToken(address(coolToken), true).
A new user is minted some coolToken, approves the OrderBook, and creates a sell order with it.
The user then calls OrderBook::getOrderDetailsString
for their order.
The returned string is missing the token symbol because OrderBook::getOrderDetailsString
only checks for hardcoded token addresses (iWETH, iWBTC, iWSOL), and does not dynamically fetch the symbol from the ERC20 token interface.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.