The sellErc20
function in Solidity enables a user to create a sell order for a specified amount of ERC20 tokens pegged to a specific NFT address
In the current implementation of the sellErc20
function, there's an important oversight: the function does not establish a direct relationship between the price and the amount of ERC20 tokens being sold. This missing link can lead to ambiguity and potential misinterpretation when users create sell orders.
The price
is The price of all the tokens to sell, but in code there is not logic for that:
And the price
is not dependend from amount
.
Is possible to buy eg. 100 tokens with 1 wei.
manual review
Please add logic:
}
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.