Platform: Code4rena
Start Date: 28/10/2021
Pot Size: $30,000 ETH
Total HM: 8
Participants: 19
Period: 3 days
Judge: leastwood
Total Solo HM: 4
Id: 47
League: ETH
Rank: 10/19
Findings: 2
Award: $1,222.48
🌟 Selected for report: 5
🚀 Solo Findings: 0
🌟 Selected for report: pauliax
503.2365 USDC - $503.24
pauliax
There are many external risks (mentioned https://github.com/code-423n4/2021-10-badgerdao#risks) so my suggestion is that you should consider making the contracts pausable, so in case of an unexpected event, the governance can pause transfers.
Consider making contracts Pausable https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/Pausable.sol
#0 - dapp-whisperer
2021-11-02T23:21:20Z
I agree, we will implement this functionality
26.436 USDC - $26.44
pauliax
'immutable' greatly reduces gas costs. There is a variable that does not change so it can be marked as immutable to improve the gas costs: ERC20Upgradeable public ibbtc;
#0 - dapp-whisperer
2021-11-05T20:01:10Z
We can't use immutables unfortunately due to using proxy/logic split
🌟 Selected for report: pauliax
97.9112 USDC - $97.91
pauliax
You import ICore interface but actually need only one function from it: pricePerShare(). Consider importing a minimal ICore interface with only the functions that you actually use to reduce deployment gas costs. Or you can just simply re-use ICoreOracle.
44.0601 USDC - $44.06
pauliax
modifier onlyOracle in WrappedIbbtc is never used, so can be removed to reduce deployment gas costs.
🌟 Selected for report: pauliax
97.9112 USDC - $97.91
pauliax
functions mint, burn, transfer and transferFrom could skip other steps if the amount is 0.
226.4564 USDC - $226.46
pauliax
function balanceToShares should handle a case when pricePerShare drops to 0. Currently, this will produce a runtime division by zero error. While in theory, this is an unlikely scenario but in practice, you should consider returning 0 in such a case.
Return 0 if pricePerShare is 0.
#0 - 0xleastwood
2021-12-04T09:20:03Z
#70
pauliax
function updatePricePerShare declares to return something but actually does not return anything: function updatePricePerShare() public virtual returns (uint256)
This may confuse callers.
Probably the intention was to return pricePerShare.
#0 - tabshaikh
2021-11-03T15:15:50Z
Duplicate: #85