Vaults are created from the factory via CREATE1
. An attacker can front-run deployVault
to deploy at the same address, but with different config. If the deployed chain reorg, a different vault might also be deployed at the same address.
function _deployVault(bytes memory _data) internal {
address vault = address(new ERC1967Proxy(vaultImplementation, _data));
token.safeApprove(vault, type(uint256).max);
vaults.push(IVault(vault));
}
function _deployVaults(uint256 _numVaults) internal {
bytes memory data = abi.encodeWithSignature(
"initialize(address,address,address,address)",
address(token),
address(this),
address(stakeController),
stakeController.getRewardVault()
);
for (uint256 i = 0; i < _numVaults; i++) {
_deployVault(data);
}
Use CREATE2
and the vault config as salt.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.