Cross-Chain Integration
FYV enables access to yield opportunities across multiple blockchains through Flow's EVM bridge. This document explains how cross-chain integration works and how to access Ethereum-compatible yield vaults from Flow.
Flow-EVM Bridge Overview
Flow's EVM bridge connects Flow's Cadence environment with Ethereum Virtual Machine (EVM) compatible chains, enabling seamless asset transfer and smart contract interaction across ecosystems.
Bridge Architecture
The bridge consists of several components:
FlowEVMBridgeConfig: Manages token escrow and minting configuration, maintains token pair mappings (Flow ↔ EVM), and handles bridge fees and limits.
CadenceOwnedAccounts (COA): Enables Cadence contracts to control EVM addresses, allows Cadence to send EVM transactions, and bridges resource-oriented (Cadence) with account-based (EVM) models.
Token Escrow: Locks Flow native tokens when bridging to EVM, mints equivalent bridged tokens on EVM side, and maintains 1:1 backing ratio.
How Bridging Works
Flow → EVM (Bridging Out):
_101. User deposits USDC (Flow native) to bridge contract_102. Bridge locks USDC in escrow vault_103. Bridge mints equivalent bridged USDC on EVM side_104. EVM contract receives bridged USDC_105. Transaction hash recorded for verification
EVM → Flow (Bridging Back):
_101. EVM contract burns bridged USDC_102. Bridge receives burn notification_103. Bridge unlocks equivalent USDC from escrow_104. User receives USDC on Flow_105. Cross-chain operation complete
mUSDCStrategy: Cross-Chain Yield Farming
The mUSDCStrategy leverages the EVM bridge to access Ethereum-compatible ERC4626 yield vaults.
Strategy Architecture
_19graph TB_19 User[User Account] -->|Deposit USDC| Strategy[mUSDCStrategy]_19 Strategy -->|Bridge| Bridge[FlowEVMBridge]_19 Bridge -->|Lock USDC| Escrow[Escrow Vault]_19 Bridge -->|Mint| Bridged[Bridged USDC on EVM]_19_19 Strategy -->|Control| COA[CadenceOwnedAccount]_19 COA -->|EVM TX| EVMAddr[EVM Address]_19 EVMAddr -->|Deposit| Vault[ERC4626 Vault]_19_19 Vault -->|Yield| Accrue[Yield Accrual]_19 Accrue -->|Withdraw| EVMAddr_19 EVMAddr -->|Burn| Bridged_19 Bridge -->|Unlock| Escrow_19 Escrow -->|Return| User_19_19 style Strategy fill:#f9f_19 style Bridge fill:#bfb_19 style Vault fill:#bbf
Example: Depositing to Cross-Chain Vault
User deposits 1000 USDC:
_24Step 1: Bridge to EVM_24 - User deposits: 1000 USDC (Flow native)_24 - Bridge locks: 1000 USDC in escrow_24 - Bridge mints: 1000 bridged USDC on EVM_24 - Gas cost: ~0.001 FLOW (bridge fee)_24_24Step 2: COA Transaction_24 - Strategy controls EVM address via COA_24 - COA approves ERC4626 vault to spend USDC_24 - EVM transaction: approve(vault, 1000 USDC)_24 - Gas cost: ~0.00015 ETH (paid in bridged FLOW)_24_24Step 3: Deposit to ERC4626_24 - COA calls vault.deposit(1000 USDC)_24 - Vault mints shares to COA address_24 - Shares received: 1000 (1:1 ratio initially)_24 - Gas cost: ~0.0002 ETH_24_24Step 4: Track in AutoBalancer_24 - AutoBalancer records: Historical value = $1000_24 - Scheduling begins: Rebalance every 60s_24 - Cross-chain monitoring active_24_24Total setup cost: ~$2-5 (depending on gas prices)
Yield Accrual and Rebalancing
After yield accrues:
_24ERC4626 vault generates 8% APY over time:_24 - Initial shares: 1000_24 - After time: Shares worth 1080 USDC_24 - Current value: $1080_24 - Historical: $1000_24 - Ratio: 1.08 = 108% > 105% threshold_24_24Rebalancing trigger:_24 Step 1: Calculate excess_24 - Excess: $1080 - $1050 = $30_24_24 Step 2: Withdraw from EVM vault (via COA)_24 - COA calls vault.withdraw(30 USDC)_24 - EVM transaction gas: ~0.0002 ETH_24 - Bridged USDC received at EVM address_24_24 Step 3: Bridge back to Flow_24 - COA burns 30 bridged USDC_24 - Bridge unlocks 30 Flow USDC_24 - Bridge transaction fee: ~0.0005 FLOW_24_24 Step 4: Return to user_24 - User can claim or compound_24 - Net profit: $30 - gas costs ≈ $29.50
Supported ERC4626 Vaults
mUSDCStrategy can connect to any ERC4626-compliant vault on EVM-compatible chains:
Mainnet Vaults (Example)
| Vault Name | Address | Asset | APY Range |
|---|---|---|---|
| Yearn USDC | 0x... | USDC | 5-12% |
| Aave USDC | 0x... | USDC | 3-8% |
| Compound USDC | 0x... | USDC | 4-10% |
| Morpho USDC | 0x... | USDC | 6-15% |
Note: Vault addresses configured at strategy deployment time. Contact FYV team for current vault list.
Vault Selection Criteria
When choosing ERC4626 vaults for cross-chain farming, consider:
Security Audit: Vault must have recent professional audit, proven track record, and established protocol reputation.
Liquidity: Sufficient liquidity for deposits/withdrawals, low slippage on rebalancing, and reasonable withdrawal limits.
Yield Stability: Consistent yield history, low volatility in APY, and transparent yield source.
Gas Efficiency: Efficient deposit/withdraw operations, batching support if available, and reasonable gas costs relative to vault size.
Integration Compatibility: Full ERC4626 compliance, no special requirements or restrictions, and standard share accounting.
Gas Cost Considerations
Cross-chain operations incur gas costs on both Flow and EVM sides:
Cost Breakdown
Vault Creation (One-Time):
_12Flow side:_12 - Create strategy: ~0.001 FLOW_12 - Bridge setup: ~0.001 FLOW_12 - Register scheduler: ~0.0005 FLOW_12 Total Flow: ~0.0025 FLOW ($0.002 @ $0.80/FLOW)_12_12EVM side:_12 - Approve vault: ~0.00015 ETH_12 - Initial deposit: ~0.0002 ETH_12 Total EVM: ~0.00035 ETH ($0.70 @ $2000/ETH)_12_12Combined one-time cost: ~$0.70
Per Rebalance:
_10When no action needed (95%-105%):_10 - Flow: ~0.0001 FLOW ($0.00008)_10 - EVM: $0 (no transaction)_10 Total: ~$0.00008_10_10When rebalancing needed:_10 - Flow bridge: ~0.0005 FLOW ($0.0004)_10 - EVM withdraw: ~0.0002 ETH ($0.40)_10 - EVM burn: ~0.00015 ETH ($0.30)_10 Total: ~$0.70 per rebalance
Annual Gas Costs (Estimate):
_14Assumptions:_14 - Rebalancing every 60s = 525,600 checks/year_14 - 5% trigger rebalancing = 26,280 rebalances/year_14 - 95% no action = 499,320 no-ops/year_14_14Costs:_14 - No-ops: 499,320 × $0.00008 = $40_14 - Rebalances: 26,280 × $0.70 = $18,396_14_14Total annual gas: ~$18,436_14_14For $100K vault: 18.4% of capital (uneconomical!)_14For $1M vault: 1.84% of capital (marginal)_14For $10M vault: 0.184% of capital (acceptable)
Conclusion: Cross-chain strategies are most cost-effective for larger vaults ($1M+).
Bridge Security Considerations
Using the EVM bridge introduces additional security considerations:
Bridge Risk Factors
Escrow Security: Flow tokens locked in bridge escrow contract must be secure, audited, and monitored. Risk: Escrow hack could drain bridged assets.
Mint/Burn Integrity: Bridged tokens must maintain 1:1 backing ratio. Risk: Minting without locking could create unbacked tokens.
Cross-Chain Timing: Bridge operations aren't instant (typically 1-2 minutes). Risk: Price movements during bridging.
EVM Vault Security: ERC4626 vaults on EVM side have independent security models. Risk: Vault exploit affects bridged assets.
COA Control: Cadence contract controls EVM address via COA. Risk: COA vulnerability could compromise EVM assets.
Mitigation Strategies
Bridge Audits: Use only audited, established bridge infrastructure and verify escrow contract security.
Vault Vetting: Only connect to audited, reputable ERC4626 vaults with proven track records.
Diversification: Spread capital across multiple vaults and don't concentrate in single cross-chain vault.
Monitoring: Track bridge health metrics and monitor unusual bridge activity.
Limits: Implement per-vault and per-user caps to limit exposure.
Cross-Chain Transaction Flow
Complete cross-chain farming cycle:
_32sequenceDiagram_32 participant User_32 participant Strategy_32 participant Bridge_32 participant COA_32 participant EVM as EVM Vault_32_32 Note over User,EVM: Deposit Phase_32_32 User->>Strategy: deposit(1000 USDC)_32 Strategy->>Bridge: bridge(1000 USDC)_32 Bridge->>Bridge: Lock in escrow_32 Bridge->>COA: Mint 1000 on EVM_32 COA->>EVM: deposit(1000 bridged USDC)_32 EVM-->>COA: 1000 shares_32_32 Note over User,EVM: Yield Accrual_32_32 EVM->>EVM: Generate yield_32 EVM->>EVM: Shares now worth 1080 USDC_32_32 Note over User,EVM: Rebalancing_32_32 Strategy->>COA: Check balance_32 COA->>EVM: balanceOf()_32 EVM-->>COA: 1080 USDC_32 Strategy->>COA: withdraw(30 USDC)_32 COA->>EVM: withdraw(30)_32 EVM-->>COA: 30 bridged USDC_32 COA->>Bridge: burn(30 USDC)_32 Bridge->>Bridge: Unlock from escrow_32 Bridge-->>User: 30 USDC (Flow native)
Best Practices
Vault Size Matters: Only use cross-chain strategies for larger vaults ($1M+) where gas costs are < 2% of capital.
Monitor Gas Prices: Track EVM gas prices and pause rebalancing during high gas periods if needed.
Understand Bridge Risk: Cross-chain farming adds bridge security risk on top of vault risk.
Diversify: Don't put all capital in cross-chain vaults—balance with native Flow strategies.
Track Costs: Monitor actual gas costs vs. yields to ensure profitability.
Emergency Access: Understand how to manually withdraw if automation fails.
Summary
Cross-chain integration via mUSDCStrategy enables access to Ethereum-compatible ERC4626 vaults from Flow, leveraging the Flow-EVM bridge for asset transfer and CadenceOwnedAccounts for EVM control. This unlocks broader yield opportunities while introducing additional gas costs and bridge security considerations.
Key tradeoffs:
- Benefit: Access to mature Ethereum DeFi yield
- Cost: Higher gas fees from cross-chain operations
- Risk: Bridge security and cross-chain timing
Optimal use case: Large vaults ($1M+) seeking diversified yield sources across chains.
Cross-chain yield farming is powerful but gas-intensive. It's most suitable for large vaults where gas costs are a small percentage of capital. For smaller vaults, native Flow strategies like TracerStrategy are more cost-effective.