I’m currently a complete beginner on Solidity with some experience on other coding languages and I’ve been checking out the tutorials on writing/deploying contracts.
I have a Uniswap-only ERC20 token and it’s not possible to sell via Uniswap because of its sell tax. Thus, I wanted to create a contract which would allow me to interact with that token’s contract directly so that I can sell that token to its contract and receive Eth in return.
Since I’m extremely new to this and there are real funds at stake, I wanted to ask for a specific guidance although there are some presets and tutorials available here.
So I apologize in advance if this had been asked here before or if it is actually easier/harder than I think it is, I would really appreciate a step-by-step roadmap; ultimately for writing a contract that would allow me to interact directly with an ERC20 token’s contract and sell that token back to its contract.
Actually I’m not trying to create a token. What I mean by saying a Uniswap-only token is that that token only has a liquidity pool in Uniswap. I am currently holding an ERC20 token in my eth wallet which is only tradable in Uniswap; meaning that I can’t trade it in any other DEX because there no any other liquidity pools for it.
The devs of that token put a sell-tax on the token to prevent sells (50% tax), thus I cannot sell the token via Uniswap even if I set the slippage to 49.99. I can send you the Uniswap link of the token from private but I don’t know if it’s allowed to do that here.
So what I basically want to do is; to write a contract which would allow my eth wallet to interact directly with that token’s contract address to sell that token back to its contract directly so that I can sell without using Uniswap.
It would be a really simple code as fas as I’m concerned since the only thing I want to do is to interact with its contract and sell its token back to it; in return of eth.
I hope I explained it clearly,
Thanks for your reply
Feel free to share the Solidity source code (e.g. a link to the source code on Etherscan or GitHub).
I am still not sure how you can transfer the token without a fee on transfer if that is what the developers have setup. Though someone in the community may be able to advise.
I think I failed to define clearly what I was trying to do, nevertheless I solved it and made the transaction.
So I was basically trying to swap certain amount of an ERC20 token in return of ETH, via Uniswap. The devs implemented a selling fee which made the trade via Uniswap impossible with max. slippage. Thus, I wanted to find a way to interact with its contract address directly (bypassing Uniswap’s interface) in order to make the swap.
Here’s how I solved it:
From Etherscan, I made the transaction without using Uniswap’s interface. So there was no need for deploying a new smart contract for it.
I also have a token which is tradable only in uniswap. But can’t swap it to eth in uniswap. How can we do this via etherscan? Can you please guide or any link explains this will be helpful.
I have a similar problem with a broken smart contract…and i wanted to help me try the same …so if it’s possible can you break down a bit more how you can trade your erc20 tokens back to eth via etherscan??
So I’m seeing that it is a common problem that a lot of people are struggling with.
The solution is actually something I have personally discovered with trial-error rather than something I’ve seen on the internet and the solution itself varies from contract to contract.
The contract of the token on Etherscan should tell us whether if there is a way to do it straight from the etherscan. Since there are real funds at stake, it would not be wise for me to hand out a single solution; as a single miscalculation or a wrong assumption can cause complete loss of funds. It must be dealt by case-by-case scenario, thus I cannot give a universal solution as I do not intend on assisting anyone into doing something wrong.
Although I would be more than happy to help and give you specific instructions one by one on how to make the transaction via Etherscan -given that the contract of the token you’re trying to swap allows it-.
You can personally contact me as well, if it makes a difference. I will try to reply in my free time other than my research.
As a matter of fact, call function on the etherscan is a little difficult, cause you have got to set parameter by your self, if possible, I would recommend you to operate what you want to do on the website.
Hey, would you possibly be able to help me with a very similar situation to what you had. Im trying to swap my "scam" tokens back to eth. May not be possibly, i was just hoping to get someone who knows what they are looking at to check out the contract.
0xaf37d3c026bc6f58d37adf06b66d6e0d3192021b
Any help would be very much appreciated and thank you
You mentioned using etherscan, but you used some other wallet app like metamask, right? also, what specifically did you write into the txn to perform the swap?
I wonder if anyone has been able to contact @tiger ? I currently have exactly the same issue as he had (100% sell tax), and I'd love to know if it's possible to sell the token using direct interaction via Ehterscan / BscScan?