Ethereum based stablecoins and ERC-20
Ethereum is the largest, most valuable (by market cap), fully decentralized blockchain with smart contract capabilities. It is the go to platform for smart contracts.
Smart contracts are small chunks of software code deployed to the Ethereum blockchain, running on the Ethereum Virtual Machine (EVM). That’s where they live, and that’s where they run. Anyone can interact with a smart contract, and do so on a pay-as-you-go model. It’s an open, public, and unstoppable network.
Now, writing smart contracts is one thing. Writing smart contracts that act as tokens is another. And this is where standards enter the picture. Smart contract standards define how you interact with the contract, and what you can expect to happen when you do so. It tells you for example that if you want to transfer tokens from your account ID to another, you need to call a function on the smart contract called “transfer”, and so on.
The standard for defining a fungible token on the Ethereum blockchain is called ERC-20. The mechanism for ensuring a stablecoin is pegged to some underlying asset is orthogonal to the ERC-20 standard, as the standard only concerns itself with the mechanisms of holding and transferring a fungible token. Still, all stablecoins that want widespread usage will need to follow the ERC-20 standard.
On the Ethereum blockchain there is only one native token, ETH. This token, or coin, is given to miners on the PoW ETH 1 network, and validators on the PoS ETH 2 network, as payment for their services. Whenever a transaction is executed, ETH is required to pay for this transaction. As a native token, it is part of the core protocol. The ERC-20 standard is not part of the core protocol, but run on-top of Ethereum, and was defined in 2015.
Following the ERC-20 standard is important as it enables integration. Other smart contracts understand how to interact with any token that follow the ERC-20 interface. The same goes for wallets, making it possible for users to easily hold, transfer and spend any token through user friendly interfaces. Having a widespread standard enables others to create their own tokens with widespread interoperability. This enabled the ICO boom of 2017, but it also promoted fiat pegged stablecoins as it became useful for trades and speculators to have an uncorrelated asset.
The usefulness of the standard can also be seen with ETH, the native token, when it itself is wrapped in an ERC-20. This to allow the native token to participate in smart contracts more broadly, running on its own blockchain. We could argue that the wrapping of ETH in an ERC-20 is a good example of a stablecoin which isn’t pegged to a fiat currency, but where the ERC-20 ETH stablecoin is pegged to ETH. This is a pure on-chain example of programmable money. By wrapping the native ETH cryptocurrency in an ERC-20 smart contract, additional features and conditions are assigned to that wrapped ETH, enabling this incarnation to perform things the original unwrapped coin can’t do.