0

Good morning everyone, I’m starting smart contract dev and I have a lot of questions.

But the biggest question I have is I have one idea in head and I don’t know if it’s possible.

To explain:

You have tokens A in your wallet, this token have 10.000 total supply and 10.000$ liquidity (also price of the token is 1$).

Is it possible to make a function who swap the tokens into usdt and burn the tokens swapped.

I mean you have 1.000 tokens A in your wallet, you take your 1.000$ in usdt and burn the 1.000 A tokens.

That mean you have taked your cash, you have burn the tokens, also now total supply is 9.000 tokens and 9.000$ liquidity, also price of token is the same (1$).

Is it possible to do a function like that?

Sorry for my bad English 😅

1 Answer 1

0

There's no problem in this as long as your token is tradeable on one of the decentralized exchanges.

To do this, alongside of some general knowledge about solidity you'll need learn how to use ERC20 token standard here and interface with a decentralized exchange for example here

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.