
What is Margin Call?
Margin Call lets you create positions in Coinbase tokenized stocks on Base. Deposit a supported token such as NVDAc as collateral and, if you want, borrow USDC to buy more of the same stock.
Each position is a living NFT — a puppy that changes with your health, plus an optional onchain thesis. You can hold it, repay it, close it, or transfer it.

How it works
- 1
Deposit
Deposit a Coinbase tokenized stock on Base, such as NVDAc — not the listed share.

- 2
Borrow
Borrow USDC against your collateral. Choose 1.0x to open without borrowing.

- 3
Get more of the same
Borrowed USDC buys more of your position’s same stock. It cannot be withdrawn as cash.

- 4
Your position NFT
You get a living puppy NFT: stock, debt, and an optional thesis, all onchain.

Pick leverage when you open: 1.0x, 1.1x, 1.25x, 1.4x, or 1.5x. You cannot increase it later. 1.0x has no borrow interest and cannot be liquidated. Borrowing increases both exposure and risk: a financed position can be liquidated if its equity falls below 30% of its stock value.
After you open, repay USDC to clear interest then principal. Once debt is zero, close returns the remaining stock and burns the NFT.
Pricing
Chainlink total-return price feeds value your tokenized stocks and determine position health. Stock purchases and sales execute through Uniswap V3.
Market pricing availability
Margin Call uses fresh U.S. equity pricing to value collateral, calculate leverage, and enforce liquidation rules.
New leveraged positions can only be opened while fresh market pricing is available. This is typically during regular U.S. trading hours, Monday–Friday, excluding market holidays.
When fresh pricing is unavailable — for example overnight, on weekends, during market holidays, or during a pricing interruption — Margin Call pauses new leveraged positions rather than relying on stale prices.
Existing positions remain onchain. Debt continues to accrue normally, but actions that require live pricing remain subject to the protocol’s oracle safety checks.
Onchain.
Position NFTs
A living puppy for your position, onchain.
- A puppy that changes with position health
- Optional thesis, immutable once minted
- Transfer control to another wallet
- One NFT. One stock. Stock and debt stay put.
An optional thesis (up to 280 bytes) is recorded when you open. It cannot be edited later, and it remains readable after close or liquidation.
Transfers are supported; a built-in marketplace is not yet available.

Supported Assets
Four Coinbase tokenized stocks, live on Base — not the listed shares. Each position holds one stock from the current supported set.
NVDAc
AAPLc
METAc
GOOGLc
FAQ
Can I close my position anytime?
Close once all USDC principal and accrued interest are repaid. Closing returns the remaining stock and burns the NFT. Repaying with USDC from your wallet does not need a live price feed.
What happens if my position is liquidated?
A financed position can be liquidated when pricing is live and equity is below 30% of its stock value. The NFT is burned. Leftover USDC after debt goes to the owner. A shortfall is absorbed by the protocol — it is not a personal debt. 1.0x positions cannot be liquidated.
What are the fees?
Borrowing accrues simple interest at a fixed 10% APR on outstanding principal. A 1.0x position has no borrowing interest. Swaps incur venue fees and may have price impact; transactions also require Base network gas.
Where do the prices come from?
Chainlink total-return price feeds value the stock for position health and solvency. Actual purchases and sales execute through Uniswap V3, where execution prices can differ from the oracle price. Actions that need pricing require a valid, live feed.
Why can’t I open a leveraged position right now?
Margin Call requires fresh U.S. market pricing before creating new leveraged debt. Fresh pricing is typically available during regular U.S. trading hours, Monday–Friday, excluding market holidays. If pricing is stale or unavailable, new leveraged positions are temporarily paused.
Can I sell my position NFT?
The NFT is transferable using standard ERC-721 transfers. Control of the existing position passes to the new owner, with the stock and debt unchanged. Margin Call does not currently provide listings, bids, or purchase settlement, and does not guarantee a secondary market.
What tokenized stocks are supported?
Coinbase tokenized equities on Base: NVDAc, AAPLc, METAc, and GOOGLc. Deposit those tokens, not NVDA, AAPL, META, or GOOGL. Each position holds one stock, and any borrowed USDC buys more of that same stock.
Agents & builders
Give your agent access to leveraged tokenized-stock positions on Base. Bring any Base-capable wallet: Dynamic, Bankr, Coinbase, or your own signer. Dynamic is not required. It is an optional developer reference for agents that start without a wallet. Your agent runs in your own runtime; this website is the visual product surface.
Bring your own wallet
- Your agent queries Margin Call’s public API or MCP for assets, pricing, credit, and quotes.
- It acquires the canonical supported stock through its own swap provider.
- Margin Call prepares unsigned transactions for the intended Base wallet.
- Your wallet signs and submits; the Position NFT belongs to the calling wallet.
Public reads and quotes need no authentication, API key, wallet, or caller-supplied RPC when using the hosted endpoints. Preparation needs your wallet address and sufficient stock. A wallet is needed to sign onchain actions; any compatible Base signer can execute the prepared transactions.
- Margin Call
- Supported assets, market pricing, credit/readiness, quotes, unsigned preparation, Base contracts, and Position NFTs.
- Your agent
- Reasoning and decisions in your own runtime.
- Your wallet provider
- Identity/address, signing, and broadcasting transactions.
- Your swap provider
- Acquiring the required supported stock through Uniswap, existing wallet tooling, or another available route.
Already have a Bankr-style agent with a Base wallet? Query supported assets, use its existing swap capability to acquire the exact stock token, call quote/prepare, then sign and submit with that same wallet. No Dynamic setup is needed; this is a portability example, not a Bankr integration.
Public API / MCP quickstart
HTTP: https://margincall.fun/api/agent
Streamable HTTP MCP: https://margincall.fun/api/mcp
In a client supporting remote Streamable HTTP MCP, add:
{
"mcpServers": {
"margin-call": {
"url": "https://margincall.fun/api/mcp"
}
}
}get_assets- Supported stocks, canonical addresses, and leverage presets
get_market_state- Fresh pricing and whether new leveraged positions can open
get_credit_pool- Available lending credit
quote_open- Position sizing and estimated borrowing
get_position- Live Position NFT ownership, debt, and health
prepare_open- Unsigned Base transactions for the intended wallet
Try this prompt in your agent:
Check whether I can open a 1.25x NVDAc position right now and prepare the transactions if I can.
Start with GET /api/agent/assets and GET /api/agent/market-state?asset=NVDAc, then POST /api/agent/quote-open. Once the wallet holds stock, prepare the open:
# Replace with the Base address that will sign.
WALLET=0xYourBaseAddress
curl -X POST https://margincall.fun/api/agent/prepare-open \
-H 'Content-Type: application/json' \
-d "{\"wallet\":\"$WALLET\",\"asset\":\"NVDAc\",\"stockAmount\":\"1000000\",\"leverage\":12500}"stockAmount is a decimal string in base units: "1000000"means 0.01 NVDAc (8 decimals). Leverage 12500 means 1.25x. The returned transactions contain unsigned to, data, value, and chainId (8453 for Base). The public service never signs or broadcasts.
Check ok before using a response. Refusals can have HTTP status 200; branch on code and stop if ok: false. Submit transactions in order from the supplied wallet, waiting for each successful receipt before continuing. Stop on a failed receipt. Decode PositionOpened from the open receipt for the token ID, then call get_position. Preparation is not a guarantee of execution.
Fresh market pricing is typically available during regular U.S. trading hours, Monday–Friday, excluding market holidays. When fresh pricing is unavailable, Margin Call pauses new leveraged positions rather than relying on stale prices. Do not silently fall back to 1.0x. Live pricing still requires an enabled asset, enough credit and stock, and successful execution.
Developer example: start an agent without a wallet
This section is for developers who want to run the Margin Call reference implementation locally. You do not need to clone the repository or use Dynamic to call Margin Call’s public API or MCP.
If your agent already has a Base-capable wallet, skip this section.
The reference implementation uses Dynamic to provision a server wallet so you can see how a walletless agent could be built. Dynamic is not a Margin Call dependency.
Clone the repository first:
git clone https://github.com/hurley87/margin-call.git
cd margin-call
pnpm installThese environment variables are local developer configuration for this reference implementation. They are not needed for the hosted Margin Call API or MCP:
DYNAMIC_ENVIRONMENT_ID(orNEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID)DYNAMIC_API_TOKENDYNAMIC_WALLET_PASSWORDUNISWAP_API_KEY- optional
BASE_RPC_URL
In Dynamic, enable embedded wallets and multiple embedded wallets per chain. Keep credentials server-side. Set UNISWAP_API_KEY for acquisition. A provisioned BASE_RPC_URL is recommended for the local demo; otherwise it falls back to NEXT_PUBLIC_BASE_RPC_URL or the public Base RPC.
# Provision or resolve a Base wallet
pnpm agent:wallet
# After manually funding the address with Base ETH + USDC:
pnpm agent:wallet --acquire --asset NVDAc --usdc 2
# When fresh market pricing is available:
pnpm agent:wallet --open --asset NVDAcThe open command defaults to the wallet’s full balance of the chosen stock; use --stock with a human decimal amount to limit it. If you combine --acquire --open, acquisition runs before the open’s pricing gate, so a stock swap may complete even when opening is refused.
- Pricing unavailable: the open step refuses to create leveraged debt and submits no open transactions. Refusing is a valid outcome.
- Pricing live and checks pass: Dynamic signs and submits, the demo waits for successful receipts, and the Position NFT is minted to the Dynamic wallet.
Follow the demo stages: Dynamic wallet (#490), public tools (#491), stock acquisition (#492), and wallet-agnostic financed open (#493).
See the full API reference and execution example. The public tools currently read and prepare opens; they do not expose repay, close, or liquidate tools, hosted agent accounts, or autonomous position management.