Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N02 addendum #1949

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -622,14 +622,17 @@ contract BalancerMetaPoolStrategy is BaseAuraStrategy {
*/
function _approveAsset(address _asset) internal {
IERC20 asset = IERC20(_asset);
/* Double approve is not required with the assets supported by the
/* Double safeApprove is not required with the assets supported by the
* strategies today. This is defensive, future proof programming
* in case we ever utilize this asset for OUSD supporting non completely
* ERC20 compliant tokens (e.g. USDT)
* ERC20 compliant tokens (e.g. USDT).
*
* SafeApprove (instead of only approve) is also required because USDT's
* approve doesn't return a value which causes the call to revert.
*/
// slither-disable-next-line unused-return
asset.approve(address(balancerVault), 0);
asset.safeApprove(address(balancerVault), 0);
// slither-disable-next-line unused-return
asset.approve(address(balancerVault), type(uint256).max);
asset.safeApprove(address(balancerVault), type(uint256).max);
}
}
Loading