Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: low
Invalid

The parameters are incorrect when revert BuyLimitExceeded

Summary

The parameters are incorrect when call revert BuyLimitExceeded

Vulnerability Details

In function purchase()of contract BuyerAgent.sol, it will call revert BuyLimitExceededwhen the spender is exceed than the limit of this round.

But it use the wrong paramter.

/// @notice Asset count limit exceeded for this round
error BuyLimitExceeded(uint256 have, uint256 want);

The first parameter is have should be amountPerRound and the second parameter is want should be spendings[round].
But actually the code of purchase is below.

revert BuyLimitExceeded(spendings[round], amountPerRound);`

Impact

This issue will provide wrong information to the owner of buyer agent.

Tools Used

mannul review

Recommendations

revert BuyLimitExceeded(amountPerRound, spendings[round]);
Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!