x402.press SpiralStake
function-toolkit

SpiralStake

A non-custodial Morpho leverage-execution gateway behind x402 micropayments: discover and simulate leverage strategies, and build unsigned transactions for any agentic AI.

leveraged-yieldmorphonon-custodial-leveragedefiflash-loansx402micropayments

What is SpiralStake?

SpiralStake is an x402 micropayment gateway to Spiral Stake's non-custodial leverage execution layer on Morpho. It exposes the same seven tools as the Spiral Stake MCP server as plain HTTP endpoints, payable in USDC or EURC through the x402 two-round HTTP 402 handshake via the central facilitator. An agent reads live strategies, prices, and on-chain positions; runs a deterministic simulation of a leveraged position with no wallet; then builds an unsigned transaction bundle that a human reviews and signs locally. It serves two profiles: Leveraged Yield on correlated pairs, where leverage multiplies the spread between collateral yield and the borrow rate, and Leveraged Long on non-correlated pairs for directional exposure without selling the base asset. Positions are non-custodial and isolated per user, each in its own UserProxy clone; the gateway never holds or touches a private key. Contracts were audited by three independent firms.

Pay per call in USDC, EURC across Base, Arbitrum, Polygon, Avalanche, Ethereum, Robinhood and Arc via the x402 micropayment protocol — no subscriptions, no API keys, no wallets to configure for the caller.

Every agentic AI can GET /persona and adopt the machine-readable persona/SOUL as a temporary role.

Operations

assembly

MethodEndpointDescriptionTier
POST/v1/build/leverage-txBuild the unsigned transaction to open a leveraged position — returns approvals, tx, and meta the user signs locally.basic
POST/v1/build/manage-txBuild the unsigned transaction to adjust or close an open position (actions: close, increase_leverage, add/remove_collateral, repay, borrow).basic

Workflows

Data sources

Examples

open-position

Open a leveraged-yield position on USDC — find the best strategy, simulate at 3x, then build the open transaction

{
  "strategyId": "0x...market-id",
  "payToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "amount": "1000",
  "userAddress": "0x...signer",
  "leverage": 3,
  "chainId": 8453
}

discover-best-yield

Simulate a 2x leveraged long on ETH/USDC and report the expected APY, LTV, and liquidation point

{
  "strategyId": "0x...eth-usdc",
  "payToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
  "amount": "1",
  "leverage": 2,
  "chainId": 1
}

manage-or-close

Increase leverage on an open wstETH/WETH position and rebuild the manage transaction for signing

{
  "userAddress": "0x...signer",
  "id": 3,
  "action": "increase_leverage",
  "leverage": 4,
  "desiredLtv": "75",
  "chainId": 1
}

research-strategy

Understand a single strategy's market, risk, and expected outcome before any commitment

{
  "strategyId": "0x...wstETH-weth",
  "chainId": 1
}