1 ETH bounty for the person who gives me the deciding clue to solve this riddle.

The situation is as follows:

I deployed a ERC-20-Token, added liquidity to Uniswap v2, then called functions to change the max transaction amount and max wallet amount and renounced ownership of the contract thereafter. As I quickly noticed, I made a massive mistake - I forgot to add the decimals for the uint256 inputs for the max transaction/max wallet, which now has resulted in the maximum transaction and wallet amount becoming 1 token (actually I tried this out and sending 1 doesn't work, but sending 0.999999... works). Obviously, the contract can't be changed anymore and the project is basically paralyzed.

Now that I want to relaunch this project with a proper contract, obviously I somehow need to get my hands on that liquidity. Casually removing liquidity isn't an option, because there are hundreds of millions of tokens in the liquidity pool - the max tx/wallet is only 1 token.

I now came to the idea to migrate the LP to Uniswap v3. There, I can select a price range for the token - if the min price is significantly higher than the current price, in theory, I could get refunded the ETH that is into the LP, leaving all of the other tokens in the LP. I can approve the migration function, but ultimately it doesn't let me execute it - I assume a problem could be here, that usually when migrating to v3 you get refunded at least a small portion of both tokens because of rounding issues - although through the faulty design of my contract I can only receive an amount of token that is less than 1. I already split up my LP token so that my main LP holding contains a round number of the token so maybe there is no refund of the token needed and I get only a refund of one side of the LP - but I still can't press the button to execute the function.

Is there any way to get the ETH of the liquidity pool back, maybe through migrating to v3 using a specific way / any other options?

I am thankful for any help.

The deciding advisor receives a bounty of 1 ETH!

  • Wow, what an interesting problem and what an unfortunate situation.
    – kfx
    Commented Aug 4, 2022 at 11:13
  • I'm sorry for that, but I don't think V3 migrator will help you. I think to get the tokens in a transferable state, burn function of the V2 pair must be called first, and this function already tries to do some transfers on its own.
    – kfx
    Commented Aug 4, 2022 at 11:13
  • Hey, thank you for your answer! Don't you think we could do a trick with the v3 migrator? Setting it up so that no token gets transferred, but the ETH gets refunded (because out of price range)? I would appreciate if you could forward my post to any of your friends, in case they are developers too. The bounty is still live! Thank you. Commented Aug 4, 2022 at 12:51
  • @lifelonglearning Did you ever get the liquidity out?
    – CathalMF
    Commented Apr 29 at 9:11

1 Answer 1


Unfortunately there is no way to recover those tokens

there is a requirement in the burn function of v2 that is sending the tokens burnt in the liquidity removal

so the contract does the math on the tokens in the pool and tries to send those tokens, if for some reason it can't send the Whole amount of tokens from the liquidity burnt it will fail. Sorry but I'm very familiar with this have seen it more than once, as I'm a recovery expert within the uniswap discord. Sorry for the bad news and wish you the best in your future crypto endeavors

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.