Submitted by t0x1c, also found by visualbits, MrPotatoMagic, 0xDetermination, MatricksDeCoder, Greed, givn, VAD37, MidgarAudits, Shubham, PedroZurdo, forkforkdog, Draiakoo, 0xCiphky, lil_eth, Velislav4o, ladboy233, cats (1, 2), lanrebayode77, djxploit, Kalogerone, zaevlad, btk, ZanyBonzy, and SpicyMeatball
The mint() function in GameItems.sol constraints a user from minting more than 10 game items in 1 day. This constraint can easily be bypassed since a similar check is missing inside the safeTransferFrom() function:
Missing check:
Note: This could also lead to a situation where a NRN whale having enough funds can buy the complete supply of the game items within minutes by using his multiple alias accounts.
Add the following inside test/GameItems.t.sol and run with forge test --mt test_MintGameItems_FromMultipleAccs_ThenTransfer -vv:
Foundry
Add the same check inside safeTransferFrom() too:
hickuphh3 (judge) commented:
For this audit, 60 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by givn received the top score from the judge.
The following wardens also submitted reports: 0xDetermination, radev_sw, Aamir, lsaudit, peter, rspadi, MrPotatoMagic, vnavascues, AlexCzm, 0xMosh, nuthan2x, PetarTolev, 0xAkira, 7ashraf, rekxor, Blank_Space, juancito, ZanyBonzy, KmanOfficial, 0x11singh99, 0xStriker, DarkTower, DeFiHackLabs, yovchev_yoan, 14si2o_Flint, McToady, immeas, alexzoid, agadzhalov, 0xmystery, 0xBinChook, Bube, forkforkdog, SHA_256, BARW, merlinboii, BigVeezus, offside0011, klau5, Krace, EagleSecurity, oualidpro, kartik_giri_47538, swizz, btk, Rolezn, Tekken, BenasVol, shaflow2, dimulski, jesjupyter, Bauchibred, shaka, cartlex_, yotov721, Timenov, boredpukar, SpicyMeatball, and haxatron.
