Platform: Code4rena
Start Date: 09/02/2024
Pot Size: $60,500 USDC
Total HM: 17
Participants: 283
Period: 12 days
Judge:
Id: 328
League: ETH
Rank: 155/283
Findings: 1
Award: $13.63
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xDetermination
Also found by: 0x11singh99, 0xAnah, 0xRiO, JcFichtner, K42, MatricksDeCoder, McToady, PetarTolev, Raihan, SAQ, SM3_SS, SY_S, Timenov, ahmedaghadi, al88nsk, dharma09, donkicha, emrekocak, favelanky, hunter_w3b, judeabara, kiqo, lrivo, lsaudit, merlinboii, mikesans, offside0011, oualidpro, peter, rekxor, shamsulhaq123, unique, yashgoel72, yovchev_yoan, ziyou-
13.6293 USDC - $13.63
roundId
in a memory variable inside RankedBattle::_addResultPoints()
to avoid storage readsRankedBattle::_addResultPoints()
makes use of this variable multiple times inside his logic so, caching it in a memory variable, could help saving some gas.
VoltageManager::VoltageRemaining
event inside VoltageManager::useVoltageBattery
The value of the voltage
parameter will always be 100 in this case so it is a waste of gas to read that from storage.
Either make the literal 100 a constant variable (like FULL_VOLTAGE_CAPACITY
) and emit that in the event, otherwise just emit the literal 100 instead of reading it from the ownerVoltage
mapping.
ownerVoltage[msg.sender] = 100; // this can become a constant variable emit VoltageRemaining(msg.sender, ownerVoltage[msg.sender]);
Cache the length of the first array and use it to compare with the rest.
uint256 len = mintpassIdsToBurn; require( mintPassDnas.length == len && fighterTypes.length == len && modelHashes.length == len && modelTypes.length == len )
#0 - raymondfam
2024-02-25T21:48:01Z
3G
#1 - c4-pre-sort
2024-02-25T21:48:07Z
raymondfam marked the issue as sufficient quality report
#2 - c4-judge
2024-03-19T07:50:10Z
HickupHH3 marked the issue as grade-b