From 56786035ef4e81e659a47679c3362c39d274d49c Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Wed, 23 Aug 2023 10:46:23 +0200 Subject: [PATCH] correct safe approve all tokens and adjust the documentation --- .../balancer/BalancerMetaPoolStrategy.sol | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/contracts/contracts/strategies/balancer/BalancerMetaPoolStrategy.sol b/contracts/contracts/strategies/balancer/BalancerMetaPoolStrategy.sol index 49bb0e8d40..a94bd7cf94 100644 --- a/contracts/contracts/strategies/balancer/BalancerMetaPoolStrategy.sol +++ b/contracts/contracts/strategies/balancer/BalancerMetaPoolStrategy.sol @@ -418,11 +418,15 @@ contract BalancerMetaPoolStrategy is BaseAuraStrategy { } /** - * @notice Approves the Balancer pool to transfer all supported - * assets from this strategy. - * Also approve any suppered assets that are wrapped in the Balancer pool - * like stETH and frxETH, to be transferred from this strategy to their - * respective wrapper contracts. eg wstETH and sfrxETH. + * @notice Approves the Balancer Vault to transfer poolAsset counterparts + * of all of the supported assets from this strategy. E.g. stETH is a supported + * strategy and Balancer Vault gets unlimited approval to transfer wstETH. + * + * If Balancer pool uses a wrapped version of a supported asset then also approve + * unlimited usage of an asset to the contract responsible for wrapping. + * + * Approve unlimited spending by Balancer Vault and Aura reward pool of the + * pool BPT tokens. * * Is only executable by the Governor. */ @@ -434,7 +438,7 @@ contract BalancerMetaPoolStrategy is BaseAuraStrategy { { uint256 assetCount = assetsMapped.length; for (uint256 i = 0; i < assetCount; ++i) { - _approveAsset(assetsMapped[i]); + _abstractSetPToken(assetsMapped[i], platformAddress); } _approveBase(); }