Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: a.DI Sonic path activation #604

Merged
merged 8 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: "a.DI Sonic path activation"
author: "BGD Labs @bgdlabs"
discussions: "https://governance.aave.com/t/technical-maintenance-proposals/15274/69"
---

## Simple Summary

Proposal to register the necessary Sonic adapters on a.DI, a technical pre-requirement for an activation vote of Aave v3 Sonic.

## Motivation

In order to be able to pass messages from Ethereum to Sonic via a.DI (Aave Delivery Infrastructure), it is necessary to at least have three valid adapters Ethereum → Sonic smart contracts enabled in the system.

The first case of message passing Ethereum → Sonic is the activation proposal for an Aave v3 Sonic pool and consequently, to be able to execute on the Sonic side the payload, the Aave governance should approve in advance the a.DI adapters smart contracts.

This procedure mirrors the requirements on previous networks like ZkSync, Linea, or Celo.

## Specification

The proposal payload simply registers pre-deployed Sonic adapters (with the necessary configurations to communicate with the Sonic a.DI) on the Ethereum a.DI instance.

This is done by calling the enableBridgeAdapters() function on the Ethereum Cross-chain Controller smart contract.

The optimal bandwidth on the Ethereum -> Sonic path is set to 2, by calling updateOptimalBandwidthByChain().

The following are the configured adapters for the Ethereum → Sonic path. The required confirmations on the path are 2 out of 3.

| Network | Hyperlane Adapter | LayerZero Adapter | CCIP Adapter |
| -------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Ethereum | [0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1](https://etherscan.io/address/0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1) | [0x8FD7D8dd557817966181F584f2abB53549B4ABbe](https://etherscan.io/address/0x8FD7D8dd557817966181F584f2abB53549B4ABbe) | [0xe3a0d9754aD3452D687cf580Ba3674c2D7D2f7AE](https://etherscan.io/address/0xe3a0d9754aD3452D687cf580Ba3674c2D7D2f7AE) |
| Sonic | [0x1098F187F5f444Bc1c77cD9beE99e8d460347F5F](https://sonicscan.org/address/0x1098F187F5f444Bc1c77cD9beE99e8d460347F5F) | [0x7B8FaC105A7a85f02C3f31559d2ee7313BDC5d7f](https://sonicscan.org/address/0x7B8FaC105A7a85f02C3f31559d2ee7313BDC5d7f) | [0x1905fCdDa41241C0871A5eC3f9dcC3E8d247261D](https://sonicscan.org/address/0x1905fCdDa41241C0871A5eC3f9dcC3E8d247261D) |

The new a.DI deployments on Sonic network are as follows:

| Contract | Address |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| CrossChainController | [0x58e003a3C6f2Aeed6a2a6Bc77B504566523cb15c](https://sonicscan.org/address/0x58e003a3C6f2Aeed6a2a6Bc77B504566523cb15c) |
| Granular Guardian | [0x10078c1D8E46dd1ed5D8df2C42d5ABb969b11566](https://sonicscan.org/address/0x10078c1D8E46dd1ed5D8df2C42d5ABb969b11566) |
| Chainlink Emergency Oracle | [0xECB564e91f620fBFb59d0C4A41d7f10aDb0D1934](https://sonicscan.org/address/0xECB564e91f620fBFb59d0C4A41d7f10aDb0D1934) |

The new Aave Governance deployments on Sonic network are as follows:

| Contract | Address |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| PayloadsController | [0x0846C28Dd54DEA4Fd7Fb31bcc5EB81673D68c695](https://sonicscan.org/address/0x0846C28Dd54DEA4Fd7Fb31bcc5EB81673D68c695) |
| Executor Lvl 1 | [0x7b62461a3570c6AC8a9f8330421576e417B71EE7](https://sonicscan.org/address/0x7b62461a3570c6AC8a9f8330421576e417B71EE7) |
| Governance Guardian | [0x63C4422D6cc849549daeb600B7EcE52bD18fAd7f](https://sonicscan.org/address/0x63C4422D6cc849549daeb600B7EcE52bD18fAd7f) |
| BGD Labs Guardian | [0x7837d7a167732aE41627A3B829871d9e32e2e7f2](https://sonicscan.org/address/0x7837d7a167732aE41627A3B829871d9e32e2e7f2) |

## References

- Adapter Implementations: [HyperLane Bridge Adapters](https://github.com/bgd-labs/aave-delivery-infrastructure/blob/9a79f7986b5442657f64e41a0ab089e0cdb71e98/src/contracts/adapters/hyperLane/HyperLaneAdapter.sol), [LayerZero Bridge Adapters](https://github.com/bgd-labs/aave-delivery-infrastructure/blob/9a79f7986b5442657f64e41a0ab089e0cdb71e98/src/contracts/adapters/layerZero/LayerZeroAdapter.sol), [CCIP Bridge Adapters](https://github.com/bgd-labs/aave-delivery-infrastructure/blob/9a79f7986b5442657f64e41a0ab089e0cdb71e98/src/contracts/adapters/ccip/CCIPAdapter.sol)
- Payload Implementation: [Payload](https://github.com/bgd-labs/adi-deploy/blob/09dae97164429e0986f07204a4110015a3f6c741/src/adapter_payloads/Ethereum_Sonic_Path_Payload.sol)
- Payload Tests: [tests](https://github.com/bgd-labs/adi-deploy/blob/09dae97164429e0986f07204a4110015a3f6c741/tests/payloads/ethereum/AddSonicPathTest.t.sol)
- Diffs: [a.DI diffs](https://github.com/bgd-labs/adi-deploy/blob/09dae97164429e0986f07204a4110015a3f6c741/diffs/adi_add_sonic_path_to_adiethereum_before_adi_add_sonic_path_to_adiethereum_after.md)
- Snapshot: Direct-to-AIP
- [Discussion](https://governance.aave.com/t/technical-maintenance-proposals/15274/69)

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {EthereumScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol';

address constant PAYLOAD = address(0x41FE455778201FB3AC7E41a7b2B4ffC90F08035e);

/**
* @dev Deploy Ethereum
* deploy-command: make deploy-ledger contract=src/20250210_AaveV3Ethereum_ADISonicPathActivation/ADISonicPathActivation_20250210.s.sol:DeployEthereum chain=mainnet
* verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/ADISonicPathActivation_20250210.s.sol/1/run-latest.json
*/
contract DeployEthereum is EthereumScript {
function run() external broadcast {
// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(PAYLOAD);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
}
}

/**
* @dev Create Proposal
* command: make deploy-ledger contract=src/20250210_AaveV3Ethereum_ADISonicPathActivation/ADISonicPathActivation_20250210.s.sol:CreateProposal chain=mainnet
*/
contract CreateProposal is EthereumScript {
function run() external {
// create payloads
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1);

// compose actions for validation
IPayloadsControllerCore.ExecutionAction[]
memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1);
actionsEthereum[0] = GovV3Helpers.buildAction(PAYLOAD);

payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL,
GovV3Helpers.ipfsHashFile(
vm,
'src/20250210_AaveV3Ethereum_ADISonicPathActivation/ADISonicPathActivation.md'
)
);
}
}
14 changes: 14 additions & 0 deletions src/20250210_AaveV3Ethereum_ADISonicPathActivation/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
author: 'BGD Labs @bgdlabs',
pools: ['AaveV3Ethereum'],
title: 'a.DI Sonic path activation',
shortName: 'ADISonicPathActivation',
date: '20250210',
discussion: '',
snapshot: '',
votingNetwork: 'POLYGON',
},
poolOptions: {AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 21817395}}},
};
Loading