Platform: Code4rena
Start Date: 03/08/2023
Pot Size: $90,500 USDC
Total HM: 6
Participants: 36
Period: 7 days
Judge: 0xean
Total Solo HM: 1
Id: 273
League: ETH
Rank: 34/36
Findings: 1
Award: $36.16
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: MiloTruck
Also found by: 0xbepresent, 0xnev, 0xprinc, HE1M, Mirror, Sathish9098, Udsen, arialblack14, berlin-101, eierina, hals, ktg, nobody2018
36.1616 USDC - $36.16
It is possible to add same members to a council (also possible to add same address to two councils) twice or more times. Also there is no check for array length (12 or not).
The original intention of the SecurityCouncilRemoved
event is to record the removed council. However, the data submitted here consists of references to securityCouncils[i]
.
This results in the remove event consistently recording the last element of the 'securityCouncils' array.
Consider emitting the SecurityCouncilRemoved
event before the array undergoes shifting and popping.
A similar zero address check is already performed within the _addMemberToCohortArray()
for the _addressToAdd
parameter. So the additional check for _addressToAdd
is unnecessary.
// this only checks against
the currentthe current other cohort, and against the current cohort membership
// revoke old security council cancel role; it is unnecessary
to grant itto explicitly grant it to new security council since the security council can already cancel via the core governor's relay method.
#0 - c4-judge
2023-08-18T23:28:41Z
0xean marked the issue as grade-b