DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: medium
Valid

Auction refund will be lost

Summary

Auction refund will be lost since it is refunded back the factory

Vulnerability Details

In case the auction ends with 0 bids, the auction token is transferred to the owner. But the owner is incorrectly set as the fjord auction factory which has no way to recover the refunded tokens causing those tokens to be forever lost

https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordAuction.sol#L192-L194

function auctionEnd() external {
-----------snip
if (totalBids == 0) {
auctionToken.transfer(owner, totalTokens);
return;

https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordAuction.sol#L120C1-L134C28

constructor(
address _fjordPoints,
address _auctionToken,
uint256 _biddingTime,
uint256 _totalTokens
) {
if (_fjordPoints == address(0)) {
revert InvalidFjordPointsAddress();
}
if (_auctionToken == address(0)) {
revert InvalidAuctionTokenAddress();
}
fjordPoints = ERC20Burnable(_fjordPoints);
auctionToken = IERC20(_auctionToken);
owner = msg.sender;

Impact

Assets are lost forever if there are no bids

Tools Used

Manual review

Recommendations

Refund to the correct address instead of the auction factory contract

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

If no bids are placed during the auction, the `auctionToken` will be permanently locked within the `AuctionFactory`

An auction with 0 bids will get the `totalTokens` stuck inside the contract. Impact: High - Tokens are forever lost Likelihood - Low - Super small chances of happening, but not impossible

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.