start of the execution of the transaction, and is refunded at the end for any unused gas. If at any point the transaction does not have enough gas to perform the next operation, the transaction is reverted but the sender is still only refunded for the unused gas. In user interfaces, gas prices are typically denominated in gigawei (gwei), a subunit of ETH equal to 10−9 ETH. This fee mechanism is designed to mitigate transaction spam, prevent infinite loops during contract execution, and provide for a market-based allocation of network resources. Applications The EVM's instruction set is Turing-complete. Popular uses of Ethereum have included the creation of fungible (ERC-20) and non-fungible (ERC-721) tokens with a variety of properties, crowdfunding (e.g. initial coin offerings), decentralized finance, decentralized exchanges, decentralized autonomous organizations (DAOs), games, prediction markets, and gambling. Contract source code Ethereum's smart contracts are written in high-level programming languages and then compiled down to EVM bytecode and deployed to the Ethereum blockchain. They can be written in Solidity (a language library with similarities to C and JavaScript), Serpent (similar to Python, but deprecated), Yul (an intermediate language that can compile to various different backends—EVM 1.0, EVM 1.5, and eWASM are planned), LLL (a low-level Lisp-like language), and Mutan (Go-based, but deprecated). There was also a research-oriented language under development called Vyper (a strongly-typed Python-derived decidable language). Source code and compiler information are usually published along with the launch of the contract so that users can see the code and verify that it compiles to the bytecode that is on-chain. One issue related to using smart contracts on a public blockchain is that bugs, including security holes, are visible to all but cannot be fixed quickly. One example of this is the 2016 attack on The DAO, which could not be quickly stopped or reversed. ERC-20 tokens The ERC-20 (Ethereum Request-for-Comments #20) Token Standard allows for fungible tokens on the Ethereum blockchain. The standard, proposed by Fabian Vogelsteller in November 2015, implements an API for tokens within smart contracts. The standard provides functions that include the transfer of tokens from one account to another, getting the current token balance of an account, and getting the total supply of the token available on the network. Smart contracts that correctly implement ERC-20 processes are called ERC-20 Token Contracts, and they keep track of created tokens on Ethereum. Numerous cryptocurrencies have launched as ERC-20 tokens