Platform: Code4rena
Start Date: 09/12/2021
Pot Size: $50,000 USDC
Total HM: 19
Participants: 21
Period: 7 days
Judge: 0xean
Total Solo HM: 14
Id: 61
League: ETH
Rank: 18/21
Findings: 2
Award: $376.14
🌟 Selected for report: 2
🚀 Solo Findings: 0
🌟 Selected for report: defsec
281.6754 USDC - $281.68
defsec
Setter functions for critical contract parameters accessible only by privileged roles e.g. admin should consider adding timelocks (along with emitted events) so that users and other privileged roles can detect upcoming changes and have the time to react to them.
Changes to whitelists, oracle addresses and migrator address may have a financial or trust impact on users who should be given an opportunity to react to them by exiting/engaging without being surprised when such changes are made effective immediately.
See similar Medium-severity finding in ConsenSys's Audit of 1inch Liquidity Protocol (https://consensys.net/diligence/audits/2020/12/1inch-liquidity-protocol/#unpredictable-behavior-for-users-due-to-admin-front-running-or-general-bad-timing)
https://github.com/code-423n4/2021-12-sublime/blob/main/contracts/PriceOracle.sol#L189
https://github.com/code-423n4/2021-12-sublime/blob/main/contracts/PriceOracle.sol#L203
None
Consider adding timelocks to such contracts with critical setter functions.
10.9563 USDC - $10.96
defsec
Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks are available for free.
The advantages of versions 0.8.* over <0.8.0 are:
"All Contracts"
None
Consider to upgrade pragma to at least 0.8.4.
#0 - ritik99
2021-12-26T17:13:17Z
Duplicate of #39
🌟 Selected for report: defsec
83.4956 USDC - $83.50
defsec
The use of _msgSender() when there is no implementation of a meta transaction mechanism that uses it, such as EIP-2771, very slightly increases gas consumption.
_msgSender() is utilized three times where msg.sender could have been used in the following function.
"""
None
Replace _msgSender() with msg.sender if there is no mechanism to support meta-transactions like EIP-2771 implemented.