In the Swan contract, within the relist() function, there is a check to ensure that an asset can only be relisted after the round in which it was originally listed has ended. The current implementation uses a less-than-or-equal-to (<=) condition to compare the current round with the round when the asset was originally listed.
However, using '<=' is unnecessary and potentially misleading. The condition should only check for equality (==) to determine whether the current round is the same as the round in which the asset was listed.
Additionally, the variable name oldRound
is misleading because it represents the current round of the buyer agent, not an "old" round. A more appropriate name would be currentBuyerRound
or buyerRound
.
Unnecessary Condition: Using <= instead of == adds unnecessary complexity to the logic.
Misleading Variable Name: The variable name oldRound suggests that it refers to a past round, but it actually represents the current round of the buyer agent.
Manual review
Change Condition from <= to ==
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.