diff --git a/docs/LidoARMSquashed.svg b/docs/LidoARMSquashed.svg index 881bbad..22628ef 100644 --- a/docs/LidoARMSquashed.svg +++ b/docs/LidoARMSquashed.svg @@ -58,7 +58,7 @@    _setOperator(newOperator: address) <<OwnableOperable>>    _initARM(_operator: address, _name: string, _symbol: string, _fee: uint256, _feeCollector: address, _capManager: address) <<AbstractARM>>    _inDeadline(deadline: uint256) <<AbstractARM>> -    _transferAsset(asset: address, to: address, amount: uint256) <<LidoARM>> +    _transferAsset(asset: address, to: address, amount: uint256) <<AbstractARM>>    _transferAssetFrom(asset: address, from: address, to: address, amount: uint256) <<AbstractARM>>    _swapExactTokensForTokens(inToken: IERC20, outToken: IERC20, amountIn: uint256, to: address): (amountOut: uint256) <<AbstractARM>>    _swapTokensForExactTokens(inToken: IERC20, outToken: IERC20, amountOut: uint256, to: address): (amountIn: uint256) <<AbstractARM>> diff --git a/src/contracts/LidoARM.sol b/src/contracts/LidoARM.sol index dabbe78..3037d45 100644 --- a/src/contracts/LidoARM.sol +++ b/src/contracts/LidoARM.sol @@ -62,19 +62,6 @@ contract LidoARM is Initializable, AbstractARM { steth.approve(address(lidoWithdrawalQueue), type(uint256).max); } - /** - * @dev Due to internal stETH mechanics required for rebasing support, in most cases stETH transfers are performed - * for the value of 1 wei less than passed to transfer method. Larger transfer amounts can be 2 wei less. - * - * The MultiLP implementation ensures any WETH reserved for the withdrawal queue is not used in swaps from stETH to WETH. - */ - function _transferAsset(address asset, address to, uint256 amount) internal override { - // Add 2 wei if transferring stETH - if (asset == address(steth)) amount += 2; - - super._transferAsset(asset, to, amount); - } - /** * @notice Request a stETH for ETH withdrawal. * Reference: https://docs.lido.fi/contracts/withdrawal-queue-erc721/ diff --git a/test/fork/LidoFixedPriceMultiLpARM/SwapTokensForExactTokens.t.sol b/test/fork/LidoFixedPriceMultiLpARM/SwapTokensForExactTokens.t.sol index 5029dd4..230b676 100644 --- a/test/fork/LidoFixedPriceMultiLpARM/SwapTokensForExactTokens.t.sol +++ b/test/fork/LidoFixedPriceMultiLpARM/SwapTokensForExactTokens.t.sol @@ -309,7 +309,7 @@ contract Fork_Concrete_LidoARM_SwapTokensForExactTokens_Test is Fork_Shared_Test vm.expectEmit({emitter: address(weth)}); emit IERC20.Transfer(address(this), address(lidoARM), amountIn); vm.expectEmit({emitter: address(steth)}); - emit IERC20.Transfer(address(lidoARM), address(this), amountOut + 2); + emit IERC20.Transfer(address(lidoARM), address(this), amountOut); // Main call lidoARM.swapTokensForExactTokens( weth, // inToken