Source References: Use Doppler deployments as the contract source of truth for deployed addresses and revisions.
Rehypothecation Hook (RehypeDopplerHook)
When to use
- Tasks mention 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;buybackDstonly when usingRehypeDopplerHookMigrator.setFeeDistribution(...))
Core workflow
- Resolve pool context from initializer state and derive
poolId. - Read hook state:
getFeeDistributionInfo(poolId)getHookFees(poolId)getPoolInfo(poolId)
- Apply operation:
- Collect beneficiary-directed fees with
collectFees(asset) - Claim protocol-owner fees with
claimAirlockOwnerFees(asset)fromairlock.owner() - If using
RehypeDopplerHookMigrator, update distribution withsetFeeDistribution(...)frombuybackDst
- Collect beneficiary-directed fees 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 on RehypeDopplerHookMigrator |
| Protocol-owner fee bucket | Claimable via claimAirlockOwnerFees(asset) |
Failure modes
- Distribution does not sum to
WAD - Non-authorized caller for distribution update on migrator variant
- Non-owner caller for protocol-owner fee claim
- Assuming hook fees equal transferable balances without checking internal buckets
References
- CONFIGURATION.md
- Source:
doppler/src/dopplerHooks/RehypeDopplerHook.sol,doppler/src/dopplerHooks/RehypeDopplerHookMigrator.sol,doppler/docs/specs/REHYPE_AIRLOCK_OWNER_FEE_SPEC.md