Skip to main content

Exiting a Uniswap V3 (Oku) liquidity position

The Oku frontend is offline. Use direct contract calls on Cornscan to remove liquidity, collect fees, and burn the position.

Uniswap V3 on Corn was hosted via Oku's UI. Oku has discontinued frontend support for the chain, so to exit a position you call the NonfungiblePositionManager (NFPM) contract directly on Cornscan.

You can see your active LP positions on the Earn page of the Corn Chain App to confirm what you hold before you start.

The flow is three transactions:

  1. decreaseLiquidity — pull all the liquidity out of your position.

  2. collect — sweep the underlying tokens (and any fees earned) to your wallet.

  3. burn — burn the now-empty position NFT (optional — saves a tiny bit of clutter).

NFPM contract

Prerequisites

  • Your wallet connected to Corn — see Connecting your wallet to Corn.

  • A small amount of BTCN for gas (3 transactions × small).

  • Your token ID — the NFT ID of your liquidity position. Find it in your wallet (NFTs section) or on Cornscan: search your address and look at NFT holdings.

Step 1 — Read your position

On the NFPM contract, click ContractRead Contract:

  1. Find the positions(uint256 tokenId) function.

  2. Enter your token ID.

  3. Click Query. The result includes token0, token1, liquidity, tokensOwed0, tokensOwed1.

Note your liquidity value — you'll use it in Step 2.

Step 2 — Call decreaseLiquidity

On the Write Contract tab, find decreaseLiquidity. Fill in the tuple:

Field

Value

tokenId

Your token ID

liquidity

The full liquidity value you read in Step 1 (this withdraws everything)

amount0Min

0 (accept any output — you can sanity-check after)

amount1Min

0

deadline

A future Unix timestamp, e.g. 1750000000 (any value within ~1 year is fine)

Click Write and confirm. The position's liquidity drops to zero, but the tokens are now "owed" to you, not yet in your wallet.

Step 3 — Call collect

Still on Write Contract, find collect. Fill in:

Field

Value

tokenId

Your token ID

recipient

Your wallet address

amount0Max

A very large number, e.g. 340282366920938463463374607431768211455 (max uint128) — collects everything

amount1Max

Same

Click Write and confirm. Both underlying tokens (plus any fees earned) land in your wallet.

Step 4 (optional) — Burn

If you want to clean up, call burn(tokenId). This destroys the now-empty NFT. Skip this if you don't care.

Step 5 — Bridge

Both underlying tokens are now in your wallet. Bridge each via the Asset → Bridge index. Common pairs:

Help

If decreaseLiquidity reverts:

  • Make sure you're calling it on the NFPM contract address above (0x743E03cc...).

  • Make sure your wallet is the owner of the token ID (read ownerOf(tokenId) on the NFPM).

  • Make sure liquidity matches what you read in Step 1 exactly.

For anything else, ping us in the Corn Discord with your wallet address, token ID, and the failing transaction hash.

Did this answer your question?