Fee Settlement and State
Hook settlement converts eligible launch-token fees to Quote and credits revenue into FeeEscrow. It runs separately from a Distributor's buyback, vesting or Holder-reward flows.
Begin → Settle → Finalize
Call these methods on the Hook proxy:
Begin
beginPoolFeeSweep(token, minConversionQuoteOut)
Factory.feeSweepOperator(); active pool; no open settlement
Partner pages
settlePoolFeeSweepPartners(poolId, epochId, partnerIds)
Anyone; nonempty page of unsettled Partners active in that epoch
Finalize
finalizePoolFeeSweep(poolId, epochId)
Anyone; all required Partner accounting settled
Use the actual epochId returned by Begin or its event. settlingEpoch(poolId) returns zero when idle; otherwise it returns epochId + 1. This Hook epoch is a settlement batch, separate from a Holder reward Epoch.
Begin credits settled platform and Creator Quote revenue. Partner pages credit Partner Quote revenue. Finalize closes the batch; it does not wait for beneficiaries to claim.
Partial conversion and rounding
If conversion input contains launch tokens, Begin requires nonzero minConversionQuoteOut. Use a current executable quote. maxInternalPriceImpactBps limits square-root-price movement, not spot-price percentage.
A price limit can leave input unconverted. Keep that remainder in its pending/carry ledger. New Partner fees after Begin enter a later epoch. Reconcile actual consumed input, converted output and Escrow credits from events and current state.
Hook conversion allocates integer rounding residuals across its revenue ledgers. The final remaining Partner-conversion Quote rounding amount is credited to the last Partner of the completing page. These rules are specific to Hook settlement; do not apply them to Splitter share allocation.
Check progress and claim
Discover active Partners from epoch events/state and check partnerSettled before submitting pages. A repeated or missing Partner can prevent completion.
Curve and Hook pendingCreator include their pendingCreatorTax detail; adding them double-counts tax. For actual core claimable revenue, read FeeEscrow.balanceOfToken(recipient, asset) or partnerBalance(partnerId, asset). Settlement callers cannot redirect these credits. Partner freeze preserves crediting but blocks that Partner's claim.
Continue with Fees and Claims or Revenue Distribution.
Was this helpful?