Issue:
All auction contracts assume biddingToken is an ERC20 and rely exclusively on IERC20 / SafeERC20 for value transfers.
There is no support for native ETH (or the chain’s native currency), and token addresses are assumed to always be contracts.
Why It’s Critical:
Users commonly want to bid using native ETH rather than wrapped tokens (e.g., WETH).
The current design prevents ETH-based auctions and incorrectly treats address(0) as an invalid token.
Affected Areas
Files:
Auction.sol
AllPayAuction.sol
EnglishAuction.sol
VickreyAuction.sol
LinearReverseDutchAuction.sol
ExponentialReverseDutchAuction.sol
Repeated Assumption (example):
receiveERC20(auction.biddingToken, msg.sender, bidAmount);
Required Refactor;
Fix Overview:
- If the token address is address(0), interpret it as native ETH, not an ERC20 token.
Key Changes Required:
- Make
createAuction, bid, and commitBid functions payable
- Update
receiveERC20 and sendERC20 helpers to branch on token type
Example Direction:
if (token == address(0)) {
require(msg.value == amount, "Invalid ETH value");
} else {
IERC20(token).safeTransferFrom(from, address(this), amount);
}
if (token == address(0)) {
(bool ok, ) = to.call{ value: amount }("");
require(ok, "ETH transfer failed");
} else {
IERC20(token).safeTransfer(to, amount);
}
Impact of Fix
-
Allows users to bid using native ETH (no WETH needed)
-
Makes bidding easier and more familiar for users
-
Handles ETH and tokens in one shared transfer flow
-
Affects all bid, withdraw, and claim logic across auctions
@kaneki003 What's your view on this , feel free to assign
Issue:
All auction contracts assume
biddingTokenis an ERC20 and rely exclusively onIERC20/SafeERC20for value transfers.There is no support for native ETH (or the chain’s native currency), and token addresses are assumed to always be contracts.
Why It’s Critical:
Users commonly want to bid using native ETH rather than wrapped tokens (e.g., WETH).
The current design prevents ETH-based auctions and incorrectly treats
address(0)as an invalid token.Affected Areas
Files:
Auction.solAllPayAuction.solEnglishAuction.solVickreyAuction.solLinearReverseDutchAuction.solExponentialReverseDutchAuction.solRepeated Assumption (example):
Required Refactor;
Fix Overview:
Key Changes Required:
createAuction,bid, andcommitBidfunctionspayablereceiveERC20andsendERC20helpers to branch on token typeExample Direction:
Impact of Fix
Allows users to bid using native ETH (no WETH needed)
Makes bidding easier and more familiar for users
Handles ETH and tokens in one shared transfer flow
Affects all bid, withdraw, and claim logic across auctions
@kaneki003 What's your view on this , feel free to assign