Platform fee (including referral bouns) and trade tax is not refunded to user if maker abort the offer.
When a user creates taker to fill a ask offer, they pay platform fee and trade tax along with deposited collaterals.
When the offer is aborted by the maker, user can call abortBidTaker to abort the taker and the deposited collaterals will be refunded to the user.
However, the platform fee and trade tax are not refunded, user will lose the funds for nothing, and a malicious maker can back-run the taker to abort the offer, take advantage of the user and steal trade tax.
Image the following scenario:
Alice creates an ask offer, eachTradeTax is ;
Bob creates taker against the offer, pays collaterals, trade tax and platform fee (platform fee rate is );
Alice back-runs bob to abort ask offer;
Bob calls to abort bid taker, his deposited collaterals are refunded but the platform fee and trade tax are not returned;
Alice still owns trade tax paid by Bob.
Please follow the steps to run PoC:
Change Line 671 - 675 to below (this is to fix another issue in the codebase):
Run the following test case in PreMarkets.t.sol
User pays fees for nothing, a malicious maker can steal funds from the user.
Manual Review
Platform fee and trade tax should be refunded to user is the offer is aborted.
Valid high severity, given orginal offer makers are not a trusted entity to enforce a settlement. The trade tax set by the maker should be returned back to the takers to avoid abuse of abortion of ask offers to steal trade tax from takers. Note for appeals period: See issue #528 for additional details
Valid high severity, given orginal offer makers are not a trusted entity to enforce a settlement. The trade tax set by the maker should be returned back to the takers to avoid abuse of abortion of ask offers to steal trade tax from takers. Note for appeals period: See issue #528 for additional details
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.