On-chain · Non-custodial · Aave v3 · Base
Your assets.
Your leverage.
No exchange.

2x–4x leveraged longs and shorts on WETH, wstETH, cbBTC, and USDC — directly in your wallet via Aave v3. No funding rates. No custodial risk. One atomic transaction.

Leverage Agent — Base
👤
open a 3x ETH long with 1 ETH
I'll open a 3x WETH long. You'll supply 1 ETH, flash borrow ~$5,000 USDC, swap it to WETH, and supply it all to Aave — ending up with ~3 ETH collateral against ~$5,000 USDC debt. Est. health factor: 1.65. Protocol fee: ~$0.45.
Approve WETH
Delegate Borrowing
3
Open Position
3x ETH long 2x wstETH loop Health check Close position Explain risks
Ask anything about your position…
Send
0 funding
No funding rate ever
1 tx
To open any position
< $0.05
Gas on Base
Self-custody
Assets stay in your wallet

How it works

Six steps. One block.

Loop leverage manually on Aave takes 6 transactions and 20 minutes. This does it atomically — the whole thing either completes or reverts. You're never left in a half-open state.

STEP 01

You approve & delegate

Two one-time approvals: allow the vault to pull your seed collateral, and credit-delegate so it can borrow on your behalf to repay the flash loan.

STEP 02

Flash loan + swap

The vault flash borrows the leveraged amount from Aave, swaps it to your supply asset on Uniswap v3 with live slippage protection, and supplies everything to Aave.

STEP 03

Your position is live

Aave borrows on your behalf to repay the flash loan. The transaction settles. Your leveraged position — aTokens and debt — lives entirely in your own wallet.

Strategies

Long, short, or loop — all on Base.

Every position uses real Aave v3 liquidity. Max leverage is enforced by Aave's LTV parameters — the API rejects requests that would exceed the cap before any transaction is built.

💡
On short positions you can earn a positive net APY while you wait
Your USDC collateral earns supply APY (~2–4%). If BTC or ETH borrow rates are low (currently ~0.8–2%), the net carry is positive — you're being paid to hold the short. This is structurally similar to receiving funding on a CEX perp short, except the rate is driven by Aave utilization rather than market sentiment, and it's unconditional — it accrues whether or not longs outnumber shorts.
⟠ Long ETH
up to 4.5x
Supply WETH or native ETH, borrow USDC. Profits when ETH price rises. Your WETH collateral accrues supply APY while the position is open.
Supply: WETH / ETH Borrow: USDC Liq. threshold: 83%
🔷 Long wstETH
up to 4.3x
Supply wstETH, borrow WETH. Earns staking yield on the full leveraged collateral — staking APY partially or fully offsets the WETH borrow cost.
Supply: wstETH Borrow: WETH Liq. threshold: 82%
🟠 Long cbBTC
up to 3.3x
Supply cbBTC, borrow USDC. Leveraged BTC exposure on Base. Lower LTV than ETH means tighter leverage limits — max safe is 3.3x.
Supply: cbBTC Borrow: USDC Liq. threshold: 78%
↘ Short ETH
up to 3.9x
Supply USDC, borrow WETH. Profits when ETH price falls. USDC supply APY minus WETH borrow rate often produces a net positive carry — you earn while you wait for the trade to play out.
Supply: USDC Borrow: WETH Liq. threshold: 78%
↘ Short BTC
up to 3.9x
Supply USDC, borrow cbBTC. Profits when BTC price falls. cbBTC borrow rates are historically low (~0.8–1%) — combined with USDC supply APY, net carry is typically positive.
Supply: USDC Borrow: cbBTC Liq. threshold: 78%

Access

Three ways to use it.

Whether you're a human clicking through a UI, a bot running strategies, or an AI agent, there's a native interface.

💬

Chat UI

Connect your wallet and describe what you want in plain English. The agent figures out the strategy, builds the transaction plan, and walks you through each signing step.

Free · PoW gated
🤖

MCP Server

Connect any MCP-compatible AI agent (Claude Desktop, custom agents). Buy a session with USDC via x402 — one payment covers unlimited calls for the session window. Sessions are wallet-bound and non-transferable.

MCP Integration

Connect your agent in two steps.

The server speaks JSON-RPC 2.0 over HTTP. Any MCP-compatible client works — Claude Desktop, a custom Python agent, or the strategy bot in this repo.

STEP 1
Buy a session

POST to /mcp/auth with an x402 USDC payment (EIP-3009 transferWithAuthorization). Choose your window: hour, day, week, or month. You receive a Bearer token valid for that duration.

STEP 2
Call tools

POST JSON-RPC 2.0 requests to /mcp with your Bearer token. All 11 tools are available immediately — no per-call fees.

POST https://aave-leverage-agent-production.up.railway.app/mcp
POST https://aave-leverage-agent-production.up.railway.app/mcp/auth  ·  session purchase

Claude Desktop config

{ "mcpServers": { "leverage-agent": { "command": "npx", "args": ["-y", "mcp-remote", "https://aave-leverage-agent-production.up.railway.app/mcp"], "headers": { "Authorization": "Bearer <your-session-token>" } } } }

Available tools

get_position

Read current Aave position: supplies, borrows, health factor, liquidation price, APRs.

chat

Natural language interface. Describe a strategy in plain English — the agent plans and builds it.

prepare_open

Build a signed payload to open a new leveraged position at a specified leverage and seed amount.

prepare_close

Build a signed payload to fully close an open position in one atomic flash-loan transaction.

prepare_reduce

Reduce leverage on an open position to a target multiplier without closing it.

prepare_increase

Increase leverage on an open position up to the per-asset Aave LTV cap.

swap

Swap between WETH, wstETH, cbBTC, and USDC via Uniswap v3 with live slippage protection.

prepare_supply

Supply an asset directly to Aave v3 without leverage.

prepare_borrow

Borrow an asset from Aave v3 against existing collateral.

prepare_repay

Repay outstanding debt on Aave v3. Pass amount: "max" to repay in full.

prepare_withdraw

Withdraw supplied collateral from Aave v3.

All prepare_* tools return a signed transaction payload ready to submit on-chain. No private key is ever sent to the server — signing happens in your wallet.

Security

📖
Beta — contracts not yet independently audited. All contract source code is fully verified and open source on Basescan. Before opening a position, you and your agent should read the contracts — every security property can be verified directly on-chain.

Non-custodial by design.

The contract never holds your funds. Every security property is either enforced on-chain or verifiable by the caller.

ContractAddressSource
LeverageRouterV4 0x4A60C1E7d78DA2A61007fE21d282a859D3906724 Verified ↗
LeverageVaultV4 0xf2A51d441E6bA96c37fD0024115DccF03764478f Verified ↗
Aave v3 Pool 0xA238Dd80C259a72e81d7e4664a9801593F98d1c5 Verified ↗
Uniswap QuoterV2 0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a Verified ↗
🔒

Non-custodial vault

The vault is a stateless execution engine. Your aTokens and debt tokens live in your Aave account — not the contract. The vault cannot withdraw or transfer your assets.

🔐

Immutable contracts

V4 contracts have no owner, no admin keys, and no upgrade path. The router, vault address, and fee rate are hardcoded at deploy time. The only mutable field is feeRecipient, transferable only by the current recipient.

🛡

Live slippage protection

Every swap uses a minOut value computed via Uniswap's QuoterV2 at call time. If a sandwich attack would force a worse fill, the transaction reverts automatically.

✍️

HMAC-signed responses

API responses from paid endpoints carry an X-Signature header. Programmatic callers can verify the calldata wasn't tampered with in transit before submitting.

📊

Health factor display

Your live health factor and liquidation price are shown every time you check your position. You stay in control — close any time with a single transaction.

📋

LTV enforcement

Requests above Aave's per-asset LTV cap are rejected before the LLM runs or any transaction is built. You get a clear error with the actual safe maximum for that asset.

Fees

What does it actually cost?

All fees on a $5,000 seed opened at 3x ($10,000 flash loan): roughly $24 total — about 0.24% of notional. The web UI is free — x402 session fees only apply to MCP / API agent integrations.

Fee Rate Paid to $5k seed at 3x ($10k flash)
Aave flash loan 9bps (0.09%) Aave protocol ~$9.00
Uniswap swap 5bps (0.05%) Uniswap LPs ~$5.00
Protocol fee 10bps (0.10%) Protocol operator ~$10.00
MCP / API session (x402)
Agents & bots only — web UI is free
$0.05/hr · $0.25/day · $1.50/week · $4.00/month API operator
Gas (Base) Base validators < $0.05

* All three fees (flash loan, swap, protocol) are charged on the flash-borrowed amount — not the seed. At 3x, the flash loan is 2× the seed.
† Uniswap price impact is separate from the pool fee and depends on position size and pool liquidity. Typically <0.05% for standard WETH/USDC sizes on the 0.05% tier. Slippage protection is enforced automatically via on-chain quoter.

How it compares.

Our open cost is higher than CEX taker fees. The advantage is holding cost: you pay Aave borrow APR (~3–8% APY) instead of a funding rate that historically runs 20–60% APY during bull markets — and spikes higher. There is also no counterparty risk and no custody.

Platform Open fee Slippage / spread Ongoing holding cost Custodial
Leverage Agent (this) ~0.24% notional Uniswap price impact
typically <5bps at $10k
Aave borrow APR
~3–8% APY
No
Binance / Bybit perp ~0.05% (taker) ~1–2bps spread
very tight for ETH/BTC
Funding rate
~20–60% APY in bull markets
can spike to 100–330% APY
Yes
GMX v2 ~0.05–0.07% Price impact fee
pool-dependent
Borrowing fee
~0.01–0.03%/hr variable
No
Hyperliquid ~0.035% (taker) Order book spread
~2–5bps typical
Funding rate
same dynamics as CEX
No
DeFi Saver (on-chain) ~0.25% service fee DEX swap spread
~5–15bps
Aave borrow APR
~3–8% APY
No
Manual Aave looping ~0.14% (flash + swap only) Uniswap price impact Aave borrow APR
same as us
No

CEX funding rates were positive 97% of days in 2024. ETH funding briefly exceeded 110% annualized during the Feb 2024 ATH run and sustained 33–77% APY for weeks post-election in Nov 2024. CEX spreads are tight (1–2bps for ETH) but do not offset funding. Aave borrow APR is utilization-driven and far more stable.

Manual Aave looping avoids the 10bps protocol fee but requires 9+ sequential transactions with no atomicity — partial completion leaves you in a risky intermediate state. DeFi Saver is the closest on-chain alternative at 0.25% service fee.

We use Aave v3 flash loans (9bps). Protocols that relied on Balancer for free flash loans face infrastructure risk — Balancer Labs dissolved as a corporate entity in March 2026 following a $110M exploit, and TVL has fallen ~95% from peak. Aave v3 is the more stable long-term flash loan infrastructure.

Your assets don't belong on an exchange.

Connect your wallet and open a leveraged position directly on Aave v3 — no account, no KYC, no custody, no funding rate.

Open a position →