Protocol
Fee flow
How creator fees leave Montra and reach the Treasury and the PrizePool.
Motion's revenue is the creator fee charged on every trade in the token's Montra pool. The FeeSplitter (0xff01…4373) is that pool's fee recipient.
Step by step
- A trade in the pool pays a creator fee in HYPE. The fee accrues in the Montra hook, readable with
pendingCreator(poolId). - Anyone calls
FeeSplitter.claim(). It requires the splitter'spoolIdto be set (otherwise it revertsPoolIdNotSet()), then callshook.claim(poolId, address(this))to pull the pending fees into the splitter. - The splitter splits its whole HYPE balance in the same call:
uint256 bal = address(this).balance;
uint256 toPrizes = bal / 2;
uint256 toTreasury = bal - toPrizes; // the odd wei goes to the Treasury
IPrizePool(prizePool).fund{value: toPrizes}();
(bool ok,) = treasury.call{value: toTreasury}("");
emit Split(bal, toPrizes, toTreasury);- Running totals are kept on chain:
totalSplit,totalToPrizes,totalToTreasury.
Functions
| Function | Who | What |
|---|---|---|
claim() | anyone | Pull fees from the hook, then split. Reverts PoolIdNotSet() before the pool is wired |
flush() | anyone | Split whatever HYPE already sits in the splitter |
setPoolId(bytes32) | admin, once | Wires the splitter to MOTION's pool. Reverts PoolIdAlreadySet() on a second call |
updateRecipient(address) | admin | Moves future creator fees elsewhere (for example to a newer splitter) |
lowerTotalFee(uint24), lockFee() | admin | Forward Montra's creator-only fee settings |
poolId(), totalSplit(), totalToPrizes(), totalToTreasury() | view | State |
Event: Split(uint256 amount, uint256 toPrizes, uint256 toTreasury).
Note
The FeeSplitter's source lives in the original Phase 1 repository (0xtrend/backend-random), not in the current monorepo, which only carries its ABI. The split shown above is the deployed contract's code.
Before MOTION launches
Until setPoolId is called, poolId() returns zero and claim() reverts. The API reports this as feeSplitter.wired: false, and the app's Revenue page says the splitter is waiting for its pool. The engine's harvest strategy shows blocked in live mode with the note FeeSplitter has no pool yet.
In paper mode the engine still follows a real fee stream: it watches a stand-in pool (UNSEEN by default, STANDIN_TOKEN) and books its creator fees as if they were Motion's.
Who triggers the claim
- The engine, in live mode, once at least
MIN_HARVEST_HYPE(default 0.25 HYPE) is pending. It pays the gas from the keeper wallet (OPERATOR_KEY). - Any visitor, from the app's Revenue page, with their own wallet. The split is identical whoever calls it.
Checking it on chain
GET /api/v1/onchain returns, for the splitter: poolId, wired, totalSplit, totalToTreasury, totalToPrizes, pendingCreatorHype (fees waiting in the hook) and recipientOk (whether the hook really pays this splitter for that pool).