galleonlabs/crypto-defi-skills / packages/lp/skills/uniswap-v3-liquidity
uniswap-v3-liquidity
VerifiedUse when managing a Uniswap v3 NFT position: choose usable ticks, mint or increase liquidity, collect fees, remove liquidity, or move a range. Resolves position inventory and fee accounting with exact manager calls; excludes v4 and gauge custody.
| File | Kind | Size |
|---|---|---|
| ATTRIBUTION.md | markdown | 921 B |
| LICENSE | other | 1.0 KB |
| SKILL.md | skill md | 5.4 KB |
| agents/openai.yaml | config | 273 B |
| references/recipes.md | markdown | 2.5 KB |
| scripts/ticks.mjs | script | 1.5 KB |
scripts/ticks.mjs
View on GitHub// Copyright (c) Galleon Labs. MIT License.
// Offline tick arithmetic only; no RPC, prices, calldata or signing.
export function ticks({ lower, upper, spacing, current }) {
for (const [key, value] of Object.entries({ lower, upper, spacing, current })) {
if (!Number.isSafeInteger(value)) throw new Error(`${key} must be a safe integer`);
}
if (spacing <= 0 || spacing > 887272 || lower >= upper) throw new Error('Invalid spacing or ordered range');
const min = Math.ceil(-887272 / spacing) * spacing;
const max = Math.floor(887272 / spacing) * spacing;
if (lower < min || upper > max || current < -887272 || current > 887272) throw new Error('Ticks outside usable bounds');
const tickLower = Math.floor(lower / spacing) * spacing;
const tickUpper = Math.ceil(upper / spacing) * spacing;
return { tickLower, tickUpper, active: current >= tickLower && current < tickUpper,
principal: current < tickLower ? 'token0' : current >= tickUpper ? 'token1' : 'both',
evidence: 'offline arithmetic; token order and live state unverified' };
}
if (import.meta.url === new URL(process.argv[1], 'file:').href) {
if (process.argv[2] === '--help') { console.log('Usage: node scripts/ticks.mjs JSON\nJSON: integer lower, upper, spacing, current. Offline arithmetic only.'); process.exit(0); }
try { console.log(JSON.stringify(ticks(JSON.parse(process.argv[2])), null, 2)); }
catch (error) { console.error(error instanceof SyntaxError ? 'Invalid JSON input; use --help for the expected fields' : error.message); process.exitCode = 1; }
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |