Configuration Guide
Source of truth
Initializer-side configuration
Use this path for RehypeDopplerHookInitializer.
- Calldata layout (
abi.encode(...)ofRehypeTypes.InitData):address numeraireaddress buybackDstuint24 startFeeuint24 endFeeuint32 durationSecondsuint32 startingTimeFeeRoutingMode feeRoutingModeFeeDistributionInfo feeDistributionInfo
- Validation:
startFee <= MAX_SWAP_FEE(currently0.8e6, or 80%)endFee <= MAX_SWAP_FEE(currently0.8e6, or 80%)startFee >= endFee- if
startFee > endFee,durationSeconds > 0 - each 4-field fee-distribution row must sum to
WAD(1e18, or 100%) startingTimeis normalized toblock.timestampwhen passed as0or already in the past
- Operational note:
- initializer-side Rehype does not use
getHookFees(poolId).customFeeas its fee source of truth - read
getFeeSchedule(poolId)instead
- initializer-side Rehype does not use
- Operational note:
- fee distribution is configured at initialization and is not customer-updated by an external admin call
Beneficiary Fee Collection
- Locate the Doppler asset address.
- Call
collectFees(asset)directly on the hook contract. - Resolve the pool through
DopplerHookInitializer.getState(asset). - Transfers accrued beneficiary fees to
buybackDst. - Returned
BalanceDeltaindicates the amounts paid out; log it for accounting.
Protocol Owner Fee Collection
The Rehype initializer hook tracks a protocol-owner fee bucket.
- Fees accumulate in
getHookFees[poolId].airlockOwnerFees0andairlockOwnerFees1. - Call
claimAirlockOwnerFees(asset)from the currentairlock.owner()address. - Only the current Airlock owner can claim this bucket.
- Returns
(fees0, fees1)indicating transferred amounts.
Fee routing behavior
FeeRoutingMode.DirectBuybacktransfers buyback-designated outputs directly tobuybackDst.FeeRoutingMode.RouteToBeneficiaryFeesrolls those outputs into Rehype's internalbeneficiaryFeesbuckets instead.- Rehype beneficiary fees are internal hook accounting that is ultimately claimed to
buybackDst. - They are separate from beneficiary-share accounting managed by the initializer flow.
Runtime notes
- Rehype takes a fixed 5% share of the raw hook fee for the Airlock owner, with the remaining 95% routed through buybacks, beneficiary accounting, and LP reinvestment.
- Routing only proceeds once accumulated
fees0orfees1exceedEPSILON(currently1e6). - LP-designated fees are rebalanced and added back into a full-range LP position instead of sitting idle.
Operational Checklist
- Snapshot
getFeeDistributionInfo,getHookFees, andgetPoolInfofor the target pool. - Snapshot
getFeeSchedule(poolId)as well. - Verify on-chain balances of the hook match
beneficiaryFeesto avoid payout underflows. - Ensure
buybackDstis set correctly, since it multiplexes both buybacks and beneficiary payouts. - Confirm the initialized fee schedule before assuming current fee behavior.
- If protocol-owner fee claiming is part of your flow, confirm
airlock.owner()before callingclaimAirlockOwnerFees(asset).