Platform: Code4rena
Start Date: 23/06/2023
Pot Size: $60,500 USDC
Total HM: 31
Participants: 132
Period: 10 days
Judge: 0xean
Total Solo HM: 10
Id: 254
League: ETH
Rank: 95/132
Findings: 2
Award: $30.89
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: alexweb3
Also found by: D_Auditor, DedOhWale, DelerRH, LuchoLeonel1, Musaka, Neon2835, Silvermist, Timenov, TorpedoPistolIXC41, adeolu, cartlex_, hals, josephdara, koo, lanrebayode77, mahyar, mladenov, mrudenko, pep7siup, zaevlad, zaggle
18.4208 USDC - $18.42
Modifiers onlyRole
and checkRole
do not work, if user has no role, this
GovernanceTimelock.checkOnlyRole(role, msg.sender)
returns false and code will continue execute.
Anyone can call access restricted function
Manual testing
wrap GovernanceTimelock.checkOnlyRole(role, msg.sender)
and GovernanceTimelock.checkRole(role, msg.sender);
in require statement, or use custom errors
Access Control
#0 - c4-pre-sort
2023-07-08T23:29:02Z
JeffCX marked the issue as duplicate of #704
#1 - c4-judge
2023-07-28T17:18:52Z
0xean marked the issue as satisfactory
🌟 Selected for report: JCN
Also found by: 0xAnah, DavidGiladi, MohammedRizwan, Rageur, Raihan, ReyAdmirado, Rolezn, SAAJ, SAQ, SM3_SS, Sathish9098, ayo_dev, dharma09, fatherOfBlocks, hunter_w3b, mgf15, mrudenko, naman1778, shamsulhaq123, souilos, turvy_fuzz
12.4743 USDC - $12.47
https://github.com/code-423n4/2023-06-lybra/blob/5d70170f2c68dbd3f7b8c0c8fd6b0b2218784ea6/contracts/lybra/configuration/LybraConfigurator.sol#L236 https://github.com/code-423n4/2023-06-lybra/blob/5d70170f2c68dbd3f7b8c0c8fd6b0b2218784ea6/contracts/lybra/miner/EUSDMiningIncentives.sol#L94 - the same approach to optimise loop https://github.com/code-423n4/2023-06-lybra/blob/5d70170f2c68dbd3f7b8c0c8fd6b0b2218784ea6/contracts/lybra/miner/EUSDMiningIncentives.sol#L138 - the same approach to optimise loop
name
const insteadsymbol
const insteadAdd custom modifier to withdraw
, mint
, burn
function and move duplicated require
statements there
require(onBehalfOf != address(0), "TZA"); require(amount > 0, "ZA");
https://github.com/code-423n4/2023-06-lybra/blob/5d70170f2c68dbd3f7b8c0c8fd6b0b2218784ea6/contracts/lybra/miner/ProtocolRewardsPool.sol#L39 https://github.com/code-423n4/2023-06-lybra/blob/5d70170f2c68dbd3f7b8c0c8fd6b0b2218784ea6/contracts/lybra/pools/base/LybraEUSDVaultBase.sol#L21 https://github.com/code-423n4/2023-06-lybra/blob/5d70170f2c68dbd3f7b8c0c8fd6b0b2218784ea6/contracts/lybra/pools/base/LybraPeUSDVaultBase.sol#L18 https://github.com/code-423n4/2023-06-lybra/blob/5d70170f2c68dbd3f7b8c0c8fd6b0b2218784ea6/contracts/lybra/pools/base/LybraEUSDVaultBase.sol#L30
totalSupply
directly, this will reduce code size#0 - c4-pre-sort
2023-07-27T22:43:48Z
JeffCX marked the issue as high quality report
#1 - c4-judge
2023-07-27T23:42:20Z
0xean marked the issue as grade-a
#2 - c4-judge
2023-07-27T23:45:15Z
0xean marked the issue as grade-b
#3 - c4-sponsor
2023-07-29T10:59:45Z
LybraFinance marked the issue as sponsor acknowledged