> For the complete documentation index, see [llms.txt](https://docs.trover.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trover.tech/engineering/verify-2026-09-13-fees-round-3-split.md).

# Verify 2026-09-13: fees in the settlement asset, the daily split, agent buys, site copy, GitBook

Migration status: **none** (round 2's migration is applied).

## Fees are collected in ETH / USDG, never in stock tokens

* Executor v3 adds `executeTokenForOutput(tokenIn, gross, router, spender, calldata, tokenOut, feeBps)`: the router pays the executor, the fee is taken from what came back (ETH or the settlement token) and the rest is forwarded to the trader in the same transaction. Test: 100 tokens sold for 0.1 ETH, fee wallet +0.001 ETH, trader +0.099 ETH, zero tokens left anywhere. Buys keep paying from the input asset. So every fee is in ETH, USDG, WETH or USDC, in one transaction, with no second swap.
* Worker: sells now build the route with the executor as recipient and call `executeTokenForOutput`; `trade_fees` / `platform_fees` record the fee in the settlement asset (estimated from the quoted output).

## Daily split from the fee wallet (`fee-split.ts`, 00:05 UTC, `FEE_SPLIT_ENABLED`)

Reads the fees confirmed since the last run from `platform_fees`, values them in USD, and moves the same value out of the fee wallet's ETH and USDG:

| share | to                                                                                                                                |
| ----- | --------------------------------------------------------------------------------------------------------------------------------- |
| 35%   | stays for the stock buyer (holders)                                                                                               |
| 8%    | league vault (ETH, funds the current epoch)                                                                                       |
| 7%    | referral pool, reserved in the wallet (`trover:fee-split:v1:referral-pool-wei`); the 00:10 settlement pays referrers only from it |
| 20%   | buyback sink (ETH)                                                                                                                |
| 30%   | treasury (ETH first, then USDG)                                                                                                   |

The wallet always keeps `FEE_WALLET_GAS_RESERVE_ETH` (0.02). Shares that USDG cannot pay (league, buyback, referrals) carry forward to the next run that finds ETH, so nothing is swapped and nothing is lost. Each run writes a `fee_split` treasury ledger entry with what it sent. Env: `FEE_SPLIT_ENABLED`, `FEE_SPLIT_HOLDERS_BPS` 3500, `FEE_SPLIT_LEAGUE_BPS` 800, `FEE_SPLIT_REFERRAL_BPS` 700, `FEE_SPLIT_BURN_BPS` 2000, treasury the remainder (3000), `TREASURY_WALLET_ADDRESS` (required).

## Agent

`nft_buy` no longer requires a "maximum spend": the cheapest matching listing is selected and its price is the ceiling. A collection named in words resolves through the same DB-first search the reads use, so "buy a hood homie" buys instead of asking for a slug. Funds are checked by the action processor; the agent asks only for a missing asset or amount.

## Site and identities

Home and how-to-buy state the 1% fee and the referral terms; the home page shows the TROVER token address as soon as the buyback sink knows it. Footer: @troverdottech, @troveragent, docs.trover.tech, referrals. `PROJECT_X_USERNAME` default → troverdottech; `TroverEthDistributor.PROJECT_X_URL` → x.com/troverdottech (compiled before the mainnet deploy).

## GitBook

`gitbook/` holds the site source (mirrored from docs.trover.tech, plus `trover-token/` with the token and fees/referrals pages, updated fees, socials and welcome pages, `SUMMARY.md`); `gitbook-docs.yaml` maps it as the default space "Trover" and `docs/` as "Engineering". Enable Git Sync on docs.trover.tech against `sayydim/trover` `main`.

## Checks run

Hardhat compile; executor tests 4/4; `tsc` core, domain, api, worker, web. Testnet: executor v3 deployed and rehearsed (see the rehearsal record).

## Deploy

Standard detached api + worker deploy. Then in the server `.env` when ready: `FEE_SPLIT_ENABLED=true`, `TREASURY_WALLET_ADDRESS`, and after the mainnet stack `LEAGUE_VAULT_ADDRESS`, `BUYBACK_BURN_ADDRESS`, `AUTO_INVEST_FEE_EXECUTOR_ADDRESS`, `PLATFORM_FEE_BPS=100`, `REFERRAL_LEAGUE_ENABLED=true`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.trover.tech/engineering/verify-2026-09-13-fees-round-3-split.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
