Install
$ agentstack add skill-uniswap-uniswap-ai-configurator ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
CCA Configuration
Configure Continuous Clearing Auction (CCA) smart contract parameters for fair and transparent token distribution.
> Runtime Compatibility: This skill uses AskUserQuestion for interactive prompts. If AskUserQuestion is not available in your runtime, collect the same parameters through natural language conversation instead.
Instructions for Claude Code
When the user invokes this skill, guide them through a bulk interactive form configuration flow using AskUserQuestion. Collect parameters in batches to minimize user interaction rounds.
Bulk Interactive Form Rules
- Batch questions - Ask up to 4 questions at once using a single AskUserQuestion call
- Allow direct input - For fields requiring custom values (addresses, numbers):
- Provide a "Not available yet" or "Skip for now" option
- The "Other" option (automatically provided) allows direct custom input
- NEVER ask "Do you have X?" as a separate question
- Store answers - Keep track of all collected values in a configuration object
- Validate after collection - After each batch, validate all inputs before proceeding
- Show progress - After each batch, show which parameters are collected and which remain
Configuration Flow
Collect parameters in these batches:
Batch 1: Task Selection (1 question)
Question 1: Task Type
- Prompt: "What would you like to do with CCA?"
- Options: "Configure auction parameters", "Generate supply schedule only", "Review existing config", "Deploy existing config"
After collection: If not "Configure auction parameters", skip to appropriate section.
Batch 2: Basic Configuration (4 questions)
Question 1: Network
- Prompt: "Which network to deploy on?"
- Options: "Ethereum Mainnet", "Unichain (Mainnet)", "Unichain Sepolia (Testnet)", "Base", "Arbitrum", "Sepolia"
- Store:
chainId,blockTime,rpcUrl,currencyDecimals(for selected currency)
Question 2: Token Address
- Prompt: "Token to be auctioned?"
- Options: "Token not deployed yet" (placeholder), Custom address (via "Other")
- Validation: Must be 42 chars starting with 0x
- Store:
token
Question 3: Total Supply
- Prompt: "How many tokens to auction?"
- Options: "100 million tokens (18 decimals)", "1 billion tokens (18 decimals)", "10 billion tokens (18 decimals)", Custom (via "Other")
- Validation: Must be = 1 basis point of floor price
- Store:
tickSpacingPercentage,tickSpacing(Q96),roundedFloorPrice
After collection: Validate inputs, verify floor price divisibility, calculate and display Q96 values, show timing summary.
Batch 4: Recipients & Launch (4 questions)
Question 1: Tokens Recipient
- Prompt: "Where should unsold tokens be sent?"
- Options: "Same as funds recipient", Custom address (via "Other")
- Validation: Must be 42 chars starting with 0x
- Store:
tokensRecipient
Question 2: Funds Recipient
- Prompt: "Where should raised funds be sent?"
- Options: "Same as tokens recipient", Custom address (via "Other")
- Validation: Must be 42 chars starting with 0x
- Store:
fundsRecipient
Question 3: Start Time
- Prompt: "When should the auction start?"
- Options: "In 1 hour", "In 6 hours", "In 24 hours", Custom block number (via "Other")
- Fetch current block number from RPC and calculate
- Store:
startBlock - Calculate:
endBlock = startBlock + prebidBlocks + auctionBlocks,claimBlock = endBlock
Question 4: Minimum Funds Required
- Prompt: "Require minimum currency raised for graduation?"
- Options: "No minimum (0)", "100 ETH", "1000 ETH", Custom amount in wei (via "Other")
- Store:
requiredCurrencyRaised
After collection: Validate addresses, fetch current block from RPC, calculate full block timeline.
Batch 5: Optional Hook (1 question)
Question 1: Validation Hook
- Prompt: "Use a validation hook contract?"
- Options: "No validation hook", Custom hook address (via "Other")
- Validation: Must be 42 chars starting with 0x (if provided)
- Store:
validationHook
After collection: Validate hook address if provided.
Step 6: Generate Supply Schedule
If MCP server is not running, provide instructions to start it:
# Navigate to MCP server directory
cd packages/plugins/uniswap-cca/mcp-server/supply-schedule
# Run setup script (first time only)
chmod +x setup.sh
./setup.sh
# Start the MCP server
python3 server.py
Once the MCP server is running, call the cca-supply-schedule__generate_supply_schedule MCP tool with the collected parameters. The tool expects a JSON object:
{
"auction_blocks": 86400,
"prebid_blocks": 0
}
Replace the values with the actual auctionBlocks and prebidBlocks collected from the user.
If the MCP tool is unavailable, use the fallback Python algorithm directly (see Supply Schedule Configuration section).
Store: supplySchedule
Step 7: Generate and Display Configuration
After collecting all parameters and generating the supply schedule, display the complete JSON configuration in the CLI output:
{
"[chainId]": {
"token": "...",
"totalSupply": ...,
"currency": "...",
"tokensRecipient": "...",
"fundsRecipient": "...",
"startBlock": ...,
"endBlock": ...,
"claimBlock": ...,
"tickSpacing": ...,
"validationHook": "...",
"floorPrice": ...,
"requiredCurrencyRaised": ...,
"supplySchedule": [...]
}
}
Do NOT automatically create a file. Let the user copy the JSON or specify a filepath to save it.
Step 8: Display Summary
Show the user a comprehensive formatted summary including:
- Network and chain ID
- Token and currency details
- Block timeline (start, end, claim) with human-readable times
- Pricing (floor price, tick spacing) in both Q96 and ratio formats
- Recipients (tokens, funds)
- Supply schedule summary (total phases, final block percentage)
- Validation checklist (all validation rules passed/failed)
Step 9: Next Steps
Ask the user what they want to do:
- "Save to file" (ask for filepath, default:
script/auction-config.json) - "View deployment instructions" (suggest using the deployer skill)
- "Modify configuration"
- "Exit" (just end, they can copy the JSON from CLI output)
Important Notes
- Validate in batches - Validate all inputs after each batch collection
- Fetch current block number from RPC when calculating start/end blocks
- Calculate Q96 values correctly for floor price and tick spacing:
- CRITICAL: Account for decimal differences:
Q96 * ratio / 10^(tokenDecimals - currencyDecimals) - USDC is 6 decimals on all networks - divide by 10^12 for 18-decimal tokens
- Native ETH is 18 decimals - no adjustment needed for 18-decimal tokens
- Round floor price to be evenly divisible by tick spacing:
roundedFloorPrice = (floorPrice // tickSpacing) * tickSpacing- MUST verify:
roundedFloorPrice % tickSpacing == 0 - Use the MCP tool for supply schedule generation (provide setup instructions if not running)
- Minimize interaction rounds - Collect as many params as reasonable per batch
Network-Specific Constants
Store these for quick reference:
const NETWORKS = {
1: {
name: 'Mainnet',
blockTime: 12,
rpc: 'https://ethereum-rpc.publicnode.com',
usdc: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
},
130: {
name: 'Unichain',
blockTime: 1,
rpc: 'https://mainnet.unichain.org',
usdc: '0x078D782b760474a361dDA0AF3839290b0EF57AD6',
},
1301: {
name: 'Unichain Sepolia (Testnet)',
blockTime: 2,
rpc: 'https://sepolia.unichain.org',
usdc: '0x078D782b760474a361dDA0AF3839290b0EF57AD6',
},
8453: {
name: 'Base',
blockTime: 2,
rpc: 'https://mainnet.base.org',
usdc: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
},
42161: {
name: 'Arbitrum',
blockTime: 2,
rpc: 'https://arb1.arbitrum.io/rpc',
usdc: '0xaf88d065e77c8cc2239327c5edb3a432268e5831',
},
11155111: {
name: 'Sepolia',
blockTime: 12,
rpc: 'https://ethereum-sepolia-rpc.publicnode.com',
usdc: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
},
};
// Q96 = 2^96 (JavaScript BigInt notation)
const Q96 = 79228162514264337593543950336n;
Python equivalent:
# Q96 = 2**96
Q96 = 79228162514264337593543950336
Overview
CCA (Continuous Clearing Auction) is a novel auction mechanism that generalizes the uniform-price auction into continuous time. It provides fair price discovery for bootstrapping initial liquidity while eliminating timing games and encouraging early participation.
Key features:
- Fair price discovery: Continuous clearing with no timing games
- Transparent distribution: Supply released on a predetermined schedule
- Flexible configuration: Customizable auction parameters and schedules
- Multi-chain support: Canonical deployment across EVM chains
- Factory deployment: Consistent addresses via CREATE2
Quick Decision Guide
| Task... | Use This Section | | ---------------------------- | ----------------------------- | | Configure auction parameters | Configuration Guide | | Generate supply schedule | Supply Schedule Configuration | | Understand auction mechanics | Technical Overview |
Configuration Guide
Auction Parameters
CCA auctions are configured through the AuctionParameters struct:
struct AuctionParameters {
address currency; // Token to raise funds in (address(0) for ETH)
address tokensRecipient; // Address to receive leftover tokens
address fundsRecipient; // Address to receive all raised funds
uint64 startBlock; // Block when auction starts
uint64 endBlock; // Block when auction ends
uint64 claimBlock; // Block when tokens can be claimed
uint256 tickSpacing; // Fixed granularity for prices (Q96)
address validationHook; // Optional hook (use 0x0 if none)
uint256 floorPrice; // Starting floor price (Q96)
uint128 requiredCurrencyRaised; // Minimum funds to graduate
bytes auctionStepsData; // Packed supply issuance schedule
}
Configuration File Format
Create a JSON configuration file (e.g., script/auction-config.json):
{
"1": {
"token": "0x...",
"totalSupply": 1e29,
"currency": "0x0000000000000000000000000000000000000000",
"tokensRecipient": "0x...",
"fundsRecipient": "0x...",
"startBlock": 24321000,
"endBlock": 24327001,
"claimBlock": 24327001,
"tickSpacing": 79228162514264337593543950,
"validationHook": "0x0000000000000000000000000000000000000000",
"floorPrice": 7922816251426433759354395000,
"requiredCurrencyRaised": 0,
"supplySchedule": [
{ "mps": 1000, "blockDelta": 6000 },
{ "mps": 4000000, "blockDelta": 1 }
]
}
}
Parameter Details
Basic Configuration
| Parameter | Type | Description | | ----------------- | ------- | ------------------------------------------------- | | token | address | Token being auctioned | | totalSupply | number | Total tokens to auction (wei/smallest unit) | | currency | address | Purchase token (USDC, etc.) or address(0) for ETH | | tokensRecipient | address | Where unsold tokens go | | fundsRecipient | address | Where raised funds go |
Block Configuration
| Parameter | Type | Description | Constraint | | ------------ | ------ | -------------------------- | ---------------------- | | startBlock | number | When auction starts | startBlock = endBlock |
Block times by network:
- Mainnet, Sepolia: 12s per block
- Unichain, Base, Arbitrum: 2s per block
Pricing Parameters
| Parameter | Type | Description | | ------------------------ | ------- | ---------------------------------------------- | | floorPrice | number | Minimum price (Q96 format) | | tickSpacing | number | Price tick increment (Q96 format) | | validationHook | address | Optional validation contract (use 0x0 if none) | | requiredCurrencyRaised | number | Minimum funds needed (0 if no minimum) |
Supply Schedule
| Parameter | Type | Description | | ---------------- | ----- | ---------------------------------- | | supplySchedule | array | Array of {mps, blockDelta} objects |
Price Calculations (Q96 Format)
CCA uses Q96 fixed-point format for precise pricing. The base value 2^96 (79228162514264337593543950336) represents a 1:1 price ratio.
Floor Price Calculation
CRITICAL: Account for decimal differences between token and currency.
# Base value for 1:1 ratio
Q96 = 79228162514264337593543950336
# Formula: Q96 * (human price ratio) / 10^(token_decimals - currency_decimals)
# Example 1: USDC (6 decimals) per 18-decimal token at $0.10 ratio
token_decimals = 18
currency_decimals = 6 # USDC has 6 decimals
decimal_adjustment = 10 ** (token_decimals - currency_decimals) # 10^12
floorPrice = Q96 * 0.1 / decimal_adjustment
# Result: 7922816251426433759354395 (approximately)
# Example 2: Native ETH (18 decimals) per 18-decimal token at 0.1 ratio
token_decimals = 18
currency_decimals = 18 # Native ETH has 18 decimals
decimal_adjustment = 10 ** (18 - 18) # 10^0 = 1
floorPrice = Q96 * 0.1 / 1
# Result: 7922816251426433759354395034
Key Point: USDC has 6 decimals on all networks, so you must divide by 10^12 when using USDC with 18-decimal tokens.
Tick Spacing Calculation
Tick spacing governs where bids can be placed. Choose AT LEAST 1 basis point of the floor price. 1% or 10% is also reasonable.
# Example: 1% of floor price
tickSpacing = int(floorPrice * 0.01)
# For floorPrice = 7922816251426433759354395000
# Result: 79228162514264337593543950
Rounding Floor Price (CRITICAL)
Floor price MUST be evenly divisible by tick spacing. Round DOWN to ensure exact divisibility:
# Calculate tick spacing first
tickSpacing = int(floorPrice * 0.01) # 1% of floor price
# Round floor price DOWN to be evenly divisible
roundedFloorPrice = (floorPrice // tickSpacing) * tickSpacing
# VERIFY divisibility (must be True)
assert roundedFloorPrice % tickSpacing == 0, "Floor price must be divisible by tick spacing!"
Example:
Q96 = 79228162514264337593543950336
raw_floor_price = int(Q96 * 0.0001) # 0.0001 ETH per token
# Result: 7922816251426434139029504
tick_spacing = int(raw_floor_price * 0.01) # 1%
# Result: 79228162514264350785536
rounded_floor_price = (raw_floor_price // tick_spacing) * tick_spacing
# Result: 7843588088912170727768064
# Verify: 7843588088912170727768064 / 79228162514264350785536 = 99 (exact)
# Remainder: 0 ✓
Warning: Setting too small of a tick spacing will make the auction extremely gas inefficient and can result in DoS attacks.
Supply Schedule Configuration
Understanding MPS (Milli-Basis Points)
Supply schedules use MPS = 1e7 (10 million), where each unit represents one thousandth of a basis point.
The supply schedule defines the token issuance rate over time. Each step contains:
mps: Tokens released per block (in mps units)blockDelta: Number of blocks this rate applies
Standard Schedule Generator
The plugin includes an MCP server that generates supply schedules using a normalized convex curve with the following properties:
- 12 steps (default, configurable) for gradual release
- Equal token amounts per step (5.8333% for 70% gradual r
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Uniswap
- Source: Uniswap/uniswap-ai
- License: MIT
- Homepage: https://developers.uniswap.org
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.