If we even do not know the smart contract source code or logic, we still have a knowledge based on the transaction diagram above, which is built completely from the on-chain data:
#Garagesale token update#
Update balances and generate event on transfer tokens from system // (zero) address to token buyer updateValueAtNow(balances, previousBalanceTo + _amount) Uint256 tokensGenerated = _toFund.mul(exchangeRate) // create ( mint ) new tokensĪssert(SNT.generateTokens(_th, tokensGenerated)) // how tokens are generatedįunction generateTokens(address _owner, uint _amount amount of ETH transfered ( contained in _toFund variable ) Though the smart contract for token sale can be quite complex,, the easy lines of code ensures this process: // calculate how much token to give, based on exchange rate and
![garagesale token garagesale token](https://www.coincommunity.com/forum/uploaded/Lucky%20Cuss/20181207_1863CWTrev.jpg)
The tokens are ‘minted’, similar to the cryptocurrency mining process, from the system (zero) address in the system. StatusCrowdsale smart contract doing here all the job of selling token to the buyer, exchanging 7 ETH to 70K SNT tokens. Instead, there is a smart contract, provisioning the token sales.The simple example of how it actually works is shown on the diagram : So how it actually happens? In a decentralized world, there is no central authority, which sells tokens and ensures the correctness of conditions. Successful ICO creates a big boost for the project, as it supplies the initial investment, and simultaneously generates the audience and community of supporters around the project.Īlso Read: Do not be Fooled by Crypto Quiz Games! Basic ICO Mechanics Sometimes the cases mixed, with some tokens are sold and another part is distributed. This investigation mostly concern the first case. An interesting scenario is when the token gets the value straight from the fact that some community owns it. Distribute token to people, that most need it, and may give it some value by generating demand and supply.This is basically an initial exchange between your brand new token and some existing asset, typically existing cryptocurrency
![garagesale token garagesale token](http://popvinyls.com/wp-content/uploads/2021/02/IMG_092031.jpg)
#Garagesale token how to#
When you issue your own token on blockchain, or plan to create own crypto coin, a big question appears, of how to distribute it first.