Skip to content

[MigrationBundles] Aave v3 migration bundles#30

Draft
QGarchery wants to merge 13 commits into
mainfrom
migration
Draft

[MigrationBundles] Aave v3 migration bundles#30
QGarchery wants to merge 13 commits into
mainfrom
migration

Conversation

@QGarchery

@QGarchery QGarchery commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

migration from aave v3 to vault v2

paused for now

Comment thread src/aave-migration/AaveMigrationBundlesV1.sol
address onBehalf,
TokenPermit memory aTokenPermit,
uint256 deadline
) external {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't add a prior repay step (which is an action that exists in bundler3), which would allow to repay and withdraw the collateral to deposit on a vault v2. It doesn't seem to make a lot of sense to add it:

  • it would be most useful if we integrate a swap mechanism, but it's not planned atm
  • it would enable to deposit a collateral into a vault v2, which doesn't seem like a big use case

@QGarchery QGarchery changed the title Migration [Migration] Aave v3 migration bundles Jun 29, 2026
@QGarchery QGarchery changed the title [Migration] Aave v3 migration bundles [MigrationBundles] Aave v3 migration bundles Jun 29, 2026
Comment thread src/aave-migration/AaveMigrationBundlesV1.sol
@QGarchery QGarchery marked this pull request as ready for review June 30, 2026 08:15
@QGarchery QGarchery self-assigned this Jun 30, 2026
@QGarchery QGarchery requested a review from MathisGD June 30, 2026 08:15

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth a fork integration test?

require(asset == IAToken(aToken).UNDERLYING_ASSET_ADDRESS(), InconsistentTokens());

TokenLib.pullToken(aToken, msg.sender, amount, aTokenPermit);
uint256 withdrawn = IAaveV3(aaveV3Pool).withdraw(asset, type(uint256).max, address(this));

@QGarchery QGarchery Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not doing slippage check for this withdraw, because withdrawing 1 aTokens give out about 1 underlying:

  • token is rebalancing to account for interest
  • bad debt can be realized, but it's under Umbrella system which only burns it own aToken (so no "price" repercussion to users)

@MathisGD MathisGD Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean "rebasing"?

Comment thread src/aave-migration/AaveMigrationBundlesV1.sol
Comment thread src/aave-migration/AaveMigrationBundlesV1.sol Outdated
Comment thread src/aave-migration/AaveMigrationBundlesV1.sol
@MathisGD MathisGD marked this pull request as draft July 10, 2026 15:27
@QGarchery QGarchery changed the base branch from feat-ikr to main July 10, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants