Platform: Code4rena
Start Date: 17/03/2023
Pot Size: $36,500 USDC
Total HM: 10
Participants: 98
Period: 3 days
Judge: leastwood
Total Solo HM: 5
Id: 223
League: ETH
Rank: 92/98
Findings: 1
Award: $12.03
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xSmartContract
Also found by: 0xdaydream, 0xnev, Aymen0909, Deekshith99, Diana, EvanW, Fanz, JCN, Jerry0x, K42, Kresh, Madalad, MiniGlome, Polaris_tow, Rageur, ReyAdmirado, Rolezn, SAAJ, SaeedAlipoor01988, Sathish9098, Shubham, Udsen, Viktor_Cortess, Walter, anodaram, arialblack14, atharvasama, caspersolangii, codeslide, descharre, fatherOfBlocks, felipe, ginlee, igingu, lukris02, nadin, slvDev, tnevler, turvy_fuzz, viking71
12.034 USDC - $12.03
_bio
length check is incorrect in Bio.sol
Based on the given README
, bio should be shorter than 200 characters not shorter than or equal to 200 characters. But the check in mint
function is incorrect. Instead of bytes(_bio).length >= 200
it is bytes(_bio).length > 200
.
Changing this will also save gas from 705 to 699 in mint
function
Change the if statement like below
if (bytes(_bio).length == 0 || bytes(_bio).length >= 200) revert InvalidBioLength(bytes(_bio).length);
#0 - 0xleastwood
2023-04-10T23:54:21Z
I guess this is technically correct.
#1 - c4-judge
2023-04-10T23:54:25Z
0xleastwood marked the issue as grade-b