Open sherlock-admin3 opened 7 months ago
prefundingRefund = 0
totalInLessFees = 0
All points to same underlying root cause of such tokens not allowing transfer of zero, so duplicating them. Although this involves a specific type of ERC20, the impact could be significant given seller's fund would be locked permanently
The protocol team fixed this issue in the following PRs/commits: https://github.com/Axis-Fi/moonraker/pull/142
The protocol team fixed this issue in the following PRs/commits: Axis-Fi/moonraker#142
Fixed Now Transfer library only transfers token if amount > 0
The Lead Senior Watson signed off on the fix.
KiroBrejka
high
[M-1] - Seller's
quoteToken
may remain locked in the protocol under certain conditionsSummary
Seller's funds may remain locked in the protocol, because of revert on 0 transfer tokens. In the README.md file is stated that the protocol uses every token with ERC20 Metadata and decimals between 6-18, which includes some revert on 0 transfer tokens, so this should be considered as valid issue!
Vulnerability Detail
in the
AuctionHouse::claimProceeds()
function there is the following block of code:Since the batch auctions must be prefunded so
routing.funding
shouldn’t be zero unless all the tokens were sent in settle, in which casepayoutSent
will equalsold_
. From this we make the conclusion that it is possible forprefundingRefund
to be equal to 0. This means if therouting.baseToken
is a revert on 0 transfer token the seller will never be able to get thequoteToken
he should get from the auction.Impact
The seller's funds remain locked in the system and he will never be able to get them back.
Code Snippet
The problematic block of code in the
AuctionHouse::claimProceeds()
function: https://github.com/sherlock-audit/2024-03-axis-finance/blob/main/moonraker/src/AuctionHouse.sol#L604-L613Transfer::transfer()
function, since it transfers thebaseToken
: https://github.com/sherlock-audit/2024-03-axis-finance/blob/main/moonraker/src/lib/Transfer.sol#L49-L68Tool used
Manual Review
Recommendation
Check if the
prefundingRefund > 0
like this: