I Built Three DeFi Tools. Here's What I Learned.
DeFi has an interface problem.
The protocols are great. Aave, Lido, Curve — battle-tested, generating real yield, running for years without incident. The problem is the 8,000 steps between "I have ETH" and "my ETH is working."
I've been trying to close that gap for two years. Here's what happened.
Chapter 1: YieldMax (The Scraper)
First thing I built was YieldMax — a yield aggregator that hit DeFi Llama's API and sorted pools by APY. Simple. Useful. Done in a weekend.
It answered one question well: where is the highest APY right now?
Then tools like Exponential.fi came along and answered the same question with actual research — risk ratings, protocol audits, editorial depth. YieldMax was a scraper. Exponential is a product.
That gap is embarrassing if you're attached to your first version. I wasn't. Move on.
But something still bugged me. Even Exponential has the same core problem: it tells you what to think, not what to do with your specific capital, right now, from your wallet.
That's a different problem. That's the one worth solving.
Chapter 2: Alpha-Drift (The Agent)
While I was thinking about the capital allocation problem, I went sideways into a trading agent — alpha-drift. Momentum, carry, arb strategies. Fully autonomous. CLI-first.
It was fun to build. It was also a dead end as a product.
The CLI format is exactly right for a trading agent — logs, cron jobs, direct RPC. The feedback loop is the terminal. Wrapping a trading agent in a React UI is the wrong move at every stage of development. I didn't make that mistake.
What I did learn: the execution layer in DeFi is adversarial and fast. Gas estimation, slippage, MEV — this is not the same problem as the discovery layer. They need different architectures.
That lesson will matter later.
Chapter 3: Capital Engine (The Thing I Was Actually Building)
Capital Engine launched last week. It's the synthesis.
The core idea: instead of sorting by APY (which rewards mercenary liquidity and penalises stable protocols), score every pool by capital efficiency — a weighted mix of yield, safety, and TVL depth. Then group into bands: Anchor (boring, reliable, core allocation), Balanced (established protocols, satellite allocation), Opportunistic (high yield, capped exposure, don't put rent money here).
Connect your wallet. It reads your actual ETH balance and projects your monthly and annual returns at current yields. Not hypothetical capital. Yours.
That's it. No swaps. No approvals. Read-only.
That constraint was deliberate. A tool that reads well earns the right to act.
How the data pipeline works
DeFi Llama's yields API covers 8,000+ pools and returns ~17MB of raw JSON. The app processes this server-side every 5 minutes (Next.js ISR), filters to pools with positive APY and at least $1M TVL, scores each one, and serves pre-rendered HTML. The 17MB payload never hits your browser. The Capital Efficiency Score weights yield at 40%, safety at 45%, and TVL depth at 15% — the safety component penalises impermanent loss exposure, mercenary reward flags, and unaudited protocols.
The Wallet Situation
Two connectors: the injected wallet you already have (MetaMask, Rabby, Coinbase), and Porto — a passkey-based smart wallet that uses your Face ID or Touch ID instead of a seed phrase.
I added Porto because seed phrases are a bad primitive and I refuse to pretend otherwise. A 24-word string that gives permanent, irrevocable access to everything if anyone sees it — that's not a security model, that's a liability. Passkeys store the signing key in your device's secure hardware. It never leaves. It can't be phished because it's scoped to the domain. It syncs across your devices through iCloud or Google Password Manager.
It's just better. And it's ready now.
How Porto and EIP-7702 work
Porto implements EIP-7702, which lets an EOA temporarily delegate execution to a smart contract implementation. This enables smart account features — session keys, batched transactions, gas sponsorship — without requiring a permanent contract wallet. The passkey (WebAuthn / FIDO2) handles signing via the device's Secure Enclave or TPM. Authentication never leaves the device. The passkey is cryptographically scoped to the origin domain, which makes phishing attacks structurally impossible.
Testing: The Honest Answer
The app has unit tests, component tests, and E2E tests. The E2E layer uses a lightweight wallet mock instead of Synpress (the tool that automates real MetaMask extension flows).
Why? Because the app is read-only. There's nothing to approve. Running a 3-minute MetaMask automation suite to test "can I see my balance" is absurd. The mock covers the full wallet state machine — connect, disconnect, error, copy address — without the overhead.
When the app starts submitting transactions, Synpress earns its place. Not before.
Test stack details
Unit and component tests use Vitest + Testing Library. The Capital Efficiency Score algorithm has full boundary condition coverage — if the scoring weights drift, the tests catch it immediately. E2E tests use Playwright with a custom EIP-1193 + EIP-6963 mock injected via page.addInitScript(). The yield E2E tests intentionally hit the live DeFi Llama API to verify the full pipeline: fetch → score → filter → render.
Where This Goes
Next up: price oracle (so the projections use real ETH price, not $3,200 hardcoded), ERC20 balances, mobile wallet support.
After that: 1-click routing. You see the top Anchor pick — you click it — it opens a pre-filled 1inch swap. Capital Engine tells you where; the aggregator handles execution.
Then: protocol adapters. Aave, Lido, Compound — standardised deposit/withdraw interfaces. This is also where staking lands. Lido stETH is just one of the adapters. Building it as a one-off now would be the wrong shape; building it inside a consistent adapter pattern later is the right shape.
And alpha-drift becomes a service. The discovery layer (Capital Engine) identifies where capital should go. The execution layer (alpha-drift) handles how it gets there. One API contract between them. The CLI agent becomes the backend of the execution module.
The Real Point
YieldMax was a scraper. Alpha-drift is an agent. Capital Engine is a platform in progress.
None of these are the destination. The destination is a single interface where you can discover yield, understand risk, route capital, and track positions — all from a wallet that doesn't require you to memorise 24 words and hope nobody's watching.
That interface doesn't exist yet. This is what building it looks like.
web3.hyperdrift.io — live, read-only, no approvals required.
Get weekly intel — courtesy of intel.hyperdrift.io