Uniswap / Uniswap/interface

Can't remove liquidity: error code=UNPREDICTABLE_GAS_LIMIT

Open
#2,438 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to remove liquidity from this pool https://app.uniswap.org/#/remove/131404

After I click "remove" I expect Metamask window to appear, but instead nothing happens and I get this error in the console (every time I click "remove")

Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"code":-32603,"message":"execution reverted: TF","data":{"originalError":{"code":3,"data":"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000025446000000000000000000000000000000000000000000000000000000000000","message":"execution reverted: TF"}}}, method="estimateGas", transaction={"from":"0xcf04f1eB7D9024c519CFb968e15bA01FDe7DBADC","to":"0xC36442b4a4522E871399CD717aBDD847Ab11FE88","value":{"type":"BigNumber","hex":"0x00"},"data":"0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000a40c49ccbe000000000000000000000000000000000000000000000000000000000002014c0000000000000000000000000000000000000000000000233403ea513badcabc000000000000000000000000000000000000000000000736e48cb4738528d3e8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000614d9393000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f7865000000000000000000000000000000000000000000000000000000000002014c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cf04f1eb7d9024c519cfb968e15ba01fde7dbadc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb0000000000000000000000009c38688e5acb9ed6049c8502650db5ac8ef96465000000000000000000000000000000000000000000000736e48cb4738528d3e8000000000000000000000000cf04f1eb7d9024c519cfb968e15ba01fde7dbadc00000000000000000000000000000000000000000000000000000000","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.4.5)
    value index.ts:225
    value index.ts:237
    A json-rpc-provider.ts:80
    n json-rpc-provider.ts:555
    c runtime.js:63
    _invoke runtime.js:294
    x runtime.js:119
    u 35.a4ea1615.chunk.js:2
    promise callback*f 35.a4ea1615.chunk.js:2
    x 35.a4ea1615.chunk.js:2
    x 35.a4ea1615.chunk.js:2
    value 35.a4ea1615.chunk.js:2
    t base-provider.ts:1304
    c runtime.js:63
    _invoke runtime.js:294
    x runtime.js:119
    a 35.a4ea1615.chunk.js:2
    promise callback*f 35.a4ea1615.chunk.js:2
    a 35.a4ea1615.chunk.js:2
    promise callback*f 35.a4ea1615.chunk.js:2
    A 35.a4ea1615.chunk.js:2
    A 35.a4ea1615.chunk.js:2
    value 35.a4ea1615.chunk.js:2
    t index.ts:111
    c runtime.js:63
    _invoke runtime.js:294
    x runtime.js:119
    a 35.a4ea1615.chunk.js:2
    promise callback*f 35.a4ea1615.chunk.js:2
    d 35.a4ea1615.chunk.js:2
    d 35.a4ea1615.chunk.js:2
    value 35.a4ea1615.chunk.js:2
    e V3.tsx:139
    c runtime.js:63
    _invoke runtime.js:294
    x runtime.js:119
    Babel 4
    React 9
react_devtools_backend.js:4049:25
    overrideMethod react_devtools_backend.js:4049
    e V3.tsx:168
    (Async: promise callback)
    e V3.tsx:166
    c runtime.js:63
    _invoke runtime.js:294
    x runtime.js:119
    Babel 4
    React 11
    unstable_runWithPriority scheduler.production.min.js:18
    React 14
    unstable_runWithPriority scheduler.production.min.js:18
    React 5

Screenshot from 2021-09-24 13-30-34
Screenshot from 2021-09-24 13-30-51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the remove-liquidity flow for pool 131404 and trace the failure through V3.tsx, where the reported stack trace reaches the gas-estimation error. Compare the transaction details and reverted TF response with the expected removal flow. Done means the Remove action either opens MetaMask for a valid transaction or presents an actionable error instead of silently failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.