The BaseAdapter.sol contract's initialization function uses initializer
modifier instead of onlyInitializing
modifier.
This will cause invocation of the initialize(...)
of the of the child contracts to revert because they also use the initialize
modifier and the initialize
modifier is supposed to be used only once.
Only the final child contract in the inheritance chain is supposed to use the initialize
modifier while the parent contracts use the onlyInitializing
modifier because the initialize
modifier is supposed to be called only once.
The BaseAdapter.sol is the parent contract to CurveAdapter.sol, UniswapV3Adapter.sol and UniswapV2Adapter.sol
The BaseAdapter.sol uses the initializer
modifier on its __BaseAdapter_init(...)
initialization function while the child contracts that inherit the base contract BaseAdapter.sol also use the initializer
modifier. This will cause the intialization of the CurveAdapter.sol, UniswapV3Adapter.sol and UniswapV2Adapter.sol contracts to revert.
Not initializing this mentioned contract will prevent setting the owner
which will in turn make the onlyOwner functions useless.
Also the _slippageToleranceBps
can not be set causing all swap transaction to revert because the default value is zero.
Here is the comment on the initialize modifier indicating that the initialize
modifier can only be called once and the parent contract should use the onlyInitializing
modifier.
CurveAdapter.sol, UniswapV2Adapter.sol and UniswapV3Adapter.sol cannot be initialized.
The above contracts cannot be upgraded.
deadline for swap cannot be set in the dex adapters
Manual Review
Consider changing the initializer
modifier to onlyInitializing
modifier on __BaseAdapter_init(...)
of BaseAdapter.sol
this way:
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.