LLM Notice: This documentation site supports content negotiation for AI agents. Request any page with Accept: text/markdown or Accept: text/plain header to receive Markdown instead of HTML. Alternatively, append ?format=md to any URL. All markdown files are available at /md/ prefix paths. For all content in one file, visit /llms-full.txt
Skip to main content

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):


_10
1. User deposits USDC (Flow native) to bridge contract
_10
2. Bridge locks USDC in escrow vault
_10
3. Bridge mints equivalent bridged USDC on EVM side
_10
4. EVM contract receives bridged USDC
_10
5. Transaction hash recorded for verification

EVM → Flow (Bridging Back):


_10
1. EVM contract burns bridged USDC
_10
2. Bridge receives burn notification
_10
3. Bridge unlocks equivalent USDC from escrow
_10
4. User receives USDC on Flow
_10
5. Cross-chain operation complete

mUSDCStrategy: Cross-Chain Yield Farming

The mUSDCStrategy leverages the EVM bridge to access Ethereum-compatible ERC4626 yield vaults.

Strategy Architecture


_19
graph 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:


_24
Step 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
_24
Step 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
_24
Step 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
_24
Step 4: Track in AutoBalancer
_24
- AutoBalancer records: Historical value = $1000
_24
- Scheduling begins: Rebalance every 60s
_24
- Cross-chain monitoring active
_24
_24
Total setup cost: ~$2-5 (depending on gas prices)

Yield Accrual and Rebalancing

After yield accrues:


_24
ERC4626 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
_24
Rebalancing 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 NameAddressAssetAPY Range
Yearn USDC0x...USDC5-12%
Aave USDC0x...USDC3-8%
Compound USDC0x...USDC4-10%
Morpho USDC0x...USDC6-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):


_12
Flow 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
_12
EVM side:
_12
- Approve vault: ~0.00015 ETH
_12
- Initial deposit: ~0.0002 ETH
_12
Total EVM: ~0.00035 ETH ($0.70 @ $2000/ETH)
_12
_12
Combined one-time cost: ~$0.70

Per Rebalance:


_10
When no action needed (95%-105%):
_10
- Flow: ~0.0001 FLOW ($0.00008)
_10
- EVM: $0 (no transaction)
_10
Total: ~$0.00008
_10
_10
When 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):


_14
Assumptions:
_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
_14
Costs:
_14
- No-ops: 499,320 × $0.00008 = $40
_14
- Rebalances: 26,280 × $0.70 = $18,396
_14
_14
Total annual gas: ~$18,436
_14
_14
For $100K vault: 18.4% of capital (uneconomical!)
_14
For $1M vault: 1.84% of capital (marginal)
_14
For $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:


_32
sequenceDiagram
_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.


Key Takeaway

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.