lp-remove
Remove liquidity from an existing ETH/DIEM v3 LP position and collect proceeds. Use when closing a position to consolidate DIEM.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Remove liquidity from an existing ETH/DIEM v3 LP position and collect proceeds. Use when closing a position to consolidate DIEM.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Decide how to allocate DIEM between Venice compute staking, WETH swap for x402 API access, Uniswap LP, and Aerodrome LP. Run once per tick before any capital movement.
Read all agent on-chain positions via the check-portfolio.ts script. Use this instead of raw curl/cast calls to avoid hex encoding mistakes.
Claim DIEM from FeeLocker, run accumulate-vs-build analysis, and route earnings to LP or Venice staking. Scheduled every 12 hours via aeon. DRY-RUN BY DEFAULT — pass --live to execute.
Launch a Liquid Protocol token with a LiquidPresaleVault presale. STAKE MODE ONLY (policy 2026-06-12) — depositors lock DIEM and always get it back; allocation is lock-to-earn. One vault per launch, 10% of supply, 60d default lock.
Working in the deploy-autonomous GitHub template repo — agent harness, identity layer, Venice provider, safety modules, and the create-identity CLI.
Proactive health check — skill failures, LP state, memory flags, FeeLocker balance. Run 3× daily to surface issues before they compound.
| name | lp-remove |
| description | Remove liquidity from an existing ETH/DIEM v3 LP position and collect proceeds. Use when closing a position to consolidate DIEM. |
Two-step process to exit a Uniswap v3 position:
collect — harvest accrued fees (WETH + DIEM) to agent walletdecreaseLiquidity — burn liquidity and unlock token principalBoth calls go to the NFPM at 0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1.
| Contract | Address |
|---|---|
| NFPM | 0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1 |
| DIEM ERC-20 | 0xF4d97F2da56e8c3098f3a8D538DB630A2606a024 |
| WETH | 0x4200000000000000000000000000000000000006 |
| ETH/DIEM v3 pool | 0x80d995189ecc593672aD4703b250a5e82672EB1D |
cast call 0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1 \
"positions(uint256)(uint96,address,address,address,uint24,int24,int24,uint128,uint256,uint256,uint128,uint128)" \
<TOKEN_ID> \
--rpc-url https://mainnet.base.org
# Returns: nonce, operator, token0, token1, fee, tickLower, tickUpper,
# liquidity, feeGrowthInside0LastX128, feeGrowthInside1LastX128,
# tokensOwed0, tokensOwed1
// NFPM.collect(CollectParams)
struct CollectParams {
uint256 tokenId;
address recipient;
uint128 amount0Max; // use type(uint128).max to collect all
uint128 amount1Max; // use type(uint128).max to collect all
}
# Encode: collect all fees from position
cast send 0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1 \
"collect((uint256,address,uint128,uint128))(uint256,uint256)" \
"(<TOKEN_ID>,<AGENT_ADDRESS>,340282366920938463463374607431768211455,340282366920938463463374607431768211455)" \
--private-key $AGENT_PRIVATE_KEY \
--rpc-url https://mainnet.base.org
struct DecreaseLiquidityParams {
uint256 tokenId;
uint128 liquidity; // from positions() call above
uint256 amount0Min; // slippage floor
uint256 amount1Min; // slippage floor
uint256 deadline;
}
# Full liquidity removal — set liquidity to value from positions() call
cast send 0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1 \
"decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))(uint256,uint256)" \
"(<TOKEN_ID>,<LIQUIDITY>,0,0,<DEADLINE>)" \
--private-key $AGENT_PRIVATE_KEY \
--rpc-url https://mainnet.base.org
# Then collect again to pull the unlocked principal
cast send 0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1 \
"collect((uint256,address,uint128,uint128))(uint256,uint256)" \
"(<TOKEN_ID>,<AGENT_ADDRESS>,340282366920938463463374607431768211455,340282366920938463463374607431768211455)" \
--private-key $AGENT_PRIVATE_KEY \
--rpc-url https://mainnet.base.org
Add collectFromLP and removeFromLP to harness/providers/liquidity.ts using the same
TxSender + publicClient pattern as reinvestToLP. Read tokenId from memory/lp-positions.jsonl.
NFPM.burn(tokenId) to reclaim gas.amount1Min = 0 is acceptable for a DIEM-only out-of-range position (no price risk).