Index of every page on this site: llms.txt
All skills
Run it yourself

Reference for static price discovery auctions on legacy networks that only support Uniswap v3.

Use this Skill: https://skilld.dev/gh/whetstoneresearch/doppler-skills/pda-static

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesPARAMETERS.md

≈2.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

V3 Static Auction Parameters

InitData Struct

Standard (UniswapV3Initializer)

struct InitData {
    uint24 fee;
    int24 tickLower;
    int24 tickUpper;
    uint16 numPositions;
    uint256 maxShareToBeSold;
}

Source: UniswapV3Initializer.sol (lines 44-50)

Lockable (LockableUniswapV3Initializer)

struct InitData {
    uint24 fee;
    int24 tickLower;
    int24 tickUpper;
    uint16 numPositions;
    uint256 maxShareToBeSold;
    BeneficiaryData[] beneficiaries;
}

Source: LockableUniswapV3Initializer.sol (lines 81-88)

Parameter Details

fee (uint24)

The Uniswap V3 fee tier. Determines tick spacing.

Fee Value Basis Points Tick Spacing Use Case
500 0.05% 10 Stable pairs
3000 0.30% 60 Most common
10000 1.00% 200 Exotic pairs

Validation: Must return non-zero from factory.feeAmountTickSpacing(fee) Source: UniswapV3Initializer.sol (lines 109-110)

tickLower (int24)

Lower boundary of the bonding curve range.

Constraints:

  • Must be < tickUpper
  • Must be divisible by tick spacing

Validation:

require(tickLower < tickUpper, InvalidTickRangeMisordered(tickLower, tickUpper));
// ...
if (tick % tickSpacing != 0) revert InvalidTickRange(tick, tickSpacing);

Source: UniswapV3Initializer.sol (lines 107, 383-384)

tickUpper (int24)

Upper boundary of the bonding curve range.

Constraints:

  • Must be > tickLower
  • Must be divisible by tick spacing

numPositions (uint16)

Number of LP positions to create across the tick range.

How it works:

  • Tokens are divided equally: amountPerPosition = totalAmtToBeSold / numPositions
  • Positions span from closeTick to farTick in equal intervals
  • More positions = finer granularity but higher gas costs

Source: UniswapV3Initializer.sol (lines 297)

maxShareToBeSold (uint256)

Percentage of total tokens allocated for sale on the bonding curve.

Range: 0 to WAD (1e18 = 100%)

Calculation:

uint256 numTokensToSell = FullMath.mulDiv(totalTokensOnBondingCurve, maxShareToBeSold, WAD);
uint256 numTokensToBond = totalTokensOnBondingCurve - numTokensToSell;

Source: UniswapV3Initializer.sol (lines 117-118)

Example:

  • maxShareToBeSold = 0.8e18 (80%)
  • 1,000,000 total tokens
  • 800,000 for sale, 200,000 for tail position bonding

beneficiaries (BeneficiaryData[]) - Lockable Only

Array of fee recipients with their share allocations.

struct BeneficiaryData {
    address beneficiary;
    uint256 shares;
}

Source: StreamableFeesLocker.sol (imported at LockableUniswapV3Initializer.sol:12)

Validation Rules:

  1. Ascending order: Beneficiary addresses must be sorted

    require(prevBeneficiary < beneficiary.beneficiary, UnorderedBeneficiaries());
  2. Non-zero shares: Each beneficiary must have shares > 0

    require(beneficiary.shares > 0, InvalidShares());
  3. Total must equal WAD: All shares must sum to 1e18 (100%)

    require(totalShares == WAD, InvalidTotalShares());
  4. Protocol owner minimum: protocol owner must receive >= 5%

    require(beneficiary.shares >= WAD / 20, InvalidProtocolOwnerShares());
  5. Protocol owner required: protocol owner must be in the list

    require(foundProtocolOwner, InvalidProtocolOwnerBeneficiary());

Source: LockableUniswapV3Initializer.sol (lines 461-486)

Constants

WAD

uint256 constant WAD = 1e18;

Used for fixed-point arithmetic. Represents 100% in share calculations.

Source: UniswapV3Initializer.sol (lines 42), Source: LockableUniswapV3Initializer.sol (lines 79)

State Structures

PoolState (Standard)

struct PoolState {
    address asset;
    address numeraire;
    int24 tickLower;
    int24 tickUpper;
    uint16 numPositions;
    bool isInitialized;
    bool isExited;
    uint256 maxShareToBeSold;
    uint256 totalTokensOnBondingCurve;
}

Source: UniswapV3Initializer.sol (lines 58-68)

PoolState (Lockable)

struct PoolState {
    address asset;
    address numeraire;
    int24 tickLower;
    int24 tickUpper;
    uint256 maxShareToBeSold;
    uint256 totalTokensOnBondingCurve;
    BeneficiaryData[] beneficiaries;
    LpPosition[] lpPositions;
    PoolStatus status;
}

Source: LockableUniswapV3Initializer.sol (lines 103-113)

PoolStatus (Lockable)

enum PoolStatus {
    Uninitialized,
    Initialized,
    Locked,
    Exited
}

Source: LockableUniswapV3Initializer.sol (lines 96-101)

LpPosition

struct LpPosition {
    int24 tickLower;
    int24 tickUpper;
    uint128 liquidity;
    uint16 id;
}

Source: UniswapV3Initializer.sol (lines 70-75), Source: LockableUniswapV3Initializer.sol (lines 115-120)


Far Tick Concept

V3 static auctions derive the "far tick" from tickLower/tickUpper based on isToken0.

Definition

The far tick is the farthest boundary that must be reached for migration:

int24 farTick = isToken0 ? tickUpper : tickLower;
int24 closeTick = isToken0 ? tickLower : tickUpper;

Source: LockableUniswapV3Initializer.sol (lines 356-357)

Direction Logic

isToken0 Asset farTick closeTick Price movement
true token0 tickUpper tickLower Price rises in token1 terms
false token1 tickLower tickUpper Price rises in token0 terms

Migration Check

int24 farTick = isToken0 ? tickUpper : tickLower;
require(
    isToken0 ? tick >= farTick : tick <= farTick,
    CannotMigrateInsufficientTick(farTick, tick)
);

Source: LockableUniswapV3Initializer.sol (lines 243-244)

Position Distribution

Positions are distributed from closeTick toward farTick:

LpPosition[] memory positions = new LpPosition[](totalPositions);
int24 rangePerPosition = (farTick - closeTick) / int16(totalPositions);

for (uint256 i; i < totalPositions; ++i) {
    positions[i] = LpPosition({
        tickLower: isToken0 ? closeTick + rangePerPosition * int16(i) : farTick - rangePerPosition * int16(i + 1),
        tickUpper: isToken0 ? closeTick + rangePerPosition * int16(i + 1) : farTick - rangePerPosition * int16(i),
        liquidity: 0,  // Calculated later
        id: uint16(i)
    });
}

Source: LockableUniswapV3Initializer.sol (lines 361-380)

See also: pda-multicurve for explicit farTick parameter in hook-based multicurve flows

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill is a reference guide for price discovery auctions on Uniswap v3 and contains no executable code or malicious patterns.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer8mo

    1/5 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 4f654fe. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 9 months ago
metadata
{
  "author": "doppler",
  "version": "2.0"
}

README badge

README badge for whetstoneresearch/doppler-skills/pda-static