This abstract contract is inherited by GladiusReactor.sol contract. However, there is no function to withdraw ether which will be sent to this contract directly & by calling mentioned functions.
Impact
As there are no mechanism/function to withdraw ether from this contract, all ethers, which will be sent to this GladiusReactor.sol, will be locked permanently.
itsabinashb
high
GladiusReactor::
eth
locked permanently in contractSummary
There is no function/mechanism to withdraw ether from
GladiusReactor.sol
contract, as a result ether will be locked in this contract permanently.Vulnerability Detail
The
BaseGladiusReactor.sol
contract was designed to receive ether directly:Additionally it has multiple
payable
functions: To partial/full execution of order -execute(SignedOrder calldata order,uint256 quantity )
executeWithCallback(SignedOrder calldata order,uint256 quantity,bytes calldata callbackData)
executeBatch(SignedOrder[] calldata orders, uint256[] calldata quantities)
executeBatchWithCallback(SignedOrder[] calldata orders, uint256[] calldata quantities, bytes calldata callbackData)
To full execution of order -
execute(SignedOrder calldata order)
executeWithCallback(SignedOrder calldata order, bytes calldata callbackData)
executeBatch(SignedOrder[] calldata orders)
executeBatchWithCallback(SignedOrder[] calldata orders, bytes calldata callbackData)
This abstract contract is inherited by
GladiusReactor.sol
contract. However, there is no function to withdraw ether which will be sent to this contract directly & by calling mentioned functions.Impact
As there are no mechanism/function to withdraw ether from this contract, all ethers, which will be sent to this
GladiusReactor.sol
, will be locked permanently.Code Snippet
Tool used
Manual Review
Recommendation
Add a withdraw function in
GladiusReactor.sol
to withdraw ether from this contract.