> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spiralstake.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# simulate_equity_deposit

> Deterministic preview of a stock + yield equity-vault deposit — no wallet needed.

Previews depositing USDG into a [stock + yield equity vault](/agents/guides/stock-plus-yield-vault) on Robinhood Chain. Deterministic, read-only, built from live swap quotes — no wallet.

You end up **1x long the stock** (held as your own Morpho collateral on the partner market), with `stockLtvPct` of its value borrowed as USDG and flash-looped into the vault's yield strategy.

## Input

<ParamField path="strategyId" type="string" required>The vault's id from `list_strategies` (starts with `equity-`).</ParamField>
<ParamField path="amount" type="string" required>Deposit in human units of the vault's deposit token (USDG), e.g. `"10000"`.</ParamField>

<ParamField path="stockLtvPct" type="string">
  Stock-leg LTV percent to borrow at. Default: the vault's `targetLtvPct`. Capped at 88% of the stock market's liquidation LTV (55 on a 62.5% market) — a higher value is **refused**, never clamped.
</ParamField>

<ParamField path="slippage" type="number" default="0.01">Ratio; capped at `0.01` (the app's setting for vaults).</ParamField>
<ParamField path="chainId" type="integer" default="1">Vaults exist on `4663` only.</ParamField>

## Output

```json theme={null}
{
  "action": "equity_deposit",
  "preview": {
    "depositAmount": "1000",
    "stock": {
      "symbol": "SPY", "priceUsd": "766.6309", "minReceived": "1.291249",
      "ltvPct": "50.00", "maxLtvPct": "55.00", "liquidationLtvPct": "62.50",
      "liquidationPriceUsd": "613.3047", "priceDropToLiquidationPct": "20.00",
      "borrowUsdg": "494.96", "borrowApyPct": "0.06", "priceImpactPct": "-0.01"
    },
    "yieldLeg": {
      "collateralSymbol": "syrupUSDG", "collateralIn": "488.735796",
      "leverage": "10.5", "ltvPct": "90.50", "amountFlashLoan": "4711.99", "leverageApyPct": "40.79"
    },
    "netApyPct": "20.37",
    "fees": { "stockLegBps": 25, "yieldLegBps": 5, "estimatedFeeUsd": "5.10" },
    "slippage": 0.01
  }
}
```

| Field                       | Meaning                                                                                                                 |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `stock.minReceived`         | The least stock the deposit swap delivers; the router supplies what it actually gets (≥ this).                          |
| `stock.borrowUsdg`          | USDG borrowed against the stock at `ltvPct`, all deployed into the yield loop.                                          |
| `stock.liquidationPriceUsd` | The stock price at which the stock leg reaches its liquidation LTV, from the entry price.                               |
| `yieldLeg`                  | The loop the borrowed USDG opens: its collateral, fixed leverage (the yield market's max-safe LTV), flash loan and APY. |
| `netApyPct`                 | Net dollar APY on the deposit at this LTV: `ltv × (yieldLeg.leverageApyPct − stock.borrowApyPct)`.                      |
| `fees`                      | Entry swap fees: 25 bps on the stock leg (price exposure), 5 bps on the yield legs.                                     |

## Fail-closed cases

The preview refuses, with a plain reason, when the stock market cannot lend the borrow (`liquidityUsd`), when the yield market cannot fund the flash loop directly (the vault entry has no reallocation path), when `stockLtvPct` is above the cap, when market data is stale, or when the id is a loop rather than a vault.

## Example

```ts theme={null}
const sim = await call("simulate_equity_deposit", {
  strategyId: "equity-0x50bc…", amount: "10000", stockLtvPct: "50", chainId: 4663,
});
// sim.preview.netApyPct, sim.preview.stock.liquidationPriceUsd
```
