If you have ever used a decentralized exchange (DEX), there’s a good chance you’ve seen ‘WETH’ as one of the popular cryptocurrencies you can swap. WETH stands for Wrapped Ether. Ether (ETH) is the native cryptocurrency to the Ethereum blockchain, which is the oldest and most popular blockchain with general purpose smart contracts. In this article we go into more detail about what exactly WETH is, and why there is a need for it.
What is Wrapped Ether (WETH)?
WETH is an ERC-20 token on Ethereum that represents 1 Ether (ETH). ETH is used to pay for transactions on the Ethereum blockchain. For example, swapping between cryptoassets on an Ethereum-based DEX will cost some small amount of ETH. The two main differences between WETH and ETH is that WETH cannot be used to pay for transactions and ETH is not an ERC-20 token. The next section will cover why there is a need to make an ERC-20 compatible version of ETH.
What is the need for Wrapped Ether (WETH)?
All of decentralized finance (DeFi) is built upon smart contracts, which can be thought of as decentralized programs. Those smart contracts are designed to handle ERC-20 tokens. ERC-20 is a token standard, a kind of blueprint that is universally recognized not only on the Ethereum blockchain, but many other compatible blockchains such as Avalanche and Polygon. The ERC-20 standard allows the efficient building of software, for example getting rid of custom code that would be needed to handle each new token. Since ETH is the Ethereum native currency, and because it preceded the development of the ERC-20 standard, it isn’t ERC-20 compatible. This means custom software would have to be written on every DeFi decentralized application (DApp) in order to accept ETH. Instead, a smart contract was written that envelopes ETH in an ERC-20 wrapper so that any DApp with ERC-20 support can effectively support ETH.
How is WETH created?
The technical details of how WETH is created are quite simple. Anyone can deposit ETH into the WETH smart contract, the smart contract then creates and returns the same amount of WETH. This process also works in reverse. Deposit WETH into the contract, and it will destroy the WETH and return an equal amount of ETH. No one controls the smart contract, and the smart contract ensures any WETH created backed by an equivalent amount of ETH. This makes WETH almost indistinguishable from ETH in terms of market price.