Hook Behavior and Fees
MemeHookV2 charges the launch's base Hook fee and additional Creator Tax. Read the launch's snapshotted settings. Snipe Tax applies only to Curve buys.
Which asset pays the fee?
The Hook charges the output for Exact Input, or the input for Exact Output:
Buy with Exact Input Quote
Launch tokens, deducted from output
Sell with Exact Input launch tokens
Quote, deducted from output
Buy with Exact Output launch tokens
Quote, added to input
Sell with Exact Output Quote
Launch tokens, added to input
Derive zeroForOne from the actual currency0/currency1 order. Buy/sell direction alone does not determine the swap mode.
Calculation for router integrations
Let A be the absolute unspecified-currency delta before this Hook's adjustment. Let b = hookFeeBps; use c = creatorBuyTaxBps for a buy and c = creatorSellTaxBps for a sell:
Exact Input
floor(A × b / 10000)
floor(A × c / 10000)
Exact Output
floor(A × b / (10000-b-c))
floor(A × c / (10000-b-c))
Exact Output uses one combined denominator for both fees. The combined rate must be below 100%. Each fee is rounded down separately in raw asset units.
For example, an Exact Output buy has a pre-Hook Quote input of 100,000,000 raw units and b=c=100. Each fee is 1,020,408 raw; final input is 102,040,816. With 6-decimal Quote, that is 102.040816 Quote. The router's maximum-input check must include both fees.
Allocation and settlement
The base fee is split between platform and Creator using protocolFeeShareBps. Partner commission comes from the base platform portion; Creator Tax belongs entirely to Creator revenue.
pendingCreator already includes pendingCreatorTax. Track accrued amounts by pool and fee asset until settlement. Core settlement converts eligible launch-token fees into Quote. See Fees and Claims.
Last updated
Was this helpful?