# Revenue router

> How HyperRevenueRouter receives every protocol dollar on HyperEVM, splits it into four lanes, and holds the buyback and locker reserves until token launch.

Source: https://docs.degenhive.ai/revenue

`HyperRevenueRouter` is the single USDC landing point for protocol revenue on HyperEVM (999). Each payment to `notifyRevenue` splits into four lanes: ops, a buyback reserve, a locker reserve and the Fangvestors NFT pot.

> [!IMPORTANT]
> The router is not deployed yet and not externally audited. Addresses publish at launch on [Network](https://docs.degenhive.ai/network.md).

## Where revenue comes from

> **Figure: Where every fee goes.** Fees from both chains end in HyperRevenueRouter, which pays ops at once and holds the buyback and locker reserves until token launch.
>
> Two columns. Left, on HyperEVM (999): a HyperVault takes management and performance fees at roll() and sends them to HyperVaultFeeRouter. The fee router pays data royalties to DataProviderRegistry, the forecaster cut to HyperCrowdPay and the manager share to the manager, and sends the protocol take to HyperRevenueRouter. HyperVaultFactory sends its creation fee, and DataProviderRegistry sends its marketplace take, to HyperRevenueRouter. Right, on Robinhood Chain (4663): a BookVault takes its fees in USDG at roll(); nftBps of them go to the Stingvestors VestorPot and the rest go to the council's outbox Safe, which bridges them to HyperEVM by hand and calls notifyRevenue on HyperRevenueRouter. Bottom: HyperRevenueRouter splits every dollar into four lanes. Ops gets 31.67% and is paid out on arrival. The buyback reserve gets 31.67% and the locker reserve 31.66%; both are held until token launch. The NFT lane gets 5% and pays the Fangvestors VestorPot while that pot is live (otherwise the share goes to ops).

| Source | Contract that pays | What it pays |
|---|---|---|
| Vault fee take | `HyperVaultFeeRouter` | On third-party vaults, the protocol take (default 2,000 bps, at most 5,000) of each management and performance fee |
| Flagship fees | `HyperVaultFeeRouter` | The whole management fee, and the performance fee left after data royalties and the forecaster share |
| Creation fees | `HyperVaultFactory` | The USDC fee for creating a third-party vault (default 10 USDC) |
| Marketplace take | `DataProviderRegistry` | The protocol's cut of data-feed payments |
| Robinhood books | Council outbox Safe | `BookVault` fees less `nftBps`, bridged to HyperEVM by hand |

There is no bridge contract. The `BookVault` fee recipient on Robinhood Chain is a council Safe. Its signers bridge the USDG, then approve USDC and call `notifyRevenue` on HyperEVM.

## The four lanes

> **Figure: Router lanes and a Flagship profit of 100.** Every dollar into HyperRevenueRouter splits four ways, and a Flagship profit of 100 leaves 75 with depositors.
>
> Two stacked bars. Top bar, HyperRevenueRouter, each dollar: ops 3,167 bps (31.67%), buyback reserve 3,167 bps (31.67%), locker reserve 3,166 bps (31.66%), NFT lane 500 bps (5%). Both reserves are held until token launch; the NFT lane pays the Fangvestors pot while it is live. Bottom bar, a Flagship profit of 100 at a 25% performance fee: depositors 75, forecasters 10, ops 4.75, buyback reserve 4.75, locker reserve 4.75, Fangvestors 0.75. Forecasters take 40% of the 25 fee, and the router splits the other 15 like any dollar. The example has no data royalties and no locker rebate.

| Lane | Default | Where it goes |
|---|---|---|
| Ops | 3,167 bps (31.67%) | Paid to `opsRecipient` at once |
| Buyback reserve | 3,167 bps (31.67%) | Held in the router until token launch |
| Locker reserve | 3,166 bps (31.66%) | Held in the router until token launch |
| NFT | 500 bps (5%) | Paid to the Fangvestors `VestorPot`, only while the pot is live |

The NFT lane pays only while `nftPot.live()` returns true, which means at least `minLiveSeats` Fangvestors circulate. Otherwise its share, and any rounding dust, goes to ops. If the ops or NFT transfer fails, the amount waits in `pendingOpsUsdc` until anyone calls `flushOps()`.

The council can change the split with `submitChange(LANE_BPS, …)` and a 48-hour wait. The four values must sum to 10,000 and the NFT lane is capped at 2,000 bps.

## Counted revenue

Every payment is split, but only some payments count. The router adds the full amount to `dailyRevenueUsdc(day)` when the payer is on the allowlist, set by the council with `setRevenueSource(source, true)`. The intended sources are the fee router, the factory, the data registry and the outbox Safe. A payment from any other address is split normally and not counted.

Counted revenue matters at token launch: `DGVEmissions` paces DGV by the last 30 complete days of it. See [Token](https://docs.degenhive.ai/token.md#emissions).

**viem**

```ts
import { createPublicClient, defineChain, http, parseAbi } from "viem";

const hyperEvm = defineChain({
  id: 999,
  name: "HyperEVM",
  nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
  rpcUrls: { default: { http: ["https://rpc.hyperliquid.xyz/evm"] } },
});
const hyper = createPublicClient({ chain: hyperEvm, transport: http() });
const REVENUE_ROUTER = "0x..."; // addresses publish at launch

const routerAbi = parseAbi([
  "function dailyRevenueUsdc(uint64 day) view returns (uint256)",
  "function revenueSource(address payer) view returns (bool)",
  "function buybackReserveUsdc() view returns (uint256)",
  "function lockerReserveUsdc() view returns (uint256)",
]);
const day = BigInt(Math.floor(Date.now() / 86_400_000)); // UTC day index
const counted = await hyper.readContract({ address: REVENUE_ROUTER, abi: routerAbi, functionName: "dailyRevenueUsdc", args: [day] });
```

## Reserves before the token

The product launches with no token. Until then the buyback and locker lanes only accumulate. Both lanes are inactive, nothing drips, `releaseBuyback` reverts with `BuybackExecutorNotSet` or `InsufficientReleasable`, and `releaseLockerYield` reverts with `LockerPotNotSet` or `ZeroAmount`. The reserves are visible on chain at any time through `buybackReserveUsdc()` and `lockerReserveUsdc()`.

## At token launch

At token launch, the buyback and locker lanes activate once and begin streaming their accumulated USDC reserves along fixed drip schedules:

`Drip per lane`

```math
releasable += (reserve - releasable) * (now - lastDripAt) / (unlockEnd - lastDripAt)
```

Additional funding merges into the schedule, weighted by amount, so a spike in fees smooths out over the lane's horizon instead of releasing in one block.

| Setting | Default | Bounds | Change delay |
|---|---|---|---|
| Buyback horizon | 90 days | 1 to 365 days | Longer at once; shorter after 48 hours |
| Locker horizon | 30 days | 1 to 365 days | Longer at once; shorter after 48 hours |
| Daily release cap | Uncapped | Configurable | Lower cap at once; higher cap after 48 hours |

A paused lane stops dripping, and its schedule shifts out by the paused duration when resumed. Once active, the buyback lane funds automated DGV buybacks and burns on HyperCore, and anyone can call `releaseLockerYield()` to send releasable locker USDC to `HyperLockerPot`.

## Slashed USDC

Slashed forecaster bonds go straight into the buyback reserve. They are not split across the four revenue lanes and are not counted as protocol revenue.

## Worked example

A Flagship vault earns 100 USDC of profit above its high-water mark. The Flagship runs a 25% performance fee. Its forecaster share is set as a fraction of the fee (`forecastShareBps`, at most 5,000); here it is 4,000 bps, which is 10% of the profit. No data feeds earn royalties in this example, and the management fee is left out.

| Step | Amount (USDC) |
|---|---|
| Profit above the high-water mark | 100.00 |
| Stays with depositors (75%) | 75.00 |
| Performance fee (25%) | 25.00 |
| To forecasters through `HyperCrowdPay` (4,000 bps of the fee) | 10.00 |
| To `HyperRevenueRouter.notifyRevenue` (Flagship: the rest) | 15.00 |
| Ops lane: 15 × 3,167 bps, plus dust | 4.75 |
| Buyback reserve: 15 × 3,167 bps | 4.75 |
| Locker reserve: 15 × 3,166 bps | 4.75 |
| Fangvestors pot: 15 × 500 bps | 0.75 |

The exact router figures are 4.7505, 4.7505, 4.749 and 0.75, which sum to 15. If the Fangvestors pot is not live, ops receives 5.5005. At token launch, while `HyperBookRewards` is set, 20% of each performance fee is first offered back to depositors who lock DGV, which lowers the router's share.

## Related

- [Networks & status](https://docs.degenhive.ai/network.md) Chains and deployment status.
- [Vault fees](https://docs.degenhive.ai/vaults/fees.md) How management and performance fees are taken at the roll.
- [Token](https://docs.degenhive.ai/token.md) What the reserves fund once DGV launches.
- [NFTs](https://docs.degenhive.ai/nfts.md) How the NFT lane reaches Fangvestor holders.
