ZyfaiSelf-Sustaining

Zyfai

Self-sustaining yield engine — idle capital earns yield that funds Darwin's operations across all chains.

Why Zyfai Matters

Before: Fixed Budget Agent

  • Agent draws from a manually-funded wallet
  • When wallet runs dry, agent stops
  • Requires human intervention to top up
  • USDC sits idle in vault earning 0%

After: Self-Funding Yield Agent

  • DARW-EU's 50% USDC → Zyfai → Aave/Morpho/Compound
  • Yield harvested → Locus wallet → funds rebalancing
  • 100% autonomous earn→spend loop
  • Agent never stops — self-sustaining

How It Works

1

Detect Idle Capital

Every 30s, the agent scans Base baskets for USDC not needed for imminent rebalances. DARW-EU always has ~50% idle USDC.

2

Deposit into Zyfai Safe

Agent calls sdk.depositFunds() to move idle USDC into a Zyfai Safe smart wallet on Base.

3

Auto-Optimize Yield

Zyfai engine routes USDC across Aave, Morpho, Compound for optimal APY.

4

Harvest & Fund Locus

Every 24h (or on emergency), agent harvests yield and tops up the Locus spending wallet.

5

Pay Rebalances

Agent pays for rebalance swaps through Locus using USDC funded by Zyfai yield. Loop repeats.

Agent Runner Integration

Every 30 seconds (Base chain cycle):
│
├── evaluateAndDepositIdle()
│   └── For each basket: idle USDC > $100?
│       ├── YES → sdk.depositFunds() → Zyfai Safe
│       └── NO  → skip
│
├── harvestAndFundLocus()
│   └── 24h since last harvest?
│       ├── YES → sdk.withdrawFunds() → Locus wallet
│       └── NO  → skip
│
├── Per basket: check drift
│   └── drift > threshold?
│       ├── YES → emergencyLocusTopUp() → rebalance
│       └── NO  → skip (keep monitoring)

Zyfai SDK Methods

deploySafe()Deploy Safe wallet on Base
createSessionKey()Automated yield access
depositFunds()Route idle USDC to yield
withdrawFunds()Harvest yield to EOA
getPositions()Track earnings + APY

Synthesis Hackathon

Track 3: Yield-Powered AI Agents — $600

Agent deposits idle funds into Zyfai
Yield generated through DeFi protocols
Yield harvested and used for operations
Self-sustaining earn→spend loop
On-chain audit trail for all actions
DARW-EU showcase vault with permanent idle USDC

Safe Details

Safe Address0xaFd6bD49...5eF
Showcase Vault0x1a6213...e585
ChainBase (8453)
TypeZyfai Smart Account
OwnerDarwin Agent

darwin

Autonomous on-chain portfolios powered by AI agents.

GitHubTwitterTelegram

Chains

  • Unichain
  • Base
  • Celo

Community

  • Twitter
  • Telegram
  • GitHub
  • Devfolio

© 2025 Darwin Protocol. All rights reserved.

Built during Synthesis Hackathon

darwin