Skip to content

Commit 0dc12c7

Browse files
committed
Add cross-chain asset consolidation proposal and draft documents
1 parent 48df69a commit 0dc12c7

File tree

2 files changed

+125
-0
lines changed

2 files changed

+125
-0
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Cross-Chain Asset Consolidation via Delegated Automation
2+
3+
## Problem Statement
4+
5+
Automate periodic transfers of assets (e.g., USDC) from multisig smart accounts on multiple EVM chains to Ethereum mainnet using the existing bridge infrastructure ([va-mmcx-bridge-contracts](https://github.com/consensys-vertical-apps/va-mmcx-bridge-contracts)).
6+
7+
## Solution Architecture
8+
9+
Leverage our existing delegation framework ([internal multisig/delegation repo]) to enable secure, automated cross-chain bridging with on-chain policy enforcement and off-chain execution orchestration.
10+
11+
### On-Chain Components
12+
13+
**Multisig Deployment**: Deploy MultiSigDeleGator smart accounts on each source chain using deterministic deployment to achieve identical addresses across chains with consistent signer sets and thresholds.
14+
15+
**Delegation Creation**: Multisig creates off-chain delegations (EIP-712 signed) granting limited execution authority to an automation service. **Critically, a single delegation signature can be reused indefinitely**—the automation service redeems the same signed delegation object for every bridging operation without requiring multisig signers to regenerate signatures. Delegations are validated on-chain by DelegationManager at each redemption time. Each delegation combines caveat enforcers:
16+
17+
- **AllowedTargetsEnforcer**: Only bridge contract addresses
18+
- **AllowedMethodsEnforcer**: Only bridge entrypoints (deposit/lock/mint)
19+
- **AllowedCalldataEnforcer**: Fixed mainnet treasury destination address
20+
- **ERC20TransferAmountEnforcer**: Per-delegation spending limits
21+
- **ERC20PeriodTransferEnforcer**: Time-windowed cumulative limits
22+
- **TimestampEnforcer**: Validity windows
23+
- **RedeemerEnforcer**: Optional automation wallet restriction
24+
25+
Delegations can be disabled on-chain via `disableDelegation()` for immediate revocation.
26+
27+
**Execution Flow**: When the automation service redeems a delegation via `DelegationManager.redeemDelegations()`, the framework validates all caveats, then the multisig executes the bridge call (approve tokens if needed, call bridge deposit function, emit events). Funds arrive at the mainnet treasury multisig with complete on-chain audit trail.
28+
29+
### Off-Chain Components
30+
31+
**Automation Service**: Node.js/TypeScript service (or OpenZeppelin Defender) monitors multisig balances via RPC, evaluates thresholds and limits, constructs delegation redemption transactions with encoded bridge calls, and submits signed transactions using the automation wallet.
32+
33+
**Key Management**: Private key never stored in plaintext. The automation service retrieves the key at runtime from a secrets manager (HashiCorp Vault, AWS KMS, GCP KMS, Azure Key Vault, or HSM). The service authenticates to the secrets manager using IAM roles, service accounts, or certificates. Network access controls restrict which machines/IPs can access the secrets manager API, and the automation service runs in an isolated network segment (VPC/subnet) with egress-only access to blockchain RPC endpoints. The key material is only decrypted in memory during transaction signing and never persisted to disk. Even if the automation service is compromised, delegation caveats limit blast radius (strict allowlists, per-tx/per-period caps).
34+
35+
**Delegation Issuance**: Multisig signers compose delegations with caveat configuration and sign via EIP-712. DelegationManager validates signatures at redemption. Signer set changes invalidate existing delegations (expected behavior; re-issue as part of signer-change playbook).
36+
37+
## Operational Flow
38+
39+
1. Off-chain service queries multisig balances on source chains
40+
2. Service evaluates thresholds, time windows, and cumulative limits
41+
3. If conditions met, service builds `redeemDelegations()` call with signed delegation and encoded bridge execution
42+
4. DelegationManager validates signatures, caveats, and delegation status
43+
5. Multisig approves tokens (if needed) and calls bridge contract
44+
6. Funds bridge to mainnet; events emitted for audit
45+
46+
**Key Separation**: Policy enforcement is on-chain (delegations + caveats); decision logic and scheduling are off-chain (automation script).
47+
48+
## Advantages
49+
50+
**Security**: Multisig control, narrowly scoped permissions, immediate revocation, limited blast radius even if automation key compromised.
51+
52+
**Efficiency**: No multisig sign-off required per bridging operation; enables frequent automated transfers. **A single delegation signature is reusable indefinitely**, eliminating the need to coordinate multisig signers for each transfer—sign once, use forever (subject to caveat limits and validity windows).
53+
54+
**Scalability**: Easy extension across chains using same delegation pattern and deterministic addresses.
55+
56+
**Auditability**: Complete on-chain event records plus off-chain automation logs.
57+
58+
**Reuse**: Builds on existing MultiSigDeleGator and DelegationManager infrastructure.
59+
60+
## Risks and Mitigations
61+
62+
**Bridge Risk**: Exploit or downtime affects funds in transit. _Mitigation_: Immediate revocation via `disableDelegation()`, chain-specific configs, bridge event monitoring.
63+
64+
**Key Compromise**: Attacker could redeem delegations. _Mitigation_: Strict limits, secure key storage, revocation capability. Caveats prevent exceeding limits or calling unauthorized contracts.
65+
66+
**Config Errors**: Misconfigured thresholds cause unintended behavior. _Mitigation_: Code review, staged rollouts, on-chain verifiability of delegation parameters.
67+
68+
**Signer Changes**: Invalidates existing delegation signatures. _Mitigation_: Re-issue delegations as part of signer-change playbook.
69+
70+
## References
71+
72+
- Delegation Framework: [internal multisig/delegation repo]
73+
- Bridge Contracts: https://github.com/consensys-vertical-apps/va-mmcx-bridge-contracts
74+
- Bridge API: https://github.com/consensys-vertical-apps/va-mmcx-bridge-api

documents/CrosschainDraft.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Cross-Chain Asset Consolidation via Delegated Automation
2+
3+
Problem: Automate periodic transfers of assets (e.g., USDC) from multisig smart accounts on multiple EVM chains to Ethereum mainnet using a bridge.
4+
5+
Solution Architecture: The system leverages our existing Delegation Framework to enable automated cross-chain bridging with strict on-chain policy enforcement. The multisig smart accounts are DeleGator Multisig smart accounts—smart account implementations that integrate with the Delegation Framework, enabling them to create delegations and honor delegation redemptions through the DelegationManager. Here's the high-level flow: DeleGator Multisig smart accounts hold assets on each source chain. During initial setup, multisig signers create a single delegation (signed once via EIP-712) that grants an automation service permission to bridge funds, but only under strict constraints enforced on-chain by caveat enforcers. The automation service monitors balances and, when conditions are met, redeems the delegation to execute bridge transactions. Each redemption is validated on-chain by the DelegationManager, which checks all caveat enforcers before allowing execution. Critically, the delegation framework's caveat enforcers ensure the automation can ONLY call approved bridge contracts, use approved methods, send to the fixed mainnet treasury address, and respect spending/time limits—even if the automation key is compromised. This means multisig keys are only needed once for setup, then can be stored in cold storage, while the automation key runs continuously but cannot perform unauthorized actions. Policy enforcement happens on-chain (via delegations and caveats), while decision logic and scheduling happen off-chain (automation script). The system uses the existing MetaMask bridge infrastructure for cross-chain transfers.
6+
7+
On-Chain Components
8+
9+
Multisig Deployment: Deploy MultiSigDeleGator Smart Accounts on each source chain.
10+
Delegation Creation: Multisig creates off-chain delegations (EIP-712 signed) granting limited execution authority to an automation service. Single delegation signature reusable indefinitely. Each delegation combines caveat enforcers:
11+
12+
- AllowedTargetsEnforcer: Only bridge contract addresses
13+
- AllowedMethodsEnforcer: Only bridge entrypoints (deposit/lock/mint)
14+
- AllowedCalldataEnforcer: Fixed mainnet treasury destination address
15+
- ERC20TransferAmountEnforcer: Per-delegation spending limits
16+
- ERC20PeriodTransferEnforcer: Time-windowed cumulative limits
17+
- TimestampEnforcer: Validity windows
18+
19+
Delegations can be disabled on-chain via disableDelegation() for immediate revocation.
20+
21+
Execution Flow: Automation service redeems delegation via DelegationManager.redeemDelegations(). Framework validates caveats, then multisig executes bridge call. Funds arrive at mainnet treasury with on-chain audit trail.
22+
23+
Off-Chain Components
24+
25+
Automation Service: Node.js/TypeScript service (or OpenZeppelin Defender) monitors balances via RPC, evaluates thresholds/limits, constructs delegation redemption transactions using Smart Accounts Kit, and submits signed transactions.
26+
27+
Key Management and Security Model: Multisig signers sign delegation ONCE during setup, then keys stored in cold storage. Automation service uses separate private key that only signs transactions—it never directly controls multisig funds. When the automation key signs a transaction, it must redeem the delegation through DelegationManager, which validates all caveat enforcers on-chain before allowing the multisig to execute. Even if the automation key is leaked, caveat enforcers restrict actions to approved bridge contracts/methods, fixed treasury address, and spending/time limits. Worst case: attacker triggers bridging early (funds still go to correct destination) or spends gas tokens (mitigated via ERC-4337 paymaster). The automation key cannot access multisig funds directly, send to unauthorized addresses, or bypass on-chain constraints. Standard security practices (secrets manager, network controls) suffice since compromise has minimal impact.
28+
29+
Delegation Issuance: Multisig signers compose delegations with caveat configuration and sign via EIP-712. Signer set changes invalidate existing delegations (re-issue as part of signer-change playbook).
30+
31+
Operational Flow: (1) Service queries multisig balances, (2) evaluates thresholds/limits, (3) builds redeemDelegations() call if conditions met, (4) DelegationManager validates, (5) multisig executes bridge call, (6) funds bridge to mainnet with audit trail.
32+
33+
Advantages
34+
35+
Security: Multisig keys only needed once (see Solution Architecture). Automation key strictly limited by on-chain caveats. Immediate revocation via disableDelegation().
36+
Efficiency: No multisig sign-off per operation; enables frequent automated transfers. Single delegation signature reusable indefinitely.
37+
Scalability: Easy extension across chains using same delegation pattern and deterministic addresses.
38+
Auditability: Complete on-chain event records plus off-chain automation logs.
39+
Reuse: Builds on existing MultiSigDeleGator and DelegationManager infrastructure.
40+
41+
Risks and Mitigations
42+
43+
Bridge: If bridge risks are detected, stop automation script and disable delegations.
44+
Key Compromise: Automation key leak has minimal impact (see Key Management). Multisig keys remain in cold storage.
45+
Config Errors: Misconfigured thresholds cause unintended behavior. Mitigation: Code review, staged rollouts, on-chain verifiability of delegation parameters.
46+
Signer Changes: Invalidates existing delegation signatures. Mitigation: Re-issue delegations as part of signer-change playbook.
47+
48+
References
49+
What is the Delegation Toolkit and what can you build with it?
50+
Delegation Framework Contracts
51+
MetaMask Bridge Contracts and Bridge API

0 commit comments

Comments
 (0)