Once the auction ends, users can no longer withdraw their bids, even if they do not win any tokens (e.g., if the total number of bids is zero). This could result in locked funds if users bid but don't receive any tokens.
users who place bids but do not win any tokens (e.g., if there are no tokens left for distribution or if their bid does not entitle them to any tokens) are unable to withdraw their FjordPoints after the auction ends. This could result in locked funds for participants who didn't win any tokens, which could be seen as unfair and lead to frustration.
Allow users to withdraw their bids after the auction ends if they haven't claimed any tokens.
You can achieve this by modifying the claimTokens
function to allow users to withdraw their FjordPoints if they don't receive any tokens. Here's how you can implement it:
1 Track Claimed Status: Add a mapping to track whether a user has already claimed their tokens or not. This will allow users who haven't received any tokens to withdraw their FjordPoints after the auction ends.
2 Modify the claimTokens
Function: Adjust the claimTokens
function to allow users to withdraw their bids if their claimable
amount is zero. This ensures that users can recover their FjordPoints if they didn't receive any tokens.
3 Ensure Withdrawals Work for All Scenarios: Consider adding a separate function that users can call to withdraw their bids if they haven't claimed any tokens. This function would be useful in scenarios where they decide not to claim tokens and would prefer to retrieve their FjordPoints instead
hasClaimed Mapping: This keeps track of whether a user has claimed their tokens or withdrawn their bid. It prevents users from claiming tokens multiple times or withdrawing after claiming tokens.
Zero Claimable Handling: If the user has no tokens to claim (i.e., their claimable
amount is zero), they are allowed to withdraw their FjordPoints instead.
Separate Withdrawal Function: Providing a separate function ensures that users can manually withdraw their bids if they choose not to claim any tokens after the auction ends.
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.