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

N-02 ERC-20 Approval Issues #1920

Merged
Merged
Show file tree
Hide file tree
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 @@ -553,6 +553,13 @@ contract BalancerMetaPoolStrategy is BaseAuraStrategy {
*/
function _approveAsset(address _asset) internal {
IERC20 asset = IERC20(_asset);
/* Double approve 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)
*/
// slither-disable-next-line unused-return
asset.approve(address(balancerVault), 0);
// slither-disable-next-line unused-return
asset.approve(address(balancerVault), type(uint256).max);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,6 @@ abstract contract BaseBalancerStrategy is InitializableAbstractStrategy {

// Balancer vault for BPT token (required for removing liquidity)
// slither-disable-next-line unused-return
pToken.approve(address(balancerVault), 0);
// slither-disable-next-line unused-return
pToken.approve(address(balancerVault), type(uint256).max);
}

Expand Down
Loading