Closed t4sk closed 3 years ago
https://github.com/iearn-finance/yearn-protocol/blob/e602e66f18875edf192f0f2a65aac4d2453470a3/contracts/Vault.vy#L167
This is just a suggestion. It might be good to add safety checks on the approve method to mitigate the problem described here https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol#L42
approve
This safety check is present in curve.fi ERC20 token https://github.com/curvefi/curve-contract/blob/master/contracts/tokens/CurveTokenV2.vy
@t4sk good catch!
https://github.com/iearn-finance/yearn-protocol/blob/e602e66f18875edf192f0f2a65aac4d2453470a3/contracts/Vault.vy#L167
This is just a suggestion. It might be good to add safety checks on the
approve
method to mitigate the problem described here https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol#L42This safety check is present in curve.fi ERC20 token https://github.com/curvefi/curve-contract/blob/master/contracts/tokens/CurveTokenV2.vy