rehypothecation-hook

Operate and configure Doppler's rehypothecation hook (`RehypeDopplerHook`) for buybacks, beneficiary fees, and protocol-owner fee claims.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "rehypothecation-hook" with this command: npx skills add rustydotwtf/doppler-skills/rustydotwtf-doppler-skills-rehypothecation-hook

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; buybackDst only when using RehypeDopplerHookMigrator.setFeeDistribution(...))

Core workflow

  1. Resolve pool context from initializer state and derive poolId.
  2. Read hook state:
    • getFeeDistributionInfo(poolId)
    • getHookFees(poolId)
    • getPoolInfo(poolId)
  3. Apply operation:
    • Collect beneficiary-directed fees with collectFees(asset)
    • Claim protocol-owner fees with claimAirlockOwnerFees(asset) from airlock.owner()
    • If using RehypeDopplerHookMigrator, update distribution with setFeeDistribution(...) from buybackDst
  4. Validate storage resets and token balance deltas after each action.

Quick facts

ItemDetail
Initializer integrationUses DopplerHookInitializer.getState(asset)
Distribution authoritybuybackDst only on RehypeDopplerHookMigrator
Protocol-owner fee bucketClaimable 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

Related skills

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

uniswap-fundamentals

No summary provided by upstream source.

Repository SourceNeeds Review
General

fee-architecture

No summary provided by upstream source.

Repository SourceNeeds Review
General

verification

No summary provided by upstream source.

Repository SourceNeeds Review
General

proceeds-split-migration

No summary provided by upstream source.

Repository SourceNeeds Review