Open code423n4 opened 3 years ago
JMukesh
There is no input validation of address in transfer() and transferFrom() in tridentErc20.sol due to which it , token can be send to the address(0)
https://github.com/sushiswap/trident/blob/ccd64a53f361ad06087c34bfa3a206afb7230f1c/contracts/pool/TridentERC20.sol#L67
https://github.com/sushiswap/trident/blob/ccd64a53f361ad06087c34bfa3a206afb7230f1c/contracts/pool/TridentERC20.sol#L83
manual review
add input validation for the address in transfer() and transferFrom()
Validation was removed for gas efficiency.
Handle
JMukesh
Vulnerability details
Impact
There is no input validation of address in transfer() and transferFrom() in tridentErc20.sol due to which it , token can be send to the address(0)
Proof of Concept
https://github.com/sushiswap/trident/blob/ccd64a53f361ad06087c34bfa3a206afb7230f1c/contracts/pool/TridentERC20.sol#L67
https://github.com/sushiswap/trident/blob/ccd64a53f361ad06087c34bfa3a206afb7230f1c/contracts/pool/TridentERC20.sol#L83
Tools Used
manual review
Recommended Mitigation Steps
add input validation for the address in transfer() and transferFrom()