# Hedgefun v2 concepts

Source: https://docs.hedgehood.io/hedgefun-v2/concepts

:::tip[TL;DR]
- The treasury receives 30% of the raise in stock at graduation and can only trade that stock against USDG on the listing's pool, inside the health gate.
- Seven strategies: Lots, Buy-back, Spot, Rebalance, Percentage buy-back, Cycle, Lots with reserve; all frozen at launch, and the owner can upgrade the logic only, through a two-day controller.
- A keeper, anyone's bot, sends each action and keeps 0.1% of what it produced; what the treasury earns buys the token back and burns it.
- Holders have no claim on the treasury itself (none today; one may be added later). Lots, Rebalance and Cycle have a backtest model; the others do not.
:::

## The treasury model

A launch creates a treasury that receives 30% of the raise in stock at graduation and runs one strategy, chosen by
the creator before launch. It can only ever trade that stock against USDG on the listing's pool, and only while the
health gate is open: a fresh Chainlink price, an open trading calendar, the pool within 0.5% of that price and of its
own 600-second mean, and a 1% slippage limit on each fill. A closed market, a stale feed or a pushed pool stops the
stock leg; the token side keeps trading.

Every strategy shares the same plumbing. A keeper, anyone's bot, sends each action when it is due and keeps 0.1%
of what it produced (`bountyBps` 10). Stock from the tax share or a donation is income, booked by `book()` at the
live price before the strategy can use it. Stock set aside for the burn sits in `buybackStock`; `buyback()` spends
it on the token in its own pool, at most once per 10 seconds, priced off the pool's 600-second mean within a 3%
impact limit, and burns what it bought. `collectFees()` credits the buy-side pool fee to `buybackStock` and burns
the sell-side fee. Three things burn: opening premiums, buy-backs, and the token side of the pool fee.

## The seven strategies

### Lots (kind 0)

Hold the stock, sell a slice at each target price, buy back after a dip. The profit buys the token and burns it.
Graduation stock is booked as a lot at the price of the day. A lot sells in two steps when the price rises past its
cost by `tp1Bps` and then `tp2Bps`; the principal returns as USDG and the profit stays in stock for the burn. When
the price falls `dipBps` under the last sale, `lotBps` of the USDG buys a new lot. A stop is the only way a lot
sells under its cost.

**Acts:** rises: sells half a lot at `tp1Bps`, the rest at `tp2Bps`; falls: buys a new lot at `dipBps` under the last sale; sells at `stopBps` under cost if a stop is set; fees arrive: booked as a new lot; `buyback()` spends profit 500 USDG at a time (`buybackChunkUsdg`). Frozen at launch: every number in the table, plus the listing's gates. Upgradeable by the owner through the two-day controller: the logic only, under the same frozen configuration. Backtest model: yes.

| field | meaning | bound or floor | release default |
| --- | --- | --- | --- |
| `tp1Bps` | first take-profit, over cost | greater than 0; no execution-cost floor | creator's choice |
| `tp2Bps` | second take-profit | 0 (whole lot at `tp1Bps`), or greater than `tp1Bps` | creator's choice |
| `dipBps` | dip under the last sale that triggers a buy | between 0 and 100% | creator's choice |
| `stopBps` | sale under cost; 0 = never | under 100% | creator's choice |
| `lotBps` | share of the USDG reserve one dip buy spends | | creator's choice |

### Buy-back (kind 1)

Hold the stock and never trade it. Every fee buys the token and burns it.
The treasury opens no stock position; its graduation stock is protected and never spent. Every tax share, pool fee
and donation goes to `buybackStock`, and `buyback()` burns it one chunk per 10 seconds. Parameters: `tp1Bps`,
`tp2Bps`, `dipBps`, `lotBps` are accepted and ignored; a nonzero `stopBps` must exceed slippage + pool fee + bounty. Frozen: the protected graduation stock and the buy-back pacing. Upgradeable: logic only. Backtest model: none.

### Spot (kind 2)

Keep a fixed split of stock and cash, say 70/30: sell a little when the stock runs ahead, buy a little when it lags.
The treasury holds a target share of its tradable value in stock and trades back toward the target whenever the
share leaves a band around it. A policy contract proposes one action and the treasury checks it against its frozen
limits before it swaps. Trade sizes are fixed USDG amounts.

**Acts:** rises: stock share passes `targetBps` + band: sells down to target; `payoutBps` of the gain over average cost goes to `buybackStock`; falls: stock share drops under `targetBps` − band: buys up to target; fees arrive: booked into inventory at the live price. Frozen: all six words and the policy. Upgradeable: logic only. Backtest model: none.

| field | meaning | bound or floor | release default |
| --- | --- | --- | --- |
| `targetBps` | share of tradable value held in stock | 20% to 90% | creator's choice |
| `deadbandBps` | band around the target | at least 2 × (slippage + pool fee + bounty); under the target; target + band under 100% | creator's choice |
| `cooldown` | least time between actions | 60 s | front end suggests 600 s |
| `payoutBps` | share of a sale's gain sent to the burn | 0 to 100% | creator's choice |
| `maxTradeUsdg` | most one action trades | from the listing's `minLotUsdg` (5 USDG) to its `sellChunkUsdg` (2,000 USDG) | creator's choice |
| `maxDailyTurnoverUsdg` | most one US trading day trades | from `maxTradeUsdg` to 24 × `maxTradeUsdg` | creator's choice |

### Rebalance (kind 3)

The same fixed split, traded in percentages of what the treasury holds, so a bigger treasury trades bigger.
Net cash from a sale first covers the cost of what was sold and any tracked loss; only the remaining gain funds the burn.

**Acts:** rises: sells the slice over target, at most `sellBps` of tradable stock per action; falls: buys back to target, at most `buyBps` of available USDG per action; fees arrive: booked into inventory at the live price. Frozen: all words and the policy. Upgradeable: logic only. Backtest model: yes.

| field | meaning | bound or floor | release default |
| --- | --- | --- | --- |
| `targetBps` | share of tradable value held in stock | 20% to 90% | creator's choice |
| band | band around the target | at least pool fee + bounty; under the target; target + band under 100% | creator's choice |
| `cooldown` | least time between actions | 60 s | front end suggests 600 s |
| `payoutBps` | share of a sale's gain sent to the burn | 0 to 100% | creator's choice |
| `buyBps`, `sellBps` | per-action caps, as a share of cash or of tradable stock | 0.01% to 25% | creator's choice |
| daily buy, daily sell | per-day caps, each on its own base | 0.01% to 100% | creator's choice |

### Percentage buy-back (kind 4)

Trades like Lots; each buy-back spends only a tenth of the jar.
Lots with one change: each `buyback()` offers a tenth of the waiting `buybackStock`, raised to the listing's
minimum lot when smaller, so a budget of any size leaves in the same number of steps. Parameters as Lots, with a
nonzero `stopBps` required to exceed slippage + pool fee + bounty; the buy-back share is fixed at 10%. Frozen and
upgradeable: as Lots. Backtest model: Lots' model applies to the trading rule.

### Cycle (kind 5)

Trades like Lots, and buys back in once when the stock keeps climbing after a sale.
Lots plus one re-entry: after a real sale, a rise of `dipBps` over that sale's price buys once more, sized like a
dip buy, after at least 600 seconds and a newer price report. Any buy consumes the entry. Buy-backs are a tenth of
the budget per call.

**Acts:** rises: take-profit as Lots; after a sale, one recovery buy at `dipBps` over the sale price; falls: dip buy as Lots; stop if set; fees arrive: booked as a lot; buy-backs a tenth at a time. The treasury checks the rung floor, the quote does not: a quote under it is accepted and the launch fails. Frozen and upgradeable: as Lots. Backtest model: yes.

| field | meaning | bound or floor | release default |
| --- | --- | --- | --- |
| `tp1Bps`, `dipBps` | as Lots | at least 2 × (slippage + pool fee): 2.1% on a 0.05% pool, 2.6% on a 0.30% pool, with the 1% slippage default | creator's choice |
| `tp2Bps`, `lotBps`, `stopBps` | as Lots; a nonzero stop must exceed slippage + pool fee + bounty | as Lots | creator's choice |

### Lots with reserve (kind 6)

Trades like Lots, but first turns part of the graduation stock into cash, so the first dip can be bought.
Graduation hands the treasury its exact stock principal, and `reserveBps` of it is the reserve target. While no stop
or take-profit is due, each keeper call sells one chunk of the graduation lot for USDG (the listing's `sellChunkUsdg`,
within `maxSlippageBps` of the oracle, never on a price only the pool vouches for) and moves the dip reference to that
sale price. The proceeds are reserve, not profit: they never fund the buy-back. Once the target is sold, the rule is
Lots, with dips bought from the reserve.

**Acts:** after graduation: sells chunks of the graduation lot until `reserveBps` of it is cash; rises: take-profit as
Lots; falls: dip buy as Lots from the reserve, within the optional limits; stop if set; fees arrive: booked as a lot;
`buyback()` spends profit 500 USDG at a time, as Lots. The rung floor is Cycle's, checked the same way. Frozen and
upgradeable: as Lots. Backtest model: none.

| field | meaning | bound or floor | release default |
| --- | --- | --- | --- |
| `tp1Bps`, `dipBps` | as Lots | at least 2 × (slippage + pool fee), as Cycle | creator's choice |
| `tp2Bps`, `lotBps`, `stopBps` | as Lots | as Lots | creator's choice |
| `reserveBps` | share of the graduation stock sold into the reserve | 0 to 50%; 0 is plain Lots; over 50% the launch reverts | creator's choice |
| `cashFloorBps` | cash a dip buy must leave untouched | 0 to 100%; 0 = no floor | 0 |
| `dipBudgetBps` | most all dip buys may spend over the treasury's life | 0 to 100%; 0 = no budget | 0 |
| `maxDipBuys` | most dip buys over the treasury's life | 0 = no limit | 0 |

The floor and the budget are shares of the graduation stock's USDG value, frozen when graduation books it; later
sales, fees and price moves never change them. The config is engine version 3, schema 4, paired with
`V2LotReservePolicy`: `words[0]` is `reserveBps`, `words[1]` packs `cashFloorBps` (bits 0 to 15), `dipBudgetBps`
(16 to 31) and `maxDipBuys` (32 to 47), and `words[2]` is zero.

## Choosing between them

At graduation the treasury holds stock and no USDG. Spot and Rebalance sell down to their target on their first
action, which gives them cash; Lots with reserve sells its chosen share in chunks right after graduation; Lots,
Percentage buy-back and Cycle have cash for a dip buy only after their first take-profit or stop; Buy-back never
holds cash.

| | Lots | Buy-back | Spot | Rebalance | Percentage buy-back | Cycle | Lots with reserve |
| --- | --- | --- | --- | --- | --- | --- | --- |
| holds and spends cash | yes, a dip buy spends it on a new lot | no; the stock never trades | yes, managed to the target split | yes, managed to the target split | yes, as Lots | yes, as Lots | yes, a reserve built at graduation |
| where cash comes from after graduation | a take-profit or stop sale; no opening cash position | none; it sells no stock | sells to USDG whenever the stock share is over target, without waiting for a take-profit; at most `maxTradeUsdg` per action | as Spot; at most `sellBps` of tradable stock per action | as Lots | a take-profit or stop first, then a dip or recovery buy; still starts with no cash | sells `reserveBps` (0 to 50%) of the graduation stock right after graduation, chunk by chunk; then as Lots |
| holds stock through a fall | yes, buys dips | yes, never trades | buys back to target | buys back to target | yes, buys dips | yes, buys dips | yes, buys dips from the reserve |
| sells on a rise | at two targets | no | the slice over target | the slice over target | at two targets | at two targets | at two targets |
| buys back in after selling | on a dip only | no | on a fall under the band | on a fall under the band | on a dip only | on a dip, or on a further rise | on a dip, the first one included |
| buy-back budget made of | profit, pool fees | all income | gain share, pool fees | gain share, pool fees | profit, pool fees | profit, pool fees | profit, pool fees |
| backtest model | yes | none | none | yes | via Lots | yes | none |

## What comes next

Each item is planned or under consideration and may be added later; none is promised.
- **Dividend and income strategies.** Treasuries that pay realised income to holders or stakers beside the burn
  exist in source and are not registered. Holders would then have a claim on that income; existing proxy
  treasuries could reach it by upgrade.
- **Rebalance on net asset value.** Trade limits as a share of everything the treasury holds, its own LP and the
  waiting buy-back budget included, in place of the tradable part only; in source and tests, not registered.
- **Removing Cycle's rung floor.** Giving Cycle the cost check Lots uses, so 0.01% rungs launch there too; v2.1.
- **Launches paired with ETH in place of a stock.** Scheduled as v2.1: a curve and a pool quoted in WETH.
- **Reinvesting pool fees as liquidity**, deepening the locked pool in place of funding buy-backs; and
  **one-click presets in Builder**, named strategies that fill the launch form with every number still editable.

## Related

- [How it works](https://docs.hedgehood.io/hedgefun-v2/how-it-works), [who does what](https://docs.hedgehood.io/hedgefun-v2/roles), [protocol](https://docs.hedgehood.io/hedgefun-v2)
