0x6535020c…89bbsent to0xbeccb6bb…9bf6·#23,883,628·view on Etherscan
# Enable Swap Proxies on ALEV4
# Proposal to Enable Swap Proxies on ALEV4
Forum Post: https://forum.inverse.finance/t/enable-swap-proxies-on-alev4/630
## TL;DR
* The recent **“[Migrate DBR Helpers to New TriDBR Poo](https://forum.inverse.finance/t/migrate-dbr-helpers-to-new-tridbr-pool/627)l”** proposal deployed and enabled the new ALE contract ALEV4 ([0x39D167Fe676EFC3be49bE874a37349A5D89f9058](https://etherscan.io/address/0x39D167Fe676EFC3be49bE874a37349A5D89f9058#code)).
* ALEV4 uses an allowlist (`isExchangeProxy`) for swap routers used in leverage/deleverage flows.
* We identified that the two swap proxies used by the FiRM frontend were not included in the whitelist:
* Odos router: [`0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559`](https://etherscan.io/address/0xcf5540fffcdc3d510b18bfca6d2b9987b0772559)
* 1inch Aggregation Router: [`0x111111125421cA6dc452d289314280a0f8842A65`](https://etherscan.io/address/0x111111125421cA6dc452d289314280a0f8842A65)
* This proposal simply calls `allowProxy` for both addresses on ALEV4 so that existing leverage/deleverage flows can route via Odos/1inch as intended.
* No changes to FiRM markets, risk parameters, or DBR logic.
---
## Background
In the DBR Helpers → new TriDBR pool migration, we:
* Deployed new helper contracts (ALEV4, PendlePTHelper, DbrHelper),
* Migrated configuration from the legacy ALE,
* Disabled the old helpers.
ALEV4 introduces a safety improvement around swap routing:
* Each market can be configured to use an `exchangeProxy`.
* At execution time, ALEV4 checks `markets[_market].useProxy` and `isExchangeProxy[_proxy]`.
* Only addresses explicitly allowed via `allowProxy()` can be used as swap routers.
This pattern is already in use (e.g. prior 0x → 1inch switch), but when we migrated to ALEV4 we did not include the `allowProxy` calls in the on-chain steps, so both Odos and 1inch are currently *not* enabled on the new ALE.
The result is that any leverage/deleverage flow that passes these routers as `exchangeProxy` will revert with `InvalidProxyAddress()`.
---
## Objective
Formally authorize the two swap routers used by FiRM as valid exchange proxies on ALEV2 so that:
* Frontends and power-users can use Odos and 1inch for DOLA / collateral routing in leverage and deleverage flows.
* Behaviour matches the previous ALE setup, with improved routing via the new TriDBR pool and the same aggregator stack.
No other changes are in scope.
---
## Rationale
* **Restores intended functionality** The original migration assumed Odos and 1inch would remain usable as swap backends for ALE flows. Without whitelisting, those routes simply revert.
* **Minimal, well-scoped change** We are only setting two booleans in `isExchangeProxy`. No state related to user escrows, market debt, or DBR accounting is modified.
* **Battle-tested routers** Both addresses correspond to heavily-used, audited swap routers (Odos router v2 and 1inch Aggregation Router v6), already integrated in the Inverse stack and widely used across DeFi.
* **Improved UX and execution** Allowing these aggregators lets users source the best routes across DEXs while still keeping ALE’s flash-mint-based leverage/deleverage UX.
---
## Specification / On-Chain Actions
On ALEV4: 0x39D167Fe676EFC3be49bE874a37349A5D89f9058
1. Enable Odos router as an exchange proxy
```
ALEV4.allowProxy(0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559);
```
2. Enable 1inch Aggregation Router as an exchange proxy
```
ALEV4.allowProxy(0x111111125421cA6dc452d289314280a0f8842A65);
```