0xec092c15…471asent to0xbeccb6bb…9bf6·#25,753,249·view on Etherscan
# Migrate to ALE v5
# **Migrate to ALE v5**
Forum Post: https://forum.inverse.finance/t/migrate-to-ale-v5/681
## **Summary**
This proposal migrates FiRM from the current ALE v4 deployment to ALE v5 following the discovery of an approval-handling bug in ALE v4.
ALE v4 relied on persistent approvals between ALE and FiRM markets. Certain inherited helper functions could overwrite these approvals and leave them at zero after use, causing subsequent ALE leverage transactions for the affected market to fail.
ALE v5 fixes this by using ad-hoc approvals, approving the exact amount required immediately before each interaction rather than relying on persistent approvals.
**ALE v5:** `0x43Fa5E63253b00D5e34f42e711D734A058142055`
As with the previous ALE migration, a migration helper will be used to copy the existing market configurations from ALE v4 to ALE v5.
The existing DbrHelper will continue to be used.
## **Exchange Routers**
ALE v5 will approve both Enso and KyberSwap for swap routing, allowing the FiRM UI to offer both options to users.
* **Enso:** `0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf`
* **KyberSwap:** `0x6131B5fae19EA4f9D964eAc0408E4408b66337b5`
Odos will not be approved following the shutdown of the protocol.
## **On-chain Actions**
1. Allow ALE v5 on the BorrowController:
```
borrowController.allow(
0x43Fa5E63253b00D5e34f42e711D734A058142055
);
```
2.
Approve Enso and KyberSwap on ALE v5:
```
newALE.allowProxy(
0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf
);
newALE.allowProxy(
0x6131B5fae19EA4f9D964eAc0408E4408b66337b5
);
```
3.
Nominate the migration helper as pending governance of ALE v5 and DbrHelper:
```
newALE.setPendingGov(migrationHelper);
dbrHelper.setPendingGov(migrationHelper);
```
4.
Execute the migration:
```
migrationHelper.migrate();
```
This copies the existing FiRM market configurations from ALE v4 to ALE v5 and ensures the relevant markets are approved by DbrHelper.
5. Reclaim governance:
```
newALE.claimPendingGov();
dbrHelper.claimPendingGov();
```
6.
Disable ALE v4 on the BorrowController:
```
borrowController.deny(
0x39D167Fe676EFC3be49bE874a37349A5D89f9058
);
```
No user positions, collateral, debt, or FiRM market parameters are changed as part of this migration.