Open sherlock-admin4 opened 5 months ago
The protocol team fixed this issue in the following PRs/commits: https://github.com/Axis-Fi/moonraker/pull/132
The protocol team fixed this issue in the following PRs/commits: Axis-Fi/moonraker#132
Fixed Now FPAM auctions are not prefunded
The Lead Senior Watson signed off on the fix.
dimulski
medium
Unsold tokens from a FPAM auction, will be stuck in the protocol, after the auction concludes
Summary
The
Axis-Finance
protocol allows sellers to create two types of auctions: FPAM & EMPAM. An FPAM auction allows sellers to set a price, and a maxPayout, as well as create a prefunded auction. The seller of a FPAM auction can cancel it while it is still active by calling the cancel function which in turn calls the cancelAuction() function. If the auction is prefunded, and canceled while still active, all remaining funds will be transferred back to the seller. The problem arises if an FPAM prefunded auction is created, not all of the prefunded supply is bought by users, and the auction concludes. There is no way for thebaseTokens
still in the contract, to be withdrawn from the protocol, and they will be forever stuck in theAxis-Finance
protocol. As can be seen from the below code snippet cancelAuction() function checks if an auction is concluded, and if it is the function reverts.Vulnerability Detail
Gist After following the steps in the above mentioned gist add the following test to the
AuditorTests.t.sol
fileTo run the test use:
forge test -vvv --mt test_FundedPriceAuctionStuckFunds
Impact
If a prefunded FPAM auction concludes and there are still tokens, not bought from the users, they will be stuck in the
Axis-Finance
protocol.Code Snippet
Tool used
Manual Review & Foundry
Recommendation
Implement a function, that allows sellers to withdraw the amount left for a prefunded FPAM auction they have created, once the auction has concluded.