Unable to add liquidity for some tokens, unable to estimate gas error
Open
Nobody has claimed this yet.
bug
p1
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Bug Description
Unable to add liquidity for some tokens, unable to estimate gas error
token address: 0x1faa0c671b6336527efd167f7d1c6fc1b8a05d1a
Steps to Reproduce
- Add liquidity for test token on rinkeby (v3), I can send some to a dev to reproduce
Expected Behavior
Add liquidity works
Additional Context
Deobfuscated stack trace:
Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"code":-32603,"message":"execution reverted: M0","data":{"originalError":{"code":3,"data":"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000024d30000000000000000000000000000000000000000000000000000000000000","message":"execution reverted: M0"}}}, method="estimateGas", transaction={"from":"0xcB94D511e7CB16dED7C6168a1626e2cc8A198660","to":"0xC36442b4a4522E871399CD717aBDD847Ab11FE88","value":{"type":"BigNumber","hex":"0x011b002037d797a5"},"data":"0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000008413ead5620000000000000000000000001faa0c671b6336527efd167f7d1c6fc1b8a05d1a000000000000000000000000c778417e063141139fce010982780140aa0cd5ab000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000003e7ffd4aefcd2cf2c91f36b6a74000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000164883164560000000000000000000000001faa0c671b6336527efd167f7d1c6fc1b8a05d1a000000000000000000000000c778417e063141139fce010982780140aa0cd5ab000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000214d00000000000000000000000000000000000000000000000000000000000022470000000000000000000000000000000000000000000000000000000174876e800000000000000000000000000000000000000000000000000011b002037d797a500000000000000000000000000000000000000000000000000000016bc3aa02b00000000000000000000000000000000000000000000000001129997b9f363fa000000000000000000000000cb94d511e7cb16ded7c6168a1626e2cc8a19866000000000000000000000000000000000000000000000000000000000609f0aaa00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.1.1)
at Logger.makeError (index.ts:205)
at Logger.throwError (index.ts:217)
at checkError (json-rpc-provider.ts:76)
at WorkaroundWeb3Provider.<anonymous> (json-rpc-provider.ts:508)
at Generator.throw (<anonymous>)
at rejected (json-rpc-provider.ts:2)
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Rinkeby v3 add-liquidity flow with token address 0x1faa0c671b6336527efd167f7d1c6fc1b8a05d1a. Inspect the supplied estimateGas transaction and its M0 revert to determine why the liquidity call fails. Done means the affected token can add liquidity successfully without the gas-estimation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- 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