interface icon indicating copy to clipboard operation
interface copied to clipboard

Error when trying to collect fees or withdraw liquidity from an out-of-range USDC/ETH position

Open BOR4 opened this issue 5 years ago • 10 comments

Bug Description

revert: Insufficient WETH9

User address: 0x3fa80d0ac772627ab4036440985f8457bd7aa0bf Failing call (collect fees only, as that seems simpler than sweeping liquidity):

{ from: "0x3fa80d0ac772627ab4036440985f8457bd7aa0bf", to: "0xc36442b4a4522e871399cd717abdd847ab11fe88", value: "0x0", data: "0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000084fc6f78650000000000000000000000000000000000000000000000000000000000001fa9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c00000000000000000000000000000000000000000000000000103acbaba205ba0000000000000000000000003fa80d0ac772627ab4036440985f8457bd7aa0bf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000164f6cd0000000000000000000000003fa80d0ac772627ab4036440985f8457bd7aa0bf00000000000000000000000000000000000000000000000000000000" }

Additional Context Reported by @MicahZoltu in Discord

BOR4 avatar May 12 '21 09:05 BOR4

Reproduction with curl:

curl --data '{"jsonrpc":"2.0","id":2,"method":"eth_call","params":[{ from: "0x3fa80d0ac772627ab4036440985f8457bd7aa0bf", to: "0xc36442b4a4522e871399cd717abdd847ab11fe88", value: "0x0", data: "0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000084fc6f78650000000000000000000000000000000000000000000000000000000000001fa9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c00000000000000000000000000000000000000000000000000103acbaba205ba0000000000000000000000003fa80d0ac772627ab4036440985f8457bd7aa0bf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000164f6cd0000000000000000000000003fa80d0ac772627ab4036440985f8457bd7aa0bf00000000000000000000000000000000000000000000000000000000" }]}' -H "Content-Type: application/json" http://localhost:8545

MicahZoltu avatar May 12 '21 09:05 MicahZoltu

I encountered the same problem when trying to claim fees right after increasing liquidity. My position is in range. Maybe it'll help narrow it down.

banteg avatar May 12 '21 10:05 banteg

Experiencing the same issue - only impacting one of my position NFTs that is out-of-range, the in-range positions I can still generate withdrawal transactions from. I believe the inputs to the function call are bad - receiving a INVALID_ARGUMENT invalid BigNumber exception when trying to pull liquidity through a variety of wallets using the UI.

siromivel avatar May 12 '21 12:05 siromivel

same issue, can't collect fees.

also increased liquidity.

housemobile avatar May 12 '21 13:05 housemobile

Same issue. My position is out-of-range and I increased liquidity yesterday. I wasn't seeing this immediately after increasing liquidity tho.

There is a discrepancy between my balances shown on zapper.fi and the uniswap interface. Someone else on discord attributed the issue to this (the txn has bad inputs).

g-r-a-n-t avatar May 12 '21 14:05 g-r-a-n-t

A way to claim manually using brownie:

$ brownie console --network mainnet
user = accounts.load('user')
>>> nft = 12345
>>> position_manager = Contract('0xC36442b4a4522E871399CD717aBDD847Ab11FE88')
>>> position_manager.collect((nft, user, 2**128-1, 2**128-1), {'from': user})

banteg avatar May 12 '21 15:05 banteg

sorry about this, i know why this is happening, will be issuing a fix shortly!

NoahZinsmeister avatar May 12 '21 15:05 NoahZinsmeister

should be resolved via https://github.com/Uniswap/uniswap-interface/pull/1533! the preview link in that PR will work if you need the fix urgently, otherwise we'll run a release soon to get this live

NoahZinsmeister avatar May 12 '21 16:05 NoahZinsmeister

prompt works @NoahZinsmeister! I lost some fees tho :smile:

g-r-a-n-t avatar May 12 '21 16:05 g-r-a-n-t

I can't wait - in the same boat with everyone else here +Thanks

CRYPTO-GENIK avatar May 12 '21 17:05 CRYPTO-GENIK