Platform: Code4rena
Start Date: 27/01/2022
Pot Size: $90,000 USDC
Total HM: 21
Participants: 33
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 14
Id: 78
League: ETH
Rank: 16/33
Findings: 2
Award: $1,100.85
🌟 Selected for report: 1
🚀 Solo Findings: 0
🌟 Selected for report: CertoraInc
Also found by: Randyyy
Randyyy
A user can stake their token by calling stake function, by supplying a token, however staking 0 amount token is allowed, staking 0 amount will reset the reward debt, without minting a single flan token, the function will treat as if the user do the staking for the first time, and didn't get any reward.
https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/Limbo.sol#L451
#0 - gititGoro
2022-02-10T03:59:29Z
duplicate of issue 146
#1 - jack-the-pug
2022-02-27T08:12:06Z
Dup #146
Randyyy
By saving array length to variable the loop does not have to get the array length value each loop and can save gas
https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L212 https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L217
uint counter = sushiLPs.length for (uint256 i = 0; i < counter; i++) { require(UniPairLike(sushiLPs[i]).factory() == sushiFactory, "LimboDAO: invalid Sushi LP"); if (IERC20(eye).balanceOf(sushiLPs[i]) > 1000) assetApproved[sushiLPs[i]] = true; fateGrowthStrategy[sushiLPs[i]] = FateGrowthStrategy.indirectTwoRootEye; }
#0 - gititGoro
2022-02-08T22:16:13Z
Duplicate of issue 12
🌟 Selected for report: robee
Also found by: Randyyy, Tomio, rfa, sirhashalot
22.9602 USDC - $22.96
Randyyy
Since this function does not change sushiLPs and uniLPs parameter its cheaper to use calldata instead memory
https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L204 https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L205
Remix
Change memory to call data
#0 - jack-the-pug
2022-02-27T13:10:39Z
Dup #22
🌟 Selected for report: Randyyy
174.9751 USDC - $174.98
Randyyy
Save gas, because Using type(uint).max is cheaper than using calculation 2**256 - 1
.
https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/FlanBackstop.sol#L36
##Navigation
constructor( address dao, address flan, address pyroFlan ) Governable(dao) { config.pyroFlan = pyroFlan; config.flan = flan; IERC20(flan).approve(pyroFlan, type(uint).max); }
#0 - gititGoro
2022-07-04T14:43:08Z