Platform: Code4rena
Start Date: 14/04/2022
Pot Size: $75,000 USDC
Total HM: 8
Participants: 72
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 2
Id: 110
League: ETH
Rank: 55/72
Findings: 1
Award: $93.83
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0xDjango, 0xkatana, AmitN, CertoraInc, Dravee, Funen, Hawkeye, Jujic, MaratCerby, Picodes, Ruhum, SolidityScan, TerrierLover, TomFrenchBlockchain, TrungOre, VAD37, Yiko, berndartmueller, cmichel, csanuragjain, danb, defsec, delfin454000, dipp, ellahi, fatherOfBlocks, georgypetrov, gs8nrv, gzeon, horsefacts, hubble, hyh, ilan, jah, joestakey, kebabsec, kenta, kyliek, m9800, minhquanym, oyc_109, p_crypt0, peritoflores, rayn, reassor, remora, rfa, robee, scaraven, securerodd, shenwilly, sorrynotsorry, tchkvsky, teryanarmen, z3s
93.8321 USDC - $93.83
Contract : SettAccessControl.sol
function setGovernance(address _governance) public { _onlyGovernance(); governance = _governance; }
Add a null check for the governance address. Additionally as a best practice the two step standard process for changing the Governance address is recommended. 1st Step : set_new_governor << setting/proposing the address of the new_governor 2nd Step : accept_ownership << the new_governor will execute this function to complete the ownership transfer
The emission rate will be impacted if by mistake a rate is set too high or to 0. There is no check for uppper bound or lower bound for this rate parameter.
Contract : SupplySchedule.sol Function : function setEpochRate
Define min and max values and check during setEpochRate
Contract : StakedCitadelVester.sol Function : initialize()
Add a require statement to check null value for _gac address parameter
Its possible by the governance to set the EpochRate for epocs too far in the future, by mistake. Once set, the rate cannot be undone or changed.
Contract : SupplySchedule.sol
Function : setEpochRate(uint256 _epoch, uint256 _rate)
Allow only setting for next few epocs, alternately set a max epoch in future for which the rates can be set.
The following functions setStrategist, setKeeper does not check for null values of address parameter.
SettAccessControl.setStrategist(address)._strategist (src/lib/SettAccessControl.sol#37) lacks a zero-check on : - strategist = _strategist (src/lib/SettAccessControl.sol#39) SettAccessControl.setKeeper(address)._keeper (src/lib/SettAccessControl.sol#44) lacks a zero-check on : - keeper = _keeper (src/lib/SettAccessControl.sol#46)
Add a requrie statement to check null value for address parameter
There is no check for the input value for the duration in function setVestingDuration in StakedCitadelVester.sol If wrongly set to 0 or a high value, then the vesting schedule will be hugely impacted.
Contract : StakedCitadelVester.sol
function setVestingDuration(uint256 _duration) external onlyRole(CONTRACT_GOVERNANCE_ROLE) { vestingDuration = _duration; emit SetVestingDuration(_duration); }
Add checks for min and max values of the duration value