uint32 causes a price limitationIn the definition of the Listing struct, the type of price is uint32. This means that the price of a listing can never exceed 2**32-1 (4294967295), which is equivalent to 4294.967295 USDC. This is a critical issue because the app is supposed to allow higher prices than 10,000 USDC, which is the MID_FEE_THRESHOLD. Moreover, if the frontend is not handling type casting correctly, the listing price can be silently truncated, resulting in a loss of funds if the user does not notice it.
Likelihood:
It will happen everytime a user wants to list a NFT at a higher price than 4295 USDC.
Impact:
Price is limited to approximatively 4295 USDC
Frontend can silently truncate user's listing price
The protocol will generate fewer fees than expected
Actors:
Seller: A normal user minting an NFT and trying to sell it
Proof of Code:
Use uint256 for the price of the Listing object.
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.
The contest is complete and the rewards are being distributed.