Skip to content

Add CrossDomainGovernor contract - #5217

Merged
yosriady merged 55 commits into
developfrom
feature/arbitrum-forwarder-delegate
Jan 27, 2022
Merged

Add CrossDomainGovernor contract#5217
yosriady merged 55 commits into
developfrom
feature/arbitrum-forwarder-delegate

Conversation

@yosriady

@yosriady yosriady commented Oct 12, 2021

Copy link
Copy Markdown
Contributor

Context

  • We have feed contracts on L2 chains such as Arbitrum.
  • In the normal setup, the L2 contracts would be owned and managed by an L2 Gnosis Safe.
  • However, there are L2-specific risks that we wish to mitigate, such as:
    1. L2 Seq centralization and its ability to censor
    2. Have an upgrade path if the bridge API breaks, preventing cross-chain messages
  • This effort also doubles as an exploration of cross-chain governance (governing L2 contracts from L1.)
  • The Governor contract in this PR will own contracts on L2 (similar to Timelock, if you're familiar with that) to mitigate any L2-specific risks.

https://www.notion.so/chainlink/Arbitrum-Optimism-Safe-Options-3dbd7594bc504c2a9aa542cd7955b2e7#6e64dbc8bb8e4948a59d0fd80ca1f6c5

This PR

This PR adds a CrossDomainGovernor contract for Arbitrum (and Optimism.)

  • The Forwarder contract is used to receive cross-chain messages from L1 and acts as the owner of L2 contracts.

  • It implements a new forwardDelegate function is used to forward Multisend transactions on L2, which can only be triggered by a delegatecall from the Forwarder contract. We use Multisend transactions for our batch Safe proposals.

Here's a diagram how the Forwarder / Governor contract is used alongside Multisend on L2:

Arbitrum_Optimism Option 3 (1) (1)

Learn more about the above flow in the Spec

@github-actions

Copy link
Copy Markdown
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@yosriady
yosriady requested a review from krebernisak October 12, 2021 13:43
@smartcontractkit smartcontractkit deleted a comment from github-actions Bot Oct 12, 2021
@smartcontractkit smartcontractkit deleted a comment from github-actions Bot Oct 12, 2021
@yosriady
yosriady marked this pull request as ready for review October 12, 2021 13:57
@smartcontractkit smartcontractkit deleted a comment from github-actions Bot Oct 12, 2021
@yosriady
yosriady requested a review from kaleofduty October 13, 2021 13:06
@yosriady
yosriady marked this pull request as draft October 19, 2021 13:19
@yosriady
yosriady force-pushed the feature/arbitrum-forwarder-delegate branch from 2bb39ff to 434339e Compare October 19, 2021 13:28
@yosriady
yosriady force-pushed the feature/arbitrum-forwarder-delegate branch from 434339e to b4784c8 Compare October 19, 2021 13:32
@yosriady
yosriady marked this pull request as ready for review October 19, 2021 17:32
@yosriady
yosriady force-pushed the feature/arbitrum-forwarder-delegate branch from d2889c7 to 18756d5 Compare October 21, 2021 13:19
@yosriady
yosriady force-pushed the feature/arbitrum-forwarder-delegate branch from a662824 to ee81c30 Compare October 22, 2021 12:38
@yosriady

Copy link
Copy Markdown
Contributor Author

@krebernisak I've updated the original PR to address your feedback. It now leaves the ArbitrumCrossDomainForwarder used by the L2 Emergency Protocol as-is.

Instead, the new ArbitrumCrossDomainDelegateForwarder contract inherits from the CrossDomainDelegateForwarder base contract and implements DelegateForwarderInterface.

@yosriady
yosriady force-pushed the feature/arbitrum-forwarder-delegate branch from 42c4594 to 876aa0e Compare November 29, 2021 15:06
@yosriady

yosriady commented Dec 13, 2021

Copy link
Copy Markdown
Contributor Author

@krebernisak @se3000 All of the audit feedback has been addressed so I believe we can merge this. Please have another look, thank you.

@yosriady
yosriady force-pushed the feature/arbitrum-forwarder-delegate branch from cd466a4 to 87e1914 Compare January 27, 2022 05:51
@yosriady
yosriady force-pushed the feature/arbitrum-forwarder-delegate branch 2 times, most recently from 675a787 to 018b4e3 Compare January 27, 2022 07:38
@yosriady
yosriady force-pushed the feature/arbitrum-forwarder-delegate branch from 018b4e3 to 382276d Compare January 27, 2022 07:50
@smartcontractkit smartcontractkit deleted a comment from cl-homu Jan 27, 2022
Comment thread contracts/src/v0.8/dev/ArbitrumCrossDomainGovernor.sol Outdated
Comment thread contracts/src/v0.8/dev/CrossDomainDelegateForwarder.sol
Comment thread contracts/src/v0.8/dev/OptimismCrossDomainGovernor.sol
@yosriady
yosriady merged commit 9553de7 into develop Jan 27, 2022
@yosriady
yosriady deleted the feature/arbitrum-forwarder-delegate branch January 27, 2022 11:02
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.

4 participants