Platform: Code4rena
Start Date: 12/07/2022
Pot Size: $35,000 USDC
Total HM: 13
Participants: 78
Period: 3 days
Judge: 0xean
Total Solo HM: 6
Id: 135
League: ETH
Rank: 62/78
Findings: 1
Award: $44.26
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: joestakey
Also found by: 0x1f8b, 0x52, 0xDjango, 0xNazgul, 0xNineDec, 8olidity, Avci, Bahurum, Bnke0x0, Chom, ElKu, Funen, GimelSec, JC, Junnon, Kaiziron, Meera, PaludoX0, Picodes, ReyAdmirado, Sm4rty, Soosh, Waze, _Adam, __141345__, ak1, aysha, benbaessler, bin2chen, c3phas, cccz, cryptphi, csanuragjain, defsec, exd0tpy, fatherOfBlocks, gogo, hake, hansfriese, itsmeSTYJ, jonatascm, kyteg, mektigboy, oyc_109, pashov, rbserver, rishabh, robee, rokinot, sach1r0, sashik_eth, scaraven, simon135, slywaters
44.26 USDC - $44.26
Different solidity compiler is used for some of the contracts. Creator: Compounding.sol , Creator.sol, Interfaces.sol , LibFuse.sol , Protocols.sol,VaultTracker.sol - pragma solidity 0.8.13; Erc20.sol , IRedeemer.sol- pragma solidity ^0.8.0; FixedPointMathLib.sol - pragma solidity >=0.8.0; LibCompound.sol - pragma solidity >=0.8.4; ZcToken.sol - pragma solidity ^0.8.4; IERC5095.sol - pragma solidity ^0.8.0;
Similarly, Markeplace, Vaulttracker are also have the same way of compiling.
Contracts should be deployed with the same compiler version and flags that they have been tested the most with. Locking the pragma helps ensure that contracts do not accidentally get deployed using, for example, the latest compiler which may have higher risks of undiscovered bugs. Contracts may also be deployed by others and the pragma indicates the compiler version intended by the original authors.
The study says that locking the compiler version would be safe. Please refer the following recommendation. https://consensys.net/blog/developers/solidity-best-practices-for-smart-contract-security/ https://swcregistry.io/docs/SWC-103 https://consensys.github.io/smart-contract-best-practices/development-recommendations/solidity-specific/locking-pragmas/ https://github.com/ConsenSys/smart-contract-best-practices/issues/125
Though it is high cause of concern to me, instead of marking this as high/medium, I am placing this in QA for judges to decide on this.
#0 - robrobbins
2022-08-25T21:46:51Z
compiler is locked in contracts, which are all the same.
libs have ^8.x.x.x