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.
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.
Recommendation Consider revising the logic to allow newly transferred fighters to participate in the same round.