We released a template repository to list assets on Aave v3 Polygon with the goal to embrace a standard and reduce the complexity of using the Aave cross-chain governance system created by the Aave Companies some time ago.
You can find the template code HERE!
While most non-Ethereum mainnet proposals are currently facilitated by Snapshot voting and the Aave Guardian, on Polygon, on-chain & cross-chain governance has been available for a while.
For example, in January 2022 there has been a proposal to add and alter assets on the Aave v2 Polygon pool.
However, cross-chain proposals are not completely trivial as they usually require double encoding of the transaction payload, as the payload is forwarded from Ethereum’s governance through a bridge to the executor on the other side of the bridge (e.g. Polygon).
The cross-chain listing template reduces the complexity of this process, by abstracting the bridging logic into a separate contract and enforcing certain assumptions.
- When using the bridge template we assume that the payload is deployed on the actual target chain.
- The payload on the target chain expects to be called via DELEGATECALL from the PolygonBridgeExecutor.
These assumptions allowed us to deploy the CrosschainForwarderPolygon contract on Ethereum, which handles the bridging, so all that’s left to do for the proposer is to create the
L2Payload on the chosen chain and the creation of the proposal on
Architecture & flow of proposal creation via the cross-chain listing template
Here is how you would create a proposal to list MiMatic(MAI) on Polygon:
- CrosschainForwarderPolygon: the generic forwarder contract for Ethereum → Polygon proposals.
- AaveGovernanceV2: the Aave governance contract, where proposals are created and voted for.
First, you need to deploy your desired payload on Polygon. In this case, the payload is already created so all that is left to do is to deploy it via
sh deploy-polygon.sh DeployPolygonMiMatic . The shell-script will broadcast the deployment and try to verify a few times, to avoid frequent verification issues on polygonscan.com.
As a result, we will have our deployed payload MiMaticPayload
MiMaticPayload deployed in the target chain, and the
CrosschainForwarderPolygon contract common and also deployed on Ethereum, all that is left to do is to create() the governance proposal on
AaveGovernanceV2, similar to any other proposal.
Note: To create the proposal on
AaveGovernanceV2 you need to be in possession of 80k AAVE proposition power (balance or proposition delegation). The address which creates the proposal does not need to be the same address deploying the Payload on the target chain.
Therefore you need:
- The L2 payload address.
- The IPFS hash (make sure it’s the hash for the json generated by the aip repository)
The rest of the parameters are static:
"0x00000000000000000000000024bb1df39eb811d4a7d82e9ff4763456750f9750" # abi.encode(l2PayloadAddress)
It is possible to create the proposal also via Etherscan, where it would look the following way (this is an example, it should include the appropriate parameters for a specific proposal.
Tooling around cross-chain communication on Aave will become more and more important. Starting with Optimism & Arbitrum, and following with all other networks, during the next months every Aave instance will be controlled via cross-chain governance from the
AaveGovernanceV2 on Ethereum.
Therefore we’ll extend the tooling around emerging bridges to further embrace decentralization of the governance.
As always, for anybody building on top of Aave and in need of support for this tool or any other, reach us out on Twitter, the #bored-ghosts channel on the Aave Discord or even in this forum.