code-423n4 / 2024-02-ai-arena-findings

4 stars 3 forks source link

Upgraded Q -> 2 from #1931 [1710921564849] #2087

Closed c4-judge closed 8 months ago

c4-judge commented 8 months ago

Judge has assessed an item in Issue #1931 as 2 risk. The relevant finding follows:

[L-04] Unstaked transferred fighter is unusable in the same roundId When a user unstakes their NRNs and then decides to sell/transfer their fighter to another user, they must wait until the next round to restake and enter the ranked battle.

POC:

Alice has fighter 1 and stakes 100 NRNs. Alice unstakes 100 NRNs. Alice sells fighter 1 to Bob on OpenSea. Bob cannot stake NRNs, thus cannot enter the ranked battle in the same round. unstakeNRN sets hasUnstaked to true.

stakeNRN check only if tokenId and roundId have been unstaked.

require(hasUnstaked[tokenId][roundId] == false, "Cannot add stake after unstaking this round");

Recommendation Consider revising the logic to allow newly transferred fighters to participate in the same round.

c4-judge commented 8 months ago

HickupHH3 marked the issue as duplicate of #1289

c4-judge commented 8 months ago

HickupHH3 marked the issue as partial-25

c4-judge commented 8 months ago

HickupHH3 marked the issue as not a duplicate

c4-judge commented 8 months ago

HickupHH3 marked the issue as unsatisfactory: Invalid

HickupHH3 commented 8 months ago

intended behaviour