I-1: Use caller instead of receiver in BridgeHookTarget
Description:
Currently, the implementation of BridgeHookTarget checks that the receiver is a collateral vault during a borrow operation.
22: function borrow(uint /*amount*/, address receiver) external view {
23: require(collateralVaultFactory.isCollateralVault(receiver), ReceiverNotCollateralVault());
24: }
Given the changes in pull requests #200 and #212, it would be safer to enforce the condition on the actual caller.
Impact:
Informational.
Recommendation:
Consider enforcing the condition on the original caller instead of the receiver.
Developer Response:
Fixed in commit 60c671139c52013116c615bd8b23302feb5db5b5 & ee35b4325f610e2425352aeea1382de1ecbc4a42.