|
| 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 |
0 commit comments