v4-dynamic-auction
Source References: Code citations link to raw GitHub files pinned to commit
46bad16d.
V4 Dynamic Auction
When to use
- Tasks involving
src/initializers/Doppler.solorsrc/initializers/UniswapV4Initializer.sol - Questions about epoch rebalancing, gamma, tick accumulator, slug mechanics, or proceeds thresholds
- Debugging why a dynamic auction rebalanced, exited early, or entered insufficient-proceeds mode
Prerequisites
- Understand
token0 < token1ordering and tick direction - Know the sale asset and numeraire for the target pool
- Have access to Foundry (
forge,cast) and a V4-capable RPC endpoint
Core workflow
- Decode the initialization config (
startingTick,endingTick,gamma,epochLength,numTokensToSell, proceeds bounds). - Confirm epoch state (
lastEpoch,tickAccumulator,totalTokensSold,totalProceeds). - Evaluate rebalance mode for the current epoch:
- Max adjustment (no/low sales)
- Relative adjustment (behind schedule)
- Oversold adjustment (ahead of schedule)
- Verify liquidity placement across slug classes:
- Lower slug (refund support)
- Upper slug (current epoch sales)
- Price discovery slugs (future epochs)
- Determine exit path:
- Early exit (
maximumProceedsreached) - Success at end time (
minimumProceedsreached) - Insufficient proceeds (refund path)
- Early exit (
Quick facts
| Item | Value |
|---|---|
| Main contract | src/initializers/Doppler.sol |
| Precision constant | WAD = 1e18 |
| Rebalance trigger | beforeSwap when entering a new epoch |
| Max price discovery slugs | 15 |
| Exit model | Proceeds-driven (not far-tick-driven) |
Failure modes
- Tick misinterpretation from wrong token ordering
- Incorrect epoch assumptions when
lastEpochhas not advanced - Invalid parameter tuning (
gammatoo aggressive, epoch too short) - Misreading insufficient-proceeds behavior as a hard failure
Verification hooks
- Auction state: see
../verification/references/CAST.md - Math conversions: see
../verification/references/VIEM.md - Event-driven analysis: see
../verification/references/EXPLORERS.md
References
- FLOW.md
- PARAMETERS.md
- FORMULAS.md
- GOTCHAS.md
- Source:
doppler/src/initializers/Doppler.sol,doppler/docs/Doppler.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