Ethereum Smart Contracts – short summary and tips
Following numerous questions that we receive regarding smart contracts and custom tokens, I decided to share a short summary of useful information and tips regarding smart contracts based on Ethereum network. I assume basic understanding of blockchain princeples (good explanation can be found here).
Definitions that you should know
Smart contract is a mechanism involving digital assets and two or more parties, where some or all of the parties put assets in and assets are automatically redistributed among those parties according to a formula based on certain data that is not known at the time the contract is initiated (Ethereum blog).
ERC-20 – standard for creating tokens in Ethereum network, a common set of rules that Ethereum token must implement, an interface. Implementing the standard ensures interoperability with Ethereum wallets (Example of ERC-20 token).
ERC-231 proposes improvement over ERC-20, aim to fix some of its usage issues (for example, sending tokens to addresses that don’t support token balance, resulting in unrecoverable loss of tokens). It’s backwards compatible with ERC-20, but not widely adopted.
MyEherWallet – is a Swiss-Army-knife for dealing with ETH wallets.Allows you to generate wallets to handle ERC-20 tokens.
EtherScan – allows you to explore and search the Ethereum blockchain for transactions, addresses, tokens, prices and other network activities.
Any Ethereum account address (wallet) can accept any ERC20 token. That doesn’t mean that any Ethereum wallet client will be able to display information about such balance or perform transactions with such token. I mean, you can get stuck with a web wallet that doesn’t support downloading your private key and doesn’t support ERC20 token transactions, so you can get stuck. As long as you control your private key directly, you will be able to find a wallet client that will allow you to send funds from your ERC20 token balance to other addresses.
A smart contract can be implemented that pays out some amount of ERC20 tokens in exchange for ETH according to a predefined set of rules.
There ERC712 draft standard for non-fungible tokens (tokens that represent unique items such as rights, collectibles or responsibilities). Such token could be useful to represent stake at unique container.
Here‘s a comprehensive list of ERC20 tokens, with some market data
If you want to actually make your hands dirty, here’s brief simplistic guide for custom ERC20 token creation.
I hope it will help you to make your first steps in the smart contract world.