Submitted by WatchPug
Controller.sol#L550-L558
OperateProxy.sol#L10-L19
As the OperateProxy.sol#callFunction() function not payable, we believe its not the desired behavior to call a non-contract address and consider it a successful call.
For example, if a certain business logic requires a successful token.transferFrom() call to be made with the OperateProxy, if the token is not a existing contract, the call will return success: true instead of success: false and break the callers assumption and potentially malfunction features or even cause fund loss to users.
The qBridge exploit (January 2022) was caused by a similar issue.
As a reference, OpenZeppelins Address.functionCall() will check and require(isContract(target), "Address: call to non-contract");
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.5.0/contracts/utils/Address.sol#L135
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.5.0/contracts/utils/Address.sol#L36-L42
Consider adding a check and throw when the callee is not a contract.
0xca11 (Rolla) confirmed, resolved, and commented:
