Submitted by 0xRajeev, also found by cmichel
The SwappableYieldSource.sol has a public visibility initialization function that can be front-run, allowing an attacker to incorrectly initialize the contract, if the deployment of this contract does not safely handle initializations via a robust deployment script or a factory contract to prevent front-running.
Impact: Initialization function can be front-run by attackers, allowing them to initialize the contract with malicious values. Also, if initializations are not done atomically with creation, all public/external functions can be accessed before initialization because there are no checks to confirm initializations in those functions.
Reference: See similar High-severity Finding 9 of Trail of Bits audit of Advanced Blockchain and Finding 12 from Trail of Bits audit of Hermez Network.
Recommend ensuring atomic creation+deployment with script or factory contract. Add checks to confirm initialization in public/external functions.
0xean (Judge) disputed:
PierrickGT (PoolTogether) commented:
