rehype
Source References: Code citations link to raw GitHub files pinned to commit
46bad16d.
Rehype Doppler Hook
When to use
- Tasks mention Rehype, buybacks, fee distribution, or
claimAirlockOwnerFees - You are working in
src/dopplerHooks/RehypeDopplerHook.sol - You are troubleshooting hook-driven swap behavior for pools managed through
DopplerHookInitializer
Prerequisites
- Pool asset address
- Access to
DopplerHookInitializer.getState(asset) - Correct signer (
buybackDstfor fee distribution updates,airlock.owner()for owner-fee claims)
Core workflow
- Resolve pool context from initializer state and derive
poolId. - Read hook state:
getFeeDistributionInfo(poolId)getHookFees(poolId)getPoolInfo(poolId)
- Apply operation:
- Update distribution with
setFeeDistribution(...)frombuybackDst - Collect beneficiary-directed fees with
collectFees(asset) - Claim 5% owner fees with
claimAirlockOwnerFees(asset)fromairlock.owner()
- Update distribution with
- Validate storage resets and token balance deltas after each action.
Quick facts
| Item | Detail |
|---|---|
| Initializer integration | Uses DopplerHookInitializer.getState(asset) |
| Distribution authority | buybackDst only |
| Airlock owner fees | Separate 5% bucket, claimable via claimAirlockOwnerFees |
| Primary tests | test/integration/RehypeDopplerHook.t.sol |
Failure modes
- Distribution does not sum to
WAD - Non-authorized caller for distribution update
- Non-owner caller for owner-fee claim
- Assuming hook fees equal transferable balances without checking internal buckets
References
- CONFIGURATION.md
- TESTING.md
- DEPLOYMENT.md
- Source:
doppler/src/dopplerHooks/RehypeDopplerHook.sol,doppler/docs/specs/REHYPE_AIRLOCK_OWNER_FEE_SPEC.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`.
7pda-multicurve
Reference for multicurve price discovery auctions with scheduled multicurve as the canonical default; covers shares-based curve allocation, deployment modes, and lifecycle constraints.
4