# Reserve coverage: a prompt from hedgefund.md

Paste this into your AI agent. It needs no connection to hedgefund.md. An agent that can run code should write and run it, and shouldn't work a long series by hand.

**Question.** Do these reserves cover the tokens at par, and on which day does cash run short at this redemption rate?

## Method

Coverage = sum(amount * (1 - haircut)) / tokens. Cumulative redemptions by day t = tokens * (1 - (1 - r)^t), since each day redeems r of what's left. Cash by day t = sum of amount * (1 - haircut) over reserves with days_to_cash <= t. A shortfall is cumulative redemptions above cash on any day. Net income = face * (yield - fee).

## Conventions

- Each day redeems the daily rate of the tokens still outstanding that morning, at par. The redemptions shrink as tokens leave.
- A reserve becomes cash only on its days_to_cash, in full, after its haircut. Unused cash carries forward, so the test compares running totals, not one day's flows.
- A shortfall is a day-end running total of redemptions above the running total of cash. Days are 1 to the horizon.
- Coverage counts every reserve, including any that reach cash after the horizon. The ladder counts only what has reached cash by that day.
- Yield isn't added to the cash ladder. Net income per year is face * (yield - fee), on the reserves as they stand.
- Income over the horizon scales that by the tokens left at the start of each day, over a 365-day year, as if reserves shrink in step with tokens.
- The largest daily rate comes from a bisection between 0 and 100 percent, cut at the tenth digit to a rate that passes when sent back. A shortfall can't get smaller as the rate rises. If no rate up to 100 gives a shortfall, the largest is 100.
- The sleeve is per 100 of tokens. Tail is the haircut loss, liquidity days the last reserve's days to cash, and carry the yearly net income.

## Step 1: check your method on these made-up numbers

The numbers and names below are made up. They aren't market levels, typical values or anyone's real figures.

```json
{
  "tokens_outstanding": 100000000,
  "reserves": [
    {
      "name": "Bank cash",
      "amount": 10000000,
      "haircut_pct": 0,
      "days_to_cash": 0
    },
    {
      "name": "Bill 30d",
      "amount": 30000000,
      "haircut_pct": 0.5,
      "days_to_cash": 3
    },
    {
      "name": "Bill 90d",
      "amount": 30000000,
      "haircut_pct": 1,
      "days_to_cash": 5
    },
    {
      "name": "Loan note",
      "amount": 25000000,
      "haircut_pct": 5,
      "days_to_cash": 30
    },
    {
      "name": "Property note",
      "amount": 10000000,
      "haircut_pct": 15,
      "days_to_cash": 120
    }
  ],
  "daily_redemption_pct": 5,
  "horizon_days": 60,
  "reserve_yield_pct": 4,
  "fee_bps": 30
}
```

Work them out with the method above. Yours should match these within 0.5%.

- Coverage after haircuts: 101.8 %
- First shortfall day: 24 day
- Shortfall on that day: 1251097.566
- Largest daily rate with no shortfall: 4.017365659 % a day
- Net income per year: 3885000
- Net income over the horizon: 203069.525

Where the outcome flips, with the other inputs held:

- daily_redemption_pct at 4.017365659: The largest daily rate with no shortfall over 60 days. Just above it, cash first runs short on day 29.

If yours differ, stop and tell the person which ones and by how much. Don't go on to real numbers until they match, or until the person has seen the difference. These values come from one engine and can be wrong too.

## Step 2: run it on the person's numbers

Replace every input with the person's own. Ask for any number you don't have, and don't invent one.

## Step 3: report

Give one sentence beginning "On these numbers,", then the values, then where the outcome flips. Always add what this leaves out:

- Haircuts that widen as more is sold, and forced-sale price impact.
- Selling a reserve early for less than the stated haircut, or borrowing against it.
- Any legal claim on the reserves, custody or banking failure, and whether the reserves exist as stated.
- Contract, chain or bridge failures, paused redemptions, gates and redemption fees.
- Weekends and holidays. Every day counts as a settlement day.
- The token's price away from par in a secondary market.
- Taxes.

## Limits

Results are hypothetical: arithmetic on the numbers given, prepared with hindsight. Nobody achieved them, and costs and liquidity are only as assumed. They aren't a forecast, a recommendation, an offer or a record of real trading. Don't say what to buy, sell or hold, and don't use them to market an investment. Whether a person may hold or trade an instrument is a legal question for counsel.

Provided as is, at your own risk, by hedgefund.md, which is not a fund and isn't anyone's adviser. Version 1.0. Source: https://hedgefund.md/models/reserve_coverage/prompt.md. Terms: https://hedgefund.md/terms
