rehypothecation-hook
Source References: Use Doppler deployments as the contract source of truth for deployed addresses and revisions.
Rehypothecation Hook (Rehype)
When to use
- Tasks mention Rehype, the rehypothecation hook, buybacks, beneficiary fee distribution, or
claimAirlockOwnerFees - You are troubleshooting hook-driven swap behavior for pools managed through
DopplerHookInitializer
Prerequisites
- Pool asset address
- Access to
DopplerHookInitializer.getState(asset) - Correct signer (
airlock.owner()for protocol-owner fee claims)
Core workflow
- Resolve pool context and derive
poolId.- Use
DopplerHookInitializer.getState(asset)
- Use
- Read hook state:
getFeeDistributionInfo(poolId)getHookFees(poolId)getPoolInfo(poolId)getFeeRoutingMode(poolId)getFeeSchedule(poolId)
- Apply operation:
- Collect beneficiary-directed fees with
collectFees(asset) - Claim protocol-owner fees with
claimAirlockOwnerFees(asset)fromairlock.owner()
- Collect beneficiary-directed fees with
- Validate storage resets and token balance deltas after each action.
Quick facts
| Item | Detail |
|---|---|
| Supported hook | RehypeDopplerHookInitializer |
| Fee model | Decaying fee schedule via getFeeSchedule(poolId) |
| Distribution authority | Configured at initialization |
| Fee routing modes | DirectBuyback, RouteToBeneficiaryFees |
| Airlock owner share | Fixed 5% of the raw hook fee |
| Protocol-owner fee bucket | Claimable via claimAirlockOwnerFees(asset) |
Failure modes
- Treating initializer-side Rehype as a static
customFeehook instead of a fee-schedule hook - Distribution does not sum to
WAD(1e18, or 100%) - Non-owner caller for protocol-owner fee claim
- Assuming fee distribution can be updated after initialization
- Confusing Rehype
beneficiaryFeeswith initializer beneficiary-share accounting - Assuming hook fees equal transferable balances without checking internal buckets
References
- CONFIGURATION.md
- Source: RehypeDopplerHookInitializer.sol, RehypeTypes.sol, RehypeDopplerHookInitializer.md
Related skills
More from rustydotwtf/doppler-skills
fee-architecture
Reference for Doppler fee collection, distribution, and configuration across Airlock, FeesManager, locker contracts, and hook-based fee paths.
9token-lifecycle
Reference for Doppler token creation, vesting, inflation, and factory selection across DERC20, DERC2080, CloneERC20, and CloneDERC20VotesV2 paths.
9uniswap-fundamentals
Reference for Uniswap V3/V4 concepts used in Doppler development, including tick math, sqrtPriceX96, concentrated liquidity formulas, and V4 hooks/singleton architecture.
9verification
Verify on-chain Doppler behavior with cast, viem, RPC, and explorers for dynamic auctions, multicurve launches, hook initializer state, and migration flows.
8proceeds-split-migration
Configure and verify migration-time proceeds split flows using `ProceedsSplitter`, `TopUpDistributor`, `UniswapV4MigratorSplit`, and `UniswapV4MigratorSplitHook`.
7rehype
Operate, configure, test, and deploy Doppler's Rehype V4 hook for buybacks, beneficiary fees, and airlock-owner fee claims.
4