Documentation
Fees
Each pool charges one swap fee, made of two tranches frozen when the pool is created.
| Tranche | Rate | Goes to |
|---|---|---|
| Protocol | 0.5%, the same on every launch | the protocol fee recipient |
| Creator | 0.5% to 9.5%, chosen at launch | the launch's creatorFeeRecipient |
| Total | 1% to 10% |
The pool's Uniswap LP fee is zero, so this is the only swap fee. The total can never exceed 10%
(MAX_TOTAL_FEE_BPS): the hook enforces that in its setters and again when registering a pool.
There is also a launch fee of 0.001 HYPE, credited to the protocol fee recipient. There are no referrals, no separate creator tax, and no fee on transfers: a Tartarus token is a plain ERC-20.
The owner can change the rates for future launches only. A launched pool keeps the rates, protocol
fee recipient and conversion limit it was registered with, for life. Read them with
factory.getLaunchFeePolicy(token).
From a swap to your wallet#
swap -> hook takes the fee -> sweep -> fee escrow -> claim
(held as claims on (converted (per recipient,
the PoolManager) and split) pull only)1 · Collection#
On every swap the hook takes its fee from the unspecified leg. That leg depends on the swap, so a pool
collects in two buckets: exact-in buys leave fees in the memecoin, and sells leave them in the
quote. Both sit in hook.pendingFees(poolId, currency) until a sweep. The hook moves no tokens during
a swap: it holds its fees as ERC-6909 claims on the PoolManager.
2 · Sweep#
| Function | Who may call | What it does |
|---|---|---|
sweepPoolFees(poolId, minConversionQuoteOut) | the sweep operator; the creator recipient only if no memecoin is pending | sells the memecoin bucket into the pool, then pays out all the quote |
sweepPoolQuoteFees(poolId) | the sweep operator or the creator recipient | pays out the quote bucket and leaves the memecoin pending |
Converting is restricted to the operator because it is a swap, and a predictable swap against a spot price can be sandwiched. The operator supplies a real minimum. Paying out quote involves no swap and so is open to the creator as well.
Each conversion is capped at 3% price impact (maxInternalPriceImpactBps), so a large memecoin
bucket converts over several sweeps. What remains stays pending, and PoolConversionSkipped reports it.
The Tartarus keeper sweeps each pool about every 6 hours once at least $10 is waiting.
3 · Split#
Every sweep divides the quote between the tranches in the proportion they were charged:
creatorAmount = total × creatorFeeBps / (protocolFeeBps + creatorFeeBps) (rounded to the creator)
protocolAmount = total − creatorAmountOn a 2% pool (0.5% + 1.5%) the creator receives 75% of every sweep. Both shares are credited to the escrow in the pool's quote asset.
4 · Claim#
TartarusFeeEscrow is pull-only, so a recipient that cannot receive funds can never block a sweep.
Native HYPE and ERC-20s have separate functions:
// HYPE
const owed = await client.readContract({
address: ESCROW, abi: escrowAbi, functionName: "balanceOf", args: [recipient],
});
await wallet.writeContract({ address: ESCROW, abi: escrowAbi, functionName: "claim", args: [] });
// An ERC-20 quote
const owedToken = await client.readContract({
address: ESCROW, abi: escrowAbi, functionName: "balanceOfToken", args: [recipient, quoteToken],
});
await wallet.writeContract({ address: ESCROW, abi: escrowAbi, functionName: "claimToken", args: [quoteToken] });claim and claimToken are overloaded: each also takes an amount, for a partial claim. In viem, pass
args to choose the overload. A claim pays msg.sender, so the recipient must be able to send a
transaction. A contract recipient also needs to be able to receive HYPE.
GET /v1/users/:address returns claimable, with what is in the escrow and what is still in the hook.
Changing the recipient#
The current recipient can hand the stream on at any time, and it takes effect immediately:
await wallet.writeContract({
address: FACTORY, abi: factoryAbi, functionName: "transferCreatorFeeRecipient",
args: [token, newRecipient],
});The protocol owner can also override a recipient, with three days' public notice, mainly so that a creator who lost their key can be recovered. See Trust model.
Worked example#
A 1 HYPE exact-in sell on a 2% pool:
| HYPE | |
|---|---|
| Pool pays out, gross | 1.0000 |
| Hook fee at 2% | 0.0200 |
| Seller receives | 0.9800 |
| Later credited to the creator (1.5 / 2) | 0.0150 |
| Later credited to the protocol (0.5 / 2) | 0.0050 |