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

  1. A trade in the pool pays a creator fee in HYPE. The fee accrues in the Montra hook, readable with pendingCreator(poolId).
  2. Anyone calls FeeSplitter.claim(). It requires the splitter's poolId to be set (otherwise it reverts PoolIdNotSet()), then calls hook.claim(poolId, address(this)) to pull the pending fees into the splitter.
  3. The splitter splits its whole HYPE balance in the same call:
solidity
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);
  1. Running totals are kept on chain: totalSplit, totalToPrizes, totalToTreasury.

Functions

FunctionWhoWhat
claim()anyonePull fees from the hook, then split. Reverts PoolIdNotSet() before the pool is wired
flush()anyoneSplit whatever HYPE already sits in the splitter
setPoolId(bytes32)admin, onceWires the splitter to MOTION's pool. Reverts PoolIdAlreadySet() on a second call
updateRecipient(address)adminMoves future creator fees elsewhere (for example to a newer splitter)
lowerTotalFee(uint24), lockFee()adminForward Montra's creator-only fee settings
poolId(), totalSplit(), totalToPrizes(), totalToTreasury()viewState

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).