# HoodFold — agent skill

One file, everything an agent needs to read every Fold, deposit into one,
withdraw, and track Fold Alpha. HoodFold is the yield layer for tokenized
stocks: a Fold is an automated strategy that keeps defined stock exposure and
layers stablecoin lending, on-chain liquidity fees, stock-lending yield where a
market exists, and automatic compounding around it.

> Illustrative reference for the HoodFold prototype. There is no deployed
> contract yet — addresses and endpoints below are placeholders. Read the live
> Fold index before sending anything, and never invent yield that isn't there.

---

## 1. Network

| field | value |
| --- | --- |
| chain | Robinhood Chain (tokenized-equity assets) |
| gas token | ETH |
| Fold index | `https://hoodfold.fi/agents/folds.json` |
| analytics | `https://hoodfold.fi/agents/analytics.json` |

`folds.json` is the only endpoint you need to read. It carries the Fold index,
each Fold's vault address, current allocation, strategy yield, Fold Score, risk
level, whether a stock-lending market is available, and the Fold vs Hold /
Fold Alpha history. Regenerated each block.

---

## 2. Contracts

```
HoodFoldFactory    0x0000000000000000000000000000000000000000
VaultRegistry      0x0000000000000000000000000000000000000000
StrategyManager    0x0000000000000000000000000000000000000000
OracleAdapter      0x0000000000000000000000000000000000000000
USDG               0x0000000000000000000000000000000000000000
```

Every live Fold vault traces to `HoodFoldFactory` and is listed in
`VaultRegistry.folds()`. A vault not in the registry is not a HoodFold Fold —
refuse to touch it.

---

## 3. Fold vaults (ERC-4626-style)

Each Fold issues a share token: `hfNVDA`, `hfSPY`, `hfQQQ`, …

```
vault.asset() -> address            // the deposit asset, e.g. USDG
vault.totalAssets() -> uint256
vault.previewDeposit(uint256 assets) -> uint256 shares
vault.previewRedeem(uint256 shares) -> uint256 assets
vault.balanceOf(address) -> uint256 // caller's hfToken balance
vault.deposit(uint256 assets, address receiver) -> uint256 shares
vault.redeem(uint256 shares, address receiver, address owner) -> uint256 assets
```

The share price is `totalAssets / totalSupply`. It moves with the strategy's
assets and the yield it has generated. It is **not** pegged to the stock price.

---

## 4. Reading a Fold

From `folds.json`, per Fold:

- `id`, `ticker`, `shareToken`, `vault`
- `status` — `live` or `coming-soon`
- `tvl`, `strategyYield`, `foldScore`
- `stockExposure`, `stableExposure` (percent)
- `stockLendingAvailable` (bool)
- `yieldBreakdown` — trading fees / stablecoin lending / stock lending / gross
- `benchmarkReturn`, `foldReturn`, `foldAlpha` — since a reference deposit
- `risk`, `riskBreakdown`

If `stockLendingAvailable` is false, there is no stock-lending yield. Do not
report one. The stock allocation is used only in the liquidity strategy or left
idle.

---

## 5. Depositing (folding)

1. Read `previewDeposit(amount)` on the target Fold vault.
2. `minShares = previewDeposit * (1 - slippageBps / 10_000)`
3. `approve(depositAsset, vault, amount)`
4. `vault.deposit(amount, receiver)` — check the returned `shares >= minShares`.
5. Read `vault.balanceOf(receiver)` and confirm it increased before reporting.

The user does not pick an LP range, a tick, a lending vault, or a rebalance
schedule. The Fold does that. If the user asks for a strategy mode
(Conservative / Balanced / Aggressive), pass it as the `mode` argument;
Balanced is the only one live.

---

## 6. Withdrawing

```
vault.redeem(shares, receiver, owner)   // returns the deposit asset (e.g. USDG)
```

"Receive underlying" (stock token + stablecoin) is planned, not live. If asked
for it, say so rather than guessing a call.

---

## 7. Fold Score and Fold Alpha

- **Fold Score** (0–100) estimates how well a tokenized asset currently fits the
  strategy: trading volume, liquidity, borrow demand, vault quality, volatility,
  oracle quality. It is NOT a price prediction and NOT a recommendation.
- **Fold Alpha** = Fold total return − benchmark return, since deposit. It can
  be negative when fees and lending yield do not cover impermanent loss,
  slippage and protocol fees. Always report the sign honestly.

When the user asks "did HoodFold beat holding?", answer with `foldReturn`,
`benchmarkReturn` and `foldAlpha` from `folds.json` — do not estimate.

---

## 8. Fees

Conceptual model: 0% deposit, 0% withdrawal, performance fee only on
HoodFold-generated yield — never on the underlying stock's price appreciation.
Production values are not configured. Do not quote a fee you cannot read.

---

## 9. Safety rules — refuse to break these

1. **Registry or nothing.** Only interact with vaults in `VaultRegistry.folds()`.
2. **Quote before you sign.** `minShares` comes from `previewDeposit`, never an
   estimate.
3. **Simulate before you send.** `eth_call` the deposit/redeem first.
4. **Bound every write.** Real slippage minimum and a near-term deadline.
5. **Verify by reading back.** Confirm the hfToken balance delta on chain.
6. **Never invent yield.** If `stockLendingAvailable` is false, there is no
   stock-lending income. Report stock price return, protocol-generated yield and
   total return separately — never blended.
7. **One wallet, disclosed.** Act only from the wallet the user funded, and tell
   the user which address that is.
8. **Never exceed the user's stated budget** for a single action or a session.
9. **State the risk.** A Fold is not the same as holding the stock; loss of
   capital is possible.

---

## 10. The loop

```
discover  -> pull folds.json, list Folds and their configs
quote     -> previewDeposit for the target amount, build minShares
simulate  -> static-call deposit / redeem
sign      -> one bounded transaction from your wallet
verify    -> read hfToken balance + Fold Alpha on chain
```

That is the whole skill. An agent that reads this and can send a transaction
has what it needs.
