There is no zero address check, this can lead to the msg.sender sending ether to a zero address and causing loss of funds
Sending Ethers to a zero address ((0x0000000000000000000000000000000000000000)) will not revert as the EVM treats the zero address as a normal address, it is best practice always to check the address the Ether is sent to before sending. Though, it does not affect the protocol directly it is best for the protocol to protect its users to make sure
This will lead to loss of funds for the msg.sender.
Manual Review
function removeCollateralNative(
uint256 _amount,
address payable _to
) external onlyOwner {
require(
canRemoveCollateral(getTokenManager().getToken(NATIVE), _amount),
UNDER_COLL
);
++ require(_to != address(0), "Invalid address");
(bool sent, ) = _to.call{value: _amount}("");
require(sent, "err-native-call");
emit CollateralRemoved(NATIVE, _amount, _to);
}
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.