diff --git a/contracts/receivers/aave-v2-receiver/main.sol b/contracts/receivers/aave-v2-receiver/main.sol index 9158328..da679db 100644 --- a/contracts/receivers/aave-v2-receiver/main.sol +++ b/contracts/receivers/aave-v2-receiver/main.sol @@ -68,6 +68,8 @@ contract AaveV2Migrator is MigrateResolver { function _migratePosition(address owner) internal { AaveData storage data = positions[owner]; + require(!data.isFinal, "already-migrated"); + for (uint i = 0; i < data.supplyTokens.length; i++) { IERC20(data.supplyTokens[i]).safeTransfer(data.targetDsa, data.supplyAmts[i]); }