Skip to content

Commit bfdc67b

Browse files
committed
fix: add a comment
1 parent 4841c7b commit bfdc67b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/contracts/MigrationHelper.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ contract MigrationHelper is Ownable, IMigrationHelper {
180180
aTokenAmountToMigrate = aTokenBalanceAfterReceiving;
181181
}
182182

183+
// On v2 some assets can have a loss of precision on withdrawal (e.g. WBTC), so balance diff should be used
184+
// to understand the precise withdrawn amount
183185
uint256 balanceBefore = IERC20WithPermit(asset).balanceOf(address(this));
184186
V2_POOL.withdraw(asset, aTokenAmountToMigrate, address(this));
185187
uint256 withdrawn = IERC20WithPermit(asset).balanceOf(address(this)) - balanceBefore;

0 commit comments

Comments
 (0)