The TokenDivider::buyOrder
function allows users to send any amount of ETH, then it substracts from this amount the order.price
and calculated fees
. What is left over from the original sent amount of ETH will be forever stuck in the contract. There is no withdraw or send ETH function back to the user.
All the extra ETHER sent to the TokenDivider::buyOrder
will the stuck in the contract forever.
Manual review
USER mints nft and divides it, approves the erc20 tokens to the tokenDivider contract and sets up a sell order using TokenDivider::sellErc20
USER2 then calls TokenDivider::buyOrder
with more than enough ETH balance
Function TokenDivider::buyOrder
calculates how much of the sent ETH balance from USER2 should be sent to the seller and how much to the owner of the contact. The rest of the sent ETH is stuck in the TokenDivider
contract.
PoC Code
Add following test:
To prevent this, we should send back the left over ETH amount to the buyer
.
The extra eth sent by the user in the buy order will be locked in the contract forever
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.