The getOrderDetailsString
function is designed to return a formatted string with order details including readable token symbols to provide a good user experience when displaying order information.
The function only handles symbol resolution for a hardcoded set of tokens (wETH, wBTC, wSOL), leaving the tokenSymbol
variable empty for any newly added tokens, resulting in incomplete order details display.
Likelihood:
This issue will occur whenever new tokens are added to the order book system via setAllowedSellToken
and users query order details for these tokens
The problem manifests immediately upon adding new tokens without any additional configuration requirements
Impact:
Poor user experience due to missing or incomplete token information in order details
Potential confusion for users trying to understand order information through the interface
Reduced usability of the order book system for newly supported tokens
Inconsistent display formatting between core tokens and newly added tokens
This test demonstrates how newly added tokens display without proper symbol information:
Implement dynamic symbol resolution using the ERC20 metadata interface with proper error handling for tokens that don't implement the symbol function:
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.