Inspiration

Banks pay you almost nothing on deposits. On-chain yield vaults and tokenized stocks exist, but accessing them requires wallets, seed phrases, and crypto knowledge. We wanted to make it disappear: a bank wire goes in, tokenized stocks or yield comes out. No crypto UX at all.

What it does

Fluid Stocks is a full TradFi-to-DeFi pipeline. A user sends a bank wire and everything else is automated:

  1. Fiat converts to USDC via a bank onramp
  2. USDC is swapped on-chain into tokenized stocks (TSLAx) or yield-bearing tokens (aUSD)
  3. Tokens land in a smart account (Safe) that is predicted off-chain and auto-deployed on first use
  4. A custom Safe module auto-deposits tokens into ERC-4626 yield vaults through a wrapper that transparently extracts a curator fee

No wallet creation, no transaction signing, no crypto interface. Wire money, earn yield.

How we built it

  • Smart contracts (Solidity/Foundry): A SafeEarnModule installed on each Safe as a module, enabling relayer-triggered deposits and withdrawals into any whitelisted ERC-4626 vault. A VaultWrapper that sits between depositors and the underlying vault, extracting a curator fee via virtual share dilution. A VaultWrapperFactory for deterministic wrapper deployment via CREATE2, one per (vault, fee) pair.
  • Backend (AWS CDK/TypeScript): The orchestration layer. Listens for on-chain activity via Alchemy webhooks, creates predicted Safe addresses before any transaction happens, and triggers auto-earn deposits when tokens arrive. Batches Safe deployment + vault deposits into single multicall transactions when needed.
  • Frontend (Next.js): Dashboard showing deposit addresses, portfolio balances, vault APYs, and transaction history.

Challenges we faced

  • Transparent fee extraction from yield vaults: Building a wrapper around any ERC-4626 vault that permissionlessly collects a curator fee without user interaction. The VaultWrapper tracks yield growth via asset checkpoints and captures a percentage by minting new shares to the fee collector, keeping share price transitions smooth with no sudden drops.
  • Smart account modules as automated executors: Using Safe modules to move user assets into vaults without requiring their signature. The module acts as an authorized executor triggered by a backend relayer, which is the key enabler for the entire zero-UX flow.

What we learned

ERC-4626 is a powerful standard but wrapping it with a transparent fee layer is non-trivial. Virtual share dilution is elegant in theory but checkpoint ordering (snapshot before share math, update after vault interaction) is critical to avoid double-counting. Smart account modules are the missing piece for automated DeFi - they turn a wallet into something that acts on its own.

What's next for Fluid Stocks

  • Multi-chain expansion - deploy the module and wrappers on L2s where gas costs make small deposits viable
  • Vault opensource - let curators propose new vault/fee combinations and users opt in, turning Fluid Stocks into a permissionless distribution layer for any ERC-4626 vault

Built With

Share this project:

Updates