0

I did a lot of research about this, but still don't understand some concepts around token price and proof-of-work.

First of all, imagine I've created a token, which is ERC20 or 223 standard smart contract, what is the best initial amount can I give it, and does it determines the price? is there any formula that can help me to understand, exactly what determines price or if it's in correlation with initial supply (and it is of course but how), how can I manage to predict approximately what will cost one my token in Euros for example?

Second, is ERC20/223 automatically PoW standard? Or I need to change something?

Third, can I modify the code after deploying on mainnet?

And for the last one, if total supply goes down and there is nothing left to mine, is minting the only solution?

2 Answers 2

1
  • Token price is determined by supply and demand from the market.

  • There's no such thing as an ideal supply. Every project is different.

  • ERC20/ERC223 has nothing to do with mining they are about utility token functionality. There are several proposal like EIP 919 but it is still at draft stage after two years.

  • No, you can't modify a contract bytecode once it was deployed (*). You can use a Proxy Pattern so for the user the contract address will be the same but you can change the implementation.

(*) With the CREATE2 opcode it should be possible to remove a contract a re-deploy with a different bytecode.

2
  • Thanks for the clear explanation. Even tho it's at draft stage, can I still deploy it? as I saw, KIWI token is using that standard. And is there any other solution? Kiwi is itself fork of 0xBitcoin, which is bitcoin implemented in solidity
    – Kaneda
    Nov 24, 2020 at 14:47
  • @Kaneda There are already deployed tokens with mining functionality so you should be fine deploying your token. For EIP 919 it seems there's not enough interest from the community to push for a final version.
    – Ismael
    Nov 24, 2020 at 20:43
1

Wow, okay, almost a year passed after I asked this question. During this period I was learning smart contract development and honestly, I'm proud to answer my past self.

  1. Supply and price

Determining price and adjusting supply in respect of your projections is very straightforward:

Basically (for Uniswap v2 and Pancakeswap V1) price is determined by x*y=k.

To explain what these variables represent, I should first explain what is a decentralized exchange and AMM.

CEX or centralized exchange is a traditional way of trading crypto assets, their order book is used to let people trade their assets, propose their prices, and reach the consensus for optimal one with other traders. Sounds complex but just think this way, it is how we exchange daily assets like money or commodities with each other, Alice sells an apple for 10 bucks, while Bob wants that apple but is willing to pay 8 bucks, their consensus price might be 9 bucks, and trade was successful, but the problem arises, what if Bob doesn't want the apple for 9 bucks, or what if there is no Bob at all, Alice has to wait for someone willing to buy her apple.

This problem was resolved by creating a DEX, a decentralized exchange where an automated market maker is used, instead of an order book.

in the case of AMM, Bob wants to buy an apple, he can go and buy it from a special apple pool created by Alice where Alice put for example 1 Apple and 1 USD, meaning 1 Apple will cost 1 USD But the apple pool is fully automated and secured, so Bob doesn't have to wait for Alice to show up with apples, he can use the automatic pool and price is already determined by how much USD is in the pool with how much Apples.

To wrap up, determining the price is possible with the formula given above where x is one asset, y is another asset, and `k is constant.

If someone buys token x with y, then the supply of token x decreases as the supply of y increases causing the price of token x to increase. Then vice-versa.

So, based on that, to determine the good supply and approx price, we can use the following formula Price = (x * x price in $) / amount of y

Suppose x (the first asset, that will determine price, should be the existing one and recommended to use native coins, for example, ETH for ethereum or BNB for binance smart chain, but you can go for any other coin that is being already traded) is 100 BNB, and we have 1mil supply of our token:

Price = (100 * current BNB price 400) / 1000000 Price = 0.04$

So, 1 your token will cost 0.04$ or 0.00012BNB in the current BNB price.

  1. Mining ERC20

As I remember, here I thought that ERC20 was just like other coins and it had default POW consensus, transactions, etc.

So to respond to me, no ERC20 is a standard for a token that lives in an already made blockchain, and ERC20 isn't responsible for transactions.

All thought, there is an implementation of mining in ERC20 called 0xbitcoin, but again, it is just simulating POW consensus, mining is not needed in tokens.

  1. Changing after deployment

No, the main idea of smart contracts is that it's secured and non-mutable by third parties. But there are ways to do so, implementing proxies for example, or making separated contracts that are working together but in case of malfunction, you can replace the broken contract and link it to the main contract with premade function. But this is not a recommended way to go. It would be hard for people to trust you when you have such tremendous power. And it kinda goes against decentralization as well.

To make a conclusion, I'm happy to answer my dumb questions and hope in future i will make more and more progress in this field

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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