Index / Doppler
product · BUSL-1.1 · last updated 2026-08-27
Doppler
Whetstone bonding-curve hook: rebalance slugs before swap, migrate when proceeds cap hit.
Doppler is Whetstone Research production code (BUSL-1.1). The hook runs a time-epoch bonding curve: beforeSwap rebalances concentrated liquidity slugs when a new epoch starts, tracks totalTokensSold and totalProceeds, and blocks swaps before startTime or after migration. beforeAddLiquidity reverts (CannotAddLiquidity); LPs are the hook's slug positions, not external adds. Study for launchpad / LBP-style v4 hooks. Do not deploy without a Whetstone license. Excerpt shows permissions and epoch gate in beforeSwap. Full file at the permalink. Not an audit.
Permission bits
These bits must match the deployed address. Confirm on-chain before you route.
beforeInitializeafterInitializebeforeAddLiquiditybeforeSwapafterSwapbeforeDonate
Solidity
Excerpt from src/initializers/Doppler.sol. Production hook. Study the callbacks, do not paste it as your factory. Not an audit.
// SPDX-License-Identifier: BUSL-1.1
function getHookPermissions() public pure override returns (Hooks.Permissions memory) {
return Hooks.Permissions({
beforeInitialize: true,
afterInitialize: true,
beforeAddLiquidity: true,
beforeRemoveLiquidity: false,
afterAddLiquidity: false,
afterRemoveLiquidity: false,
beforeSwap: true,
afterSwap: true,
beforeDonate: true,
afterDonate: false,
beforeSwapReturnDelta: false,
afterSwapReturnDelta: false,
afterAddLiquidityReturnDelta: false,
afterRemoveLiquidityReturnDelta: false
});
}
function _beforeSwap(...) internal override returns (bytes4, BeforeSwapDelta, uint24) {
if (block.timestamp < startingTime) revert CannotSwapBeforeStartTime();
// rebalance slug liquidity when epoch advances, then pool executes swap
}Spec
| Kind | product |
|---|---|
| Status | production |
| License | BUSL-1.1 |
| Source | https://github.com/whetstoneresearch/doppler |
| Categories | LaunchpadsLP management |
| Properties | Dynamic feeVanilla swap |
| Chains | Base |
| Website | https://whetstone.cc/ |
FAQ
Can I paste this into production? The snippet is an excerpt. Use the full file at the source URL, match flags to the address, and treat this page as a map, not a guarantee.
How do I build this safely? Start with secure v4 hooks and the OpenZeppelin hooks guide.