From d14eb8f20c4c115238cdcfd25cb3f5dcb73d0164 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Fri, 7 Oct 2022 17:18:03 +0100 Subject: [PATCH 01/47] Add Learn page on Wrapped Ether (WETH) This page provides an overview of Wrapped Ether (WETH)--what it is, how it works, why it matters, and how it is different from Ether (ETH). --- src/content/wrapped-ether.md | 111 +++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 src/content/wrapped-ether.md diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md new file mode 100644 index 00000000000..b8852e02734 --- /dev/null +++ b/src/content/wrapped-ether.md @@ -0,0 +1,111 @@ +--- +title: Wrapped Ether (WETH) +description: An introduction to Wrapped Ether (WETH)—an ERC-20 compatible version of Ether (ETH). +--- + +# What Is Wrapped Ether (WETH)? {#what-is-wrapped-ether-weth} + +Wrapped Ether (WETH) is an ERC-20 token representing [Ether](/eth/), Ethereum’s native token. WETH is called a [wrapped token](https://academy.binance.com/en/articles/what-are-wrapped-tokens) because it derives value from another cryptocurrency (Ether in this case). + +Wrapped tokens are so-called because the original cryptocurrency is deposited into a wrapper—similar to a digital bank vault—before a wrapped version of the cryptocurrency is created. For example, wrapping Ether involves depositing ETH into a smart contract that creates an amount of WETH equal to the original deposit. You can also “unwrap” Ether by sending WETH to a smart contract and receiving ETH in return. + +Locking up ETH before minting new WETH tokens ensures every amount of WETH in circulation is backed by an equal amount of ETH held in reserves. This keeps the values of WETH and ETH equal, such that you can convert WETH to ETH (and vice-versa) at a 1:1 ratio. + +Wrapped Ether (WETH) and other wrapped tokens are similar to [stablecoins](/stablecoins/), as their value is pegged to the value of other assets. But while stablecoins are backed by US dollars held in off-chain reserves, WETH is collateralized by ETH issued on the Ethereum blockchain. + +## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} + +The [ERC-20 token standard](/developers/docs/standards/tokens/erc-20/) was to ensure greater interoperability and compatibility between products and services in the Ethereum ecosystem. ERC-20 defines a standard interface for [fungible](https://www.investopedia.com/terms/f/fungibility.asp) tokens on Ethereum, making it easier for developers to build [decentralized applications](/dapps/) that can interact with tokens conforming to this standard. + +But the creation of Ether predates the [introduction of ERC-20](https://eips.ethereum.org/EIPS/eip-20), meaning ETH tokens don’t conform to the ERC-20 token interface. This means users cannot exchange ETH directly for other ERC-20 tokens—not without introducing trusted third parties or complex technical processes—and limits the functionality of ETH tokens for users. + +Wrapped Ether (WETH) was [created to make Ether compatible with applications](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) implementing ERC-20 token interfaces. The WETH token is a representation of Ether that complies with the ERC-20 token standard whose value is backed by ETH locked up during the wrapping process. + +As an ERC-20 token, WETH has more versatile use-cases—unlike ETH, which is limited to making payments and [paying for computation](/developers/docs/gas/) on the Ethereum network. Some of the things you can do with WETH include: + +- Make payments in dapps + +- [Trading WETH for tokens](/defi/#swaps) + +- Use WETH as collateral to [borrow funds](/defi/#borrowing-privacy) + +- Supply liquidity to [lending platforms](/defi/#lending) + +## How does Wrapped Ether (WETH) work? {#how-does-wrapped-ether-weth-work} + +To wrap ETH, you need to send it to a [smart contract](/smart-contracts/) which mints an equivalent amount of Wrapped ETH (WETH). This smart contract acts as a custodian as it holds your ETH until you decide to unwrap WETH. You can also swap ETH for WETH directly on a [decentralized exchange](/get-eth/#dex) without needing to interact with a smart contract. + +The process of unwrapping ETH is similar: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. Whenever you redeem WETH for ETH, those tokens are [burned](https://decrypt.co/resources/what-is-a-token-burn-how-crypto-is-removed-from-circulation) (to keep the supply of WETH and ETH equal and enforces parity in prices). You can also unwrap ETH by swapping WETH for ETH using a decentralized exchange. + +## Wrapped Ether (WETH) vs Ether (ETH): What is the difference? {#weth-vs-eth-differences} + +### Control of supply, ownership, and transfer {#control-of-supply-ownership-transfer} + +#### Supply of ETH vs WETH + +As Ethereum's native token, the supply of Ether is managed at the protocol level. New units of ETH are produced as a result of the Ethereum protocol [issuing rewards](/glossary/#issuance) to validators processing transactions and adding new blocks to the chain. Also, a portion of Ether paid for gas (the [base fee](/glossary/#base-fee)) is also burned during every transaction, removing those ETH tokens from circulation. + +As a token, the supply of WETH is managed at the smart contract level. New units of WETH are issued by a token contract deployed on the Ethereum network. The contract monitors the supply of WETH and has mechanisms for increasing or reducing the amount of WETH tokens in circulation through minting and burning, respectively. + +#### Ownership of ETH vs WETH + +The Ethereum protocol handles ownership of Ether. For example, Ether balances of [Ethereum accounts](/developers/docs/accounts/) are stored as part of the blockchain's state—making it visible to any participant on the network. To send Ether, you need to sign a transaction transferring ETH to another address (after signing with your [private key](/glossary/#private-key) to prove ownership of funds) + +Conversely, the [WETH token contract](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) controls ownership and transfer of WETH tokens. For example, balances of WETH token owners are stored in the contract as [key-value pairs](https://www.techtarget.com/searchenterprisedesktop/definition/key-value-pair) where the key (an address) maps to a value (the total tokens owned by an account). To send WETH to another address, you need to sign a transaction calling the smart contract's `transfer` function with the recipient's address and amount of tokens supplied as transaction parameters. + +#### Uses of ETH vs WETH {#use-cases} + +Ether is primarily used for transferring value between users and compensating nodes providing computational resources on the network. ETH is also used to secure the Ethereum network: validators processing transactions and producing new blocks must [deposit a bond paid in ETH](/staking/) before assuming this role. If a validator acts maliciously and attempts to subvert protocol rules, their ETH deposit will be [slashed](/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/#slashing) (destroyed) as punishment. + +As an ERC-20 representation of Ether, WETH has a completely different use-case: making it easier to use ETH in dapps. Because ETH isn’t ERC-20 compatible, developers would need to create separate interfaces (one for Ether and another for ERC-20 tokens) in a smart contract. Wrapping ETH in ERC-20 standards removes this obstacle and enables developers to handle ETH and other fungible tokens within the same contract. + +With the ERC-compatible WETH, you can access more functionalities than is possible with regular ETH tokens. WETH is particularly popular for users interacting with [decentralized finance](/defi/) (DeFi) applications. At its core, DeFi is a collection of primitives that allow for trading, borrowing, and exchanging assets with others without intermediaries. + +DeFi enables even more complex use-cases, such as [yield farms](https://blockworks.co/what-is-yield-farming-what-you-need-to-know/) and [automated market makers](https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers) (AMMs) that can make investment decisions—like depositing into a lending pool or executing trades—for users. But these applications need access to your funds to work, which is why ERC-20 tokens like WETH define an `approve` function that allows you to approve other accounts to deduct a specific amount of tokens from your balance up to a predefined limit (`allowance`). + +#### Security properties of ETH vs WETH + +As an asset native to Ethereum, the security of Ether is guaranteed by the Ethereum network—no one can steal your funds unless they have access to your private keys. Even in a [51% attack](https://academy.binance.com/en/glossary/51-percent-attack), attackers cannot create forged transactions to transfer ETH from your address without approval. In other words, your ETH remains safe as long as your private keys are safe. + +Wrapped Ether (WETH) is not issued and secured by the Ethereum network, so using WETH comes with different layers of risks. The security of your WETH largely depends on the smart contract holding ETH deposits and minting WETH tokens for users. Possible attack scenarios include: + +1. An attacker could exploit the WETH contract and mint WETH tokens without depositing Ether (the equivalent of printing money out of thin air). If the attacker successfully redeems these tokens for actual ETH, other owners will be unable to access their Ether deposits. + +2. An attacker could exploit a vulnerability in the contract and drain the funds of users who deposited ETH during the wrapping process. This would leave users with valueless WETH tokens without any backing. + +3. Beyond scenarios involving malicious actors, a bug in the smart contract could prevent you from unwrapping ETH and withdrawing your locked-up assets. + +## Frequently Asked Questions (FAQs) {#frequently-asked-questions} + +**Are ETH and WETH the same?** + +No. Ether (ETH) is the native coin of the Ethereum blockchain, used as a unit of payment on the Ethereum network (including paying for transaction fees). Wrapped Ether (WETH) is an ERC-20-compatible version of ETH primarily designed to make ETH tokens compatible with applications built on the ERC-20 standard. + +**Do you pay to wrap ETH?** + +No, you don’t pay to wrap ETH into WETH, as the assets are converted at a 1:1 ratio. However, interacting with the WETH contract to wrap ETH involves sending an on-chain transaction—and this requires paying a gas fee. You'll also pay gas when unwrapping ETH through a smart contract. + +**Are WETH and ETH the same price?** + +WETH is pegged 1:1 to the price of ETH, so the value of both assets are usually equal at any time. This peg is maintained by ensuring that every unit of WETH is backed by ETH held in reserves. Forces of supply and demand also keep the prices of ETH and WETH relatively equal: +- If WETH were cheaper, more people would buy it and convert it to the more expensive ETH at a 1:1 ratio to make profit. This would drive up demand for WETH and increase the price of WETH tokens. +- If WETH is more expensive, more people would buy ETH and convert it to WETH to sell at a profit. As the supply of WETH increases, the value of WETH tokens would drop—keeping the peg relatively stable. + +**Why do people use WETH instead of ETH?** + +WETH was created primarily because the ETH token doesn't comply with the ERC-20 technical standard. This made Ether infeasible for use in decentralized applications (dapps) that only support ERC-20 tokens. Unlike Ether, WETH follows the [ERC-20 fungible token standard](/developers/docs/standards/tokens/erc-20/) —so it can be exchanged for other ERC-20 tokens and used on applications (e.g., decentralized exchanges and wallets) that support ERC-20 interfaces. + +**Is WETH safe?** + +While WETH is safe, it isn’t as safe as holding ETH in your wallet. For example, If ETH locked in the WETH contract is stolen, the value of WETH tokens would plummet as they would have no backing assets. + +**What can I do with WETH?** + +WETH can be used with any decentralized application built on the ERC-20 standard. WETH is particularly useful for decentralized finance (DeFi) applications—you can [exchange WETH for other tokens](/defi/#swaps) on a decentralized exchange, use it as collateral to [borrow funds](/defi/#borrowing-privacy), or supply liquidity to [lending platforms](/defi/#lending) in order to earn interest. + +## Further reading {#further-reading} + +- [WTF is WETH?](https://weth.io/) +- [What Is Wrapped Ether (WETH) and How to Wrap It?](https://academy.binance.com/en/articles/what-is-wrapped-ether-weth-and-how-to-wrap-it) +- [What is Wrapped Ether (wETH) and how does it work?](https://cointelegraph.com/news/what-is-wrapped-ethereum-weth-and-how-does-it-work/amp) +- [What are the cheapest ways to wrap ETH into WETH with the lowest gas fees?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) From e0bcc0b5503d8b96d2a6847ab4fd8d67fbf74228 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Wed, 12 Oct 2022 14:01:56 +0100 Subject: [PATCH 02/47] Update wrapped-ether.md --- src/content/wrapped-ether.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index b8852e02734..cb51d14aa9f 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -25,7 +25,7 @@ As an ERC-20 token, WETH has more versatile use-cases—unlike ETH, which is lim - Make payments in dapps -- [Trading WETH for tokens](/defi/#swaps) +- [Exchange WETH for other tokens](/defi/#swaps) - Use WETH as collateral to [borrow funds](/defi/#borrowing-privacy) @@ -35,7 +35,9 @@ As an ERC-20 token, WETH has more versatile use-cases—unlike ETH, which is lim To wrap ETH, you need to send it to a [smart contract](/smart-contracts/) which mints an equivalent amount of Wrapped ETH (WETH). This smart contract acts as a custodian as it holds your ETH until you decide to unwrap WETH. You can also swap ETH for WETH directly on a [decentralized exchange](/get-eth/#dex) without needing to interact with a smart contract. -The process of unwrapping ETH is similar: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. Whenever you redeem WETH for ETH, those tokens are [burned](https://decrypt.co/resources/what-is-a-token-burn-how-crypto-is-removed-from-circulation) (to keep the supply of WETH and ETH equal and enforces parity in prices). You can also unwrap ETH by swapping WETH for ETH using a decentralized exchange. +The process of unwrapping ETH is similar: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. Whenever you redeem WETH for ETH, those tokens are [burned](https://decrypt.co/resources/what-is-a-token-burn-how-crypto-is-removed-from-circulation), which keeps the supply of WETH and ETH equal and enforces parity in prices. You can also unwrap ETH by swapping WETH for ETH directly using a decentralized exchange. + +Wrapping ETH to to WETH doesn't incur additional costs, as both assets are converted at a 1:1 ratio. Nevertheless, you'll need to have some extra ETH in your wallet to pay for gas fees when interacting with the WETH token contract. Gas fees on the Ethereum network—paid for performing on-chain computation—are paid solely in Ether (demoninated in gwei). ## Wrapped Ether (WETH) vs Ether (ETH): What is the difference? {#weth-vs-eth-differences} @@ -75,7 +77,7 @@ Wrapped Ether (WETH) is not issued and secured by the Ethereum network, so using 3. Beyond scenarios involving malicious actors, a bug in the smart contract could prevent you from unwrapping ETH and withdrawing your locked-up assets. -## Frequently Asked Questions (FAQs) {#frequently-asked-questions} +## Frequently Asked Questions about Wrapped Ether (WETH) {#weth-frequentl-asked-questions} **Are ETH and WETH the same?** @@ -109,3 +111,4 @@ WETH can be used with any decentralized application built on the ERC-20 standard - [What Is Wrapped Ether (WETH) and How to Wrap It?](https://academy.binance.com/en/articles/what-is-wrapped-ether-weth-and-how-to-wrap-it) - [What is Wrapped Ether (wETH) and how does it work?](https://cointelegraph.com/news/what-is-wrapped-ethereum-weth-and-how-does-it-work/amp) - [What are the cheapest ways to wrap ETH into WETH with the lowest gas fees?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) +- [WETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) From 80af2a03294a894bd7b059fa6d6bc818489a9aa1 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Mon, 7 Nov 2022 08:32:35 +0100 Subject: [PATCH 03/47] Update wrapped-ether.md --- src/content/wrapped-ether.md | 49 ++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index cb51d14aa9f..2358a2af300 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -4,10 +4,8 @@ description: An introduction to Wrapped Ether (WETH)—an ERC-20 compatible vers --- # What Is Wrapped Ether (WETH)? {#what-is-wrapped-ether-weth} - -Wrapped Ether (WETH) is an ERC-20 token representing [Ether](/eth/), Ethereum’s native token. WETH is called a [wrapped token](https://academy.binance.com/en/articles/what-are-wrapped-tokens) because it derives value from another cryptocurrency (Ether in this case). -Wrapped tokens are so-called because the original cryptocurrency is deposited into a wrapper—similar to a digital bank vault—before a wrapped version of the cryptocurrency is created. For example, wrapping Ether involves depositing ETH into a smart contract that creates an amount of WETH equal to the original deposit. You can also “unwrap” Ether by sending WETH to a smart contract and receiving ETH in return. +Wrapped Ether (WETH) is an ERC-20 token representing [Ether](/eth/), Ethereum’s native cryptocurrency. [Wrapped tokens](https://academy.binance.com/en/articles/what-are-wrapped-tokens) are so-called because the original cryptocurrency is deposited into a wrapper—similar to a digital bank vault—before a wrapped version of the cryptocurrency is created. For example, wrapping Ether involves depositing ETH into a smart contract that creates an amount of WETH equal to the original deposit; you can also “unwrap” Ether by sending WETH to a smart contract and receiving ETH in return. Locking up ETH before minting new WETH tokens ensures every amount of WETH in circulation is backed by an equal amount of ETH held in reserves. This keeps the values of WETH and ETH equal, such that you can convert WETH to ETH (and vice-versa) at a 1:1 ratio. @@ -15,13 +13,13 @@ Wrapped Ether (WETH) and other wrapped tokens are similar to [stablecoins](/stab ## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} -The [ERC-20 token standard](/developers/docs/standards/tokens/erc-20/) was to ensure greater interoperability and compatibility between products and services in the Ethereum ecosystem. ERC-20 defines a standard interface for [fungible](https://www.investopedia.com/terms/f/fungibility.asp) tokens on Ethereum, making it easier for developers to build [decentralized applications](/dapps/) that can interact with tokens conforming to this standard. +The [ERC-20 token standard](/developers/docs/standards/tokens/erc-20/) was introduced to ensure greater interoperability and compatibility between products and services in the Ethereum ecosystem. ERC-20 defines a standard interface for [fungible](https://www.investopedia.com/terms/f/fungibility.asp) tokens on Ethereum, making it easier for developers to build [decentralized applications](/dapps/) that can interact with tokens conforming to this standard. -But the creation of Ether predates the [introduction of ERC-20](https://eips.ethereum.org/EIPS/eip-20), meaning ETH tokens don’t conform to the ERC-20 token interface. This means users cannot exchange ETH directly for other ERC-20 tokens—not without introducing trusted third parties or complex technical processes—and limits the functionality of ETH tokens for users. +But the creation of Ether predates the [introduction of the ERC-20 standard](https://eips.ethereum.org/EIPS/eip-20), so ETH tokens don’t conform to the ERC-20 token interface. This means users cannot exchange ETH directly for other ERC-20 tokens (not without introducing trusted third parties or complex technical processes), which limits the functionality of ETH tokens for users. -Wrapped Ether (WETH) was [created to make Ether compatible with applications](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) implementing ERC-20 token interfaces. The WETH token is a representation of Ether that complies with the ERC-20 token standard whose value is backed by ETH locked up during the wrapping process. +Wrapped Ether (WETH) was created to [make Ether compatible with applications](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) implementing ERC-20 token interfaces. The WETH token is a representation of Ether that complies with the ERC-20 token standard whose value is backed by ETH locked up during the wrapping process. -As an ERC-20 token, WETH has more versatile use-cases—unlike ETH, which is limited to making payments and [paying for computation](/developers/docs/gas/) on the Ethereum network. Some of the things you can do with WETH include: +As an ERC-20 token, WETH has more versatile use-cases, unlike ETH which is limited to making payments and [paying for computation](/developers/docs/gas/) on the Ethereum network. Some of the things you can do with WETH include: - Make payments in dapps @@ -33,41 +31,49 @@ As an ERC-20 token, WETH has more versatile use-cases—unlike ETH, which is lim ## How does Wrapped Ether (WETH) work? {#how-does-wrapped-ether-weth-work} -To wrap ETH, you need to send it to a [smart contract](/smart-contracts/) which mints an equivalent amount of Wrapped ETH (WETH). This smart contract acts as a custodian as it holds your ETH until you decide to unwrap WETH. You can also swap ETH for WETH directly on a [decentralized exchange](/get-eth/#dex) without needing to interact with a smart contract. +To wrap ETH, you need to send it to a [smart contract](/smart-contracts/) that mints an equivalent amount of Wrapped ETH (WETH) for you. This smart contract acts as a custodian as it holds your ETH until you decide to unwrap WETH. You can also swap ETH for WETH directly on a [decentralized exchange](/get-eth/#dex) without needing to interact with a smart contract. The process of unwrapping ETH is similar: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. Whenever you redeem WETH for ETH, those tokens are [burned](https://decrypt.co/resources/what-is-a-token-burn-how-crypto-is-removed-from-circulation), which keeps the supply of WETH and ETH equal and enforces parity in prices. You can also unwrap ETH by swapping WETH for ETH directly using a decentralized exchange. -Wrapping ETH to to WETH doesn't incur additional costs, as both assets are converted at a 1:1 ratio. Nevertheless, you'll need to have some extra ETH in your wallet to pay for gas fees when interacting with the WETH token contract. Gas fees on the Ethereum network—paid for performing on-chain computation—are paid solely in Ether (demoninated in gwei). +Wrapping ETH to to WETH doesn't incur additional costs, as both assets are converted at a 1:1 ratio. Nevertheless, you'll need to have some extra ETH in your wallet to pay for gas fees when interacting with the WETH token contract. Gas fees on the Ethereum network—paid for performing computation—are paid solely in Ether (demoninated in gwei). ## Wrapped Ether (WETH) vs Ether (ETH): What is the difference? {#weth-vs-eth-differences} + +Although they look similar, Wrapped Ether (WETH) and Ether (ETH) have subtle differences you should be aware of. For example, Ether is recognized by the Ethereum protocol, but the blockchain has no native knowledge of ERC-20 tokens like WETH—which causes differences in how both tokens behave. Below are some of the major distinctions between ETH and WETH tokens: ### Control of supply, ownership, and transfer {#control-of-supply-ownership-transfer} -#### Supply of ETH vs WETH +#### Supply of ETH vs WETH {#eth-vs-weth-supply} As Ethereum's native token, the supply of Ether is managed at the protocol level. New units of ETH are produced as a result of the Ethereum protocol [issuing rewards](/glossary/#issuance) to validators processing transactions and adding new blocks to the chain. Also, a portion of Ether paid for gas (the [base fee](/glossary/#base-fee)) is also burned during every transaction, removing those ETH tokens from circulation. -As a token, the supply of WETH is managed at the smart contract level. New units of WETH are issued by a token contract deployed on the Ethereum network. The contract monitors the supply of WETH and has mechanisms for increasing or reducing the amount of WETH tokens in circulation through minting and burning, respectively. +As an ERC-20 token, the supply of WETH is managed at the smart contract level. New units of WETH are issued by a token contract deployed on the Ethereum network. The contract monitors the supply of WETH and has mechanisms for increasing or reducing the amount of WETH tokens in circulation through [minting](/glossary/#mint) and burning, respectively. + +#### Ownership and transfer of ETH vs WETH {#eth-vs-weth-ownership-transfer} + +The Ethereum protocol defines and handles the ownership of Ether on the Ethereum network. Ether balances associated with [Ethereum accounts](/developers/docs/accounts/) are stored in the blockchain's [state](/glossary/#state) as [key-value pairs](https://www.techtarget.com/searchenterprisedesktop/definition/key-value-pair) where each *key* (an address) maps to a *value* (the amount of Ether owned by an account). Since Ether balances are stored in-protocol, [wallet applications](/wallets/) with access to the blockchain's state can automatically track ETH balances associated with any address. -#### Ownership of ETH vs WETH +Transferring ETH to another account requires creating a `send` transaction with the recipient's address as the destination (after signing with your [private key](/glossary/#private-key) to prove ownership of funds). As with any other Ethereum transaction, sending ETH demands paying a gas fee which is demoninated in [gwei](/glossary/#gwei) (a unit of Ether). -The Ethereum protocol handles ownership of Ether. For example, Ether balances of [Ethereum accounts](/developers/docs/accounts/) are stored as part of the blockchain's state—making it visible to any participant on the network. To send Ether, you need to sign a transaction transferring ETH to another address (after signing with your [private key](/glossary/#private-key) to prove ownership of funds) +Unlike ETH, the ownership and transfer of WETH tokens is handled by the [WETH token contract](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2). Balances of WETH token owners are stored **inside the contract** as key-value pairs where a key (an address) maps to a value (the total tokens owned by an account). As such, a wallet application cannot automatically track changes in your WETH balance unless you explictly ask the wallet application to "watch" the WETH token contract (i.e., read the contract's state). -Conversely, the [WETH token contract](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) controls ownership and transfer of WETH tokens. For example, balances of WETH token owners are stored in the contract as [key-value pairs](https://www.techtarget.com/searchenterprisedesktop/definition/key-value-pair) where the key (an address) maps to a value (the total tokens owned by an account). To send WETH to another address, you need to sign a transaction calling the smart contract's `transfer` function with the recipient's address and amount of tokens supplied as transaction parameters. +Sending WETH tokens also requires a different approach: you'll have to create a transaction with the WETH token contract's address (not the recipient's address) as the destination. This transaction calls the smart contract's `transfer` function with the recipient's address and amount of tokens to transfer supplied as transaction parameters. While this transaction is recorded on the blockchain, the actual transfer of WETH tokens from one address to another occurs inside the token contract and isn't recorded directly on the blockchain (hence, it is described as an [internal transaction](https://coinmarketcap.com/alexandria/glossary/internal-transaction)). -#### Uses of ETH vs WETH {#use-cases} +We should also mention that you cannot pay gas for a transaction transferring WETH using WETH tokens. This may sound confusing, but less so once you understand that the Ethereum protocol specifies Ether (ETH) as the only currency for paying for computation on the Ethereum network. This is why you are advised to have some ETH in your wallet when wrapping/unwrapping ETH or sending WETH to another address. -Ether is primarily used for transferring value between users and compensating nodes providing computational resources on the network. ETH is also used to secure the Ethereum network: validators processing transactions and producing new blocks must [deposit a bond paid in ETH](/staking/) before assuming this role. If a validator acts maliciously and attempts to subvert protocol rules, their ETH deposit will be [slashed](/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/#slashing) (destroyed) as punishment. +### Uses of ETH vs WETH {#eth-vs-weth-use-cases} + +Ether is primarily used for transferring value between users and compensating [nodes](/glossary/#node providing computational resources on the network. ETH is also used to secure the Ethereum network: validators processing transactions and producing new blocks must [deposit a bond paid in ETH](/staking/) before assuming this role. If a validator acts maliciously and attempts to subvert protocol rules, their ETH deposit will be [slashed](/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/#slashing) (destroyed) as punishment. As an ERC-20 representation of Ether, WETH has a completely different use-case: making it easier to use ETH in dapps. Because ETH isn’t ERC-20 compatible, developers would need to create separate interfaces (one for Ether and another for ERC-20 tokens) in a smart contract. Wrapping ETH in ERC-20 standards removes this obstacle and enables developers to handle ETH and other fungible tokens within the same contract. With the ERC-compatible WETH, you can access more functionalities than is possible with regular ETH tokens. WETH is particularly popular for users interacting with [decentralized finance](/defi/) (DeFi) applications. At its core, DeFi is a collection of primitives that allow for trading, borrowing, and exchanging assets with others without intermediaries. -DeFi enables even more complex use-cases, such as [yield farms](https://blockworks.co/what-is-yield-farming-what-you-need-to-know/) and [automated market makers](https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers) (AMMs) that can make investment decisions—like depositing into a lending pool or executing trades—for users. But these applications need access to your funds to work, which is why ERC-20 tokens like WETH define an `approve` function that allows you to approve other accounts to deduct a specific amount of tokens from your balance up to a predefined limit (`allowance`). +DeFi enables even more complex use-cases, such as [yield farms](https://blockworks.co/what-is-yield-farming-what-you-need-to-know/) and [automated market makers](https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers) (AMMs) that can make investment decisions—like depositing into a lending pool or executing trades—for users. But these applications need access to your funds to work, which is why ERC-20 tokens like WETH define an `approve` function (used in combination with `transfer`) that allows you to approve other accounts (mostly contract accounts) to deduct a specific amount of tokens from your balance up to a predefined limit (`allowance`). -#### Security properties of ETH vs WETH +### Security properties of ETH vs WETH {#eth-vs-weth-security-properties} -As an asset native to Ethereum, the security of Ether is guaranteed by the Ethereum network—no one can steal your funds unless they have access to your private keys. Even in a [51% attack](https://academy.binance.com/en/glossary/51-percent-attack), attackers cannot create forged transactions to transfer ETH from your address without approval. In other words, your ETH remains safe as long as your private keys are safe. +As an asset native to Ethereum, the security of ETH is guaranteed by the Ethereum network—no one can steal your funds unless they have access to your private keys. Even in a [51% attack](https://academy.binance.com/en/glossary/51-percent-attack), attackers cannot create forged transactions to transfer ETH from your address without approval. In other words, your ETH remains safe as long as your private keys are safe. Wrapped Ether (WETH) is not issued and secured by the Ethereum network, so using WETH comes with different layers of risks. The security of your WETH largely depends on the smart contract holding ETH deposits and minting WETH tokens for users. Possible attack scenarios include: @@ -77,7 +83,7 @@ Wrapped Ether (WETH) is not issued and secured by the Ethereum network, so using 3. Beyond scenarios involving malicious actors, a bug in the smart contract could prevent you from unwrapping ETH and withdrawing your locked-up assets. -## Frequently Asked Questions about Wrapped Ether (WETH) {#weth-frequentl-asked-questions} +## Frequently Asked Questions about Wrapped Ether (WETH) {#weth-frequently-asked-questions} **Are ETH and WETH the same?** @@ -90,6 +96,7 @@ No, you don’t pay to wrap ETH into WETH, as the assets are converted at a 1:1 **Are WETH and ETH the same price?** WETH is pegged 1:1 to the price of ETH, so the value of both assets are usually equal at any time. This peg is maintained by ensuring that every unit of WETH is backed by ETH held in reserves. Forces of supply and demand also keep the prices of ETH and WETH relatively equal: + - If WETH were cheaper, more people would buy it and convert it to the more expensive ETH at a 1:1 ratio to make profit. This would drive up demand for WETH and increase the price of WETH tokens. - If WETH is more expensive, more people would buy ETH and convert it to WETH to sell at a profit. As the supply of WETH increases, the value of WETH tokens would drop—keeping the peg relatively stable. @@ -110,5 +117,5 @@ WETH can be used with any decentralized application built on the ERC-20 standard - [WTF is WETH?](https://weth.io/) - [What Is Wrapped Ether (WETH) and How to Wrap It?](https://academy.binance.com/en/articles/what-is-wrapped-ether-weth-and-how-to-wrap-it) - [What is Wrapped Ether (wETH) and how does it work?](https://cointelegraph.com/news/what-is-wrapped-ethereum-weth-and-how-does-it-work/amp) -- [What are the cheapest ways to wrap ETH into WETH with the lowest gas fees?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) +- [What are the cheapest ways to wrap ETH into WETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) - [WETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) From 4329da84a1f73cce16ec96b4ae4ca5b24eeceeef Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Wed, 21 Dec 2022 07:23:59 +0100 Subject: [PATCH 04/47] Apply suggestions from code review Co-authored-by: Joseph Cook <33655003+jmcook1186@users.noreply.github.com> --- src/content/wrapped-ether.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index 2358a2af300..9e34307accd 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -33,7 +33,7 @@ As an ERC-20 token, WETH has more versatile use-cases, unlike ETH which is limit To wrap ETH, you need to send it to a [smart contract](/smart-contracts/) that mints an equivalent amount of Wrapped ETH (WETH) for you. This smart contract acts as a custodian as it holds your ETH until you decide to unwrap WETH. You can also swap ETH for WETH directly on a [decentralized exchange](/get-eth/#dex) without needing to interact with a smart contract. -The process of unwrapping ETH is similar: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. Whenever you redeem WETH for ETH, those tokens are [burned](https://decrypt.co/resources/what-is-a-token-burn-how-crypto-is-removed-from-circulation), which keeps the supply of WETH and ETH equal and enforces parity in prices. You can also unwrap ETH by swapping WETH for ETH directly using a decentralized exchange. +The process of unwrapping ETH is similar: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. Whenever you redeem WETH for ETH, the WETH tokens are [burned](https://decrypt.co/resources/what-is-a-token-burn-how-crypto-is-removed-from-circulation), which keeps the supply of WETH and ETH equal and enforces parity in prices. You can also unwrap ETH by swapping WETH for ETH directly using a decentralized exchange. Wrapping ETH to to WETH doesn't incur additional costs, as both assets are converted at a 1:1 ratio. Nevertheless, you'll need to have some extra ETH in your wallet to pay for gas fees when interacting with the WETH token contract. Gas fees on the Ethereum network—paid for performing computation—are paid solely in Ether (demoninated in gwei). @@ -59,15 +59,15 @@ Unlike ETH, the ownership and transfer of WETH tokens is handled by the [WETH to Sending WETH tokens also requires a different approach: you'll have to create a transaction with the WETH token contract's address (not the recipient's address) as the destination. This transaction calls the smart contract's `transfer` function with the recipient's address and amount of tokens to transfer supplied as transaction parameters. While this transaction is recorded on the blockchain, the actual transfer of WETH tokens from one address to another occurs inside the token contract and isn't recorded directly on the blockchain (hence, it is described as an [internal transaction](https://coinmarketcap.com/alexandria/glossary/internal-transaction)). -We should also mention that you cannot pay gas for a transaction transferring WETH using WETH tokens. This may sound confusing, but less so once you understand that the Ethereum protocol specifies Ether (ETH) as the only currency for paying for computation on the Ethereum network. This is why you are advised to have some ETH in your wallet when wrapping/unwrapping ETH or sending WETH to another address. +You cannot pay gas for a transaction using WETH tokens. Only Ethereum's native token, ETH, can be used to pay gas. This is why you must have some ETH in your wallet when wrapping/unwrapping ETH or sending WETH to another address. ### Uses of ETH vs WETH {#eth-vs-weth-use-cases} -Ether is primarily used for transferring value between users and compensating [nodes](/glossary/#node providing computational resources on the network. ETH is also used to secure the Ethereum network: validators processing transactions and producing new blocks must [deposit a bond paid in ETH](/staking/) before assuming this role. If a validator acts maliciously and attempts to subvert protocol rules, their ETH deposit will be [slashed](/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/#slashing) (destroyed) as punishment. +Ether is primarily used for transferring value between users and compensating validators securing the network. ETH is also used as collateral by validators. They stake ETH into a smart contract so that it can be destroyed if they act maliciously. -As an ERC-20 representation of Ether, WETH has a completely different use-case: making it easier to use ETH in dapps. Because ETH isn’t ERC-20 compatible, developers would need to create separate interfaces (one for Ether and another for ERC-20 tokens) in a smart contract. Wrapping ETH in ERC-20 standards removes this obstacle and enables developers to handle ETH and other fungible tokens within the same contract. +The main use case for WETH is making it easier to use ETH in dapps. Because ETH isn’t ERC-20 compatible, developers would need to create separate interfaces (one for Ether and another for ERC-20 tokens) in smart contracts. Wrapping ETH in ERC-20 standards removes this obstacle and enables developers to handle ETH and other fungible tokens within the same contract. -With the ERC-compatible WETH, you can access more functionalities than is possible with regular ETH tokens. WETH is particularly popular for users interacting with [decentralized finance](/defi/) (DeFi) applications. At its core, DeFi is a collection of primitives that allow for trading, borrowing, and exchanging assets with others without intermediaries. +With the ERC-compatible WETH, you can access more functions than with regular ETH. WETH is particularly popular for users interacting with [decentralized finance](/defi/) (DeFi) applications. At its core, DeFi is a collection of primitives that allow for trading, borrowing, and exchanging assets with others without intermediaries. DeFi enables even more complex use-cases, such as [yield farms](https://blockworks.co/what-is-yield-farming-what-you-need-to-know/) and [automated market makers](https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers) (AMMs) that can make investment decisions—like depositing into a lending pool or executing trades—for users. But these applications need access to your funds to work, which is why ERC-20 tokens like WETH define an `approve` function (used in combination with `transfer`) that allows you to approve other accounts (mostly contract accounts) to deduct a specific amount of tokens from your balance up to a predefined limit (`allowance`). @@ -102,11 +102,11 @@ WETH is pegged 1:1 to the price of ETH, so the value of both assets are usually **Why do people use WETH instead of ETH?** -WETH was created primarily because the ETH token doesn't comply with the ERC-20 technical standard. This made Ether infeasible for use in decentralized applications (dapps) that only support ERC-20 tokens. Unlike Ether, WETH follows the [ERC-20 fungible token standard](/developers/docs/standards/tokens/erc-20/) —so it can be exchanged for other ERC-20 tokens and used on applications (e.g., decentralized exchanges and wallets) that support ERC-20 interfaces. +WETH was created primarily because the ETH token doesn't comply with the ERC-20 technical standard. This made Ether difficult to use in decentralized applications (dapps). Unlike Ether, WETH follows the [ERC-20 fungible token standard](/developers/docs/standards/tokens/erc-20/) —so it can be exchanged for other ERC-20 tokens and used on applications (e.g., decentralized exchanges and wallets) that support ERC-20 interfaces. **Is WETH safe?** -While WETH is safe, it isn’t as safe as holding ETH in your wallet. For example, If ETH locked in the WETH contract is stolen, the value of WETH tokens would plummet as they would have no backing assets. +ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. WETH is generally considered a very safe asset because the contract is small, simple, well-tested and it has been around for a long time. **What can I do with WETH?** From 8bbc8dbba3832d9825ce2f0697d1b82114f9b992 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Wed, 21 Dec 2022 07:24:35 +0100 Subject: [PATCH 05/47] Update wrapped-ether.md --- src/content/wrapped-ether.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index 9e34307accd..ab1dca85178 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -8,8 +8,6 @@ description: An introduction to Wrapped Ether (WETH)—an ERC-20 compatible vers Wrapped Ether (WETH) is an ERC-20 token representing [Ether](/eth/), Ethereum’s native cryptocurrency. [Wrapped tokens](https://academy.binance.com/en/articles/what-are-wrapped-tokens) are so-called because the original cryptocurrency is deposited into a wrapper—similar to a digital bank vault—before a wrapped version of the cryptocurrency is created. For example, wrapping Ether involves depositing ETH into a smart contract that creates an amount of WETH equal to the original deposit; you can also “unwrap” Ether by sending WETH to a smart contract and receiving ETH in return. Locking up ETH before minting new WETH tokens ensures every amount of WETH in circulation is backed by an equal amount of ETH held in reserves. This keeps the values of WETH and ETH equal, such that you can convert WETH to ETH (and vice-versa) at a 1:1 ratio. - -Wrapped Ether (WETH) and other wrapped tokens are similar to [stablecoins](/stablecoins/), as their value is pegged to the value of other assets. But while stablecoins are backed by US dollars held in off-chain reserves, WETH is collateralized by ETH issued on the Ethereum blockchain. ## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} From f3aa7a2660bb21f9fa99c55371f9fdad26aaa455 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Wed, 21 Dec 2022 07:25:52 +0100 Subject: [PATCH 06/47] Update src/content/wrapped-ether.md Co-authored-by: Joseph Cook <33655003+jmcook1186@users.noreply.github.com> --- src/content/wrapped-ether.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index ab1dca85178..921b915d70b 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -73,7 +73,7 @@ DeFi enables even more complex use-cases, such as [yield farms](https://blockwor As an asset native to Ethereum, the security of ETH is guaranteed by the Ethereum network—no one can steal your funds unless they have access to your private keys. Even in a [51% attack](https://academy.binance.com/en/glossary/51-percent-attack), attackers cannot create forged transactions to transfer ETH from your address without approval. In other words, your ETH remains safe as long as your private keys are safe. -Wrapped Ether (WETH) is not issued and secured by the Ethereum network, so using WETH comes with different layers of risks. The security of your WETH largely depends on the smart contract holding ETH deposits and minting WETH tokens for users. Possible attack scenarios include: +Wrapped Ether (WETH) is not issued and secured by the Ethereum network, so using WETH has smart contract risk that ETH does not. The WETH contract is very well battle-tested and is a relatively simple contract that is considered very secure. However, hypothetical attack scenarios might include: 1. An attacker could exploit the WETH contract and mint WETH tokens without depositing Ether (the equivalent of printing money out of thin air). If the attacker successfully redeems these tokens for actual ETH, other owners will be unable to access their Ether deposits. From 06c641e550fc231e1a4fad52e514eac710ef71b1 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Wed, 21 Dec 2022 07:44:04 +0100 Subject: [PATCH 07/47] Added info about formal verification of WETH --- src/content/wrapped-ether.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index 921b915d70b..a22ad262112 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -104,7 +104,7 @@ WETH was created primarily because the ETH token doesn't comply with the ERC-20 **Is WETH safe?** -ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. WETH is generally considered a very safe asset because the contract is small, simple, well-tested and it has been around for a long time. +ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. WETH is generally considered a very safe asset because the contract is small, simple, well-tested and it has been around for a long time. Furthermore, [formal verification of the WETH contract](https://www.zellic.io/blog/formal-verification-weth) has proved its safety (formal verification reasons about correctness of code using logical rules and is considered more rigorous than testing). **What can I do with WETH?** @@ -114,6 +114,6 @@ WETH can be used with any decentralized application built on the ERC-20 standard - [WTF is WETH?](https://weth.io/) - [What Is Wrapped Ether (WETH) and How to Wrap It?](https://academy.binance.com/en/articles/what-is-wrapped-ether-weth-and-how-to-wrap-it) -- [What is Wrapped Ether (wETH) and how does it work?](https://cointelegraph.com/news/what-is-wrapped-ethereum-weth-and-how-does-it-work/amp) - [What are the cheapest ways to wrap ETH into WETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) - [WETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) +- [Formal Verification of WETH](https://zellic.io/blog/formal-verification-weth) From be4824a3d21164f8ddc32209282808f76d053efe Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Sat, 31 Dec 2022 07:12:30 -0500 Subject: [PATCH 08/47] Update wrapped-ether.md --- src/content/wrapped-ether.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index a22ad262112..8bd7544dd83 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -104,7 +104,7 @@ WETH was created primarily because the ETH token doesn't comply with the ERC-20 **Is WETH safe?** -ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. WETH is generally considered a very safe asset because the contract is small, simple, well-tested and it has been around for a long time. Furthermore, [formal verification of the WETH contract](https://www.zellic.io/blog/formal-verification-weth) has proved its safety (formal verification reasons about correctness of code using logical rules and is considered more rigorous than testing). +ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. However, WETH is generally considered a very safe asset because the token contract is small, simple, well-tested and it has been around for a long time. Furthermore, [formal verification of the WETH contract](https://www.zellic.io/blog/formal-verification-weth) has proved its safety (formal verification reasons about correctness of code using logical rules and is considered more rigorous than testing). **What can I do with WETH?** From 36dd02f0c3ab116e70eed17d01df5ddb17cb9f25 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Fri, 17 Feb 2023 14:23:35 -0500 Subject: [PATCH 09/47] Update WETH page based on feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hot off the press! 👨‍🍳 I updated the Learn page based on feedback from @konopkja. General overview of changes: - Reduced links - Reworked most sections including the introduction and FAQs - Created a table to compare major differences between WETH and ETH - Reworked security section a bit, especially to add details on how WETH on Ethereum is different WETH on other blockchains - Added an FAQ clarifying that you can pay for gas if using a relayer (important detail, especially since Ethereum is moving towards account abstraction) - Minor improvements to improve reader UX --- src/content/wrapped-ether.md | 112 ++++++++++++++++------------------- 1 file changed, 52 insertions(+), 60 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index 8bd7544dd83..1c7e6ef3811 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -1,119 +1,111 @@ --- title: Wrapped Ether (WETH) -description: An introduction to Wrapped Ether (WETH)—an ERC-20 compatible version of Ether (ETH). +description: An introduction to Wrapped Ether (WETH)—an ERC20-compatible version of Ether (ETH). --- # What Is Wrapped Ether (WETH)? {#what-is-wrapped-ether-weth} +Wrapped Ether (WETH) is an ERC-20 token representing Ether, Ethereum’s native coin. If you use Ethereum dapps, you've likely seen tokens built using the ERC-20 standard. The ERC-20 standard offers many benefits to developers and users, especially **flexibility** (tokens can be customized for different use cases) and **fungibility** (tokens are identical and interchangeable). -Wrapped Ether (WETH) is an ERC-20 token representing [Ether](/eth/), Ethereum’s native cryptocurrency. [Wrapped tokens](https://academy.binance.com/en/articles/what-are-wrapped-tokens) are so-called because the original cryptocurrency is deposited into a wrapper—similar to a digital bank vault—before a wrapped version of the cryptocurrency is created. For example, wrapping Ether involves depositing ETH into a smart contract that creates an amount of WETH equal to the original deposit; you can also “unwrap” Ether by sending WETH to a smart contract and receiving ETH in return. +Ether (ETH) doesn't comply with the ERC-20 standard, but there's significant demand to use it in ERC20-compatible wallets and dapps. Wrapped Ether (WETH) solves the problem by providing an ERC20-compliant version of ETH to use in dapps or swap with other ERC-20 tokens. As WETH is pegged to the price of ETH, using it will feel very similar to using native ETH. -Locking up ETH before minting new WETH tokens ensures every amount of WETH in circulation is backed by an equal amount of ETH held in reserves. This keeps the values of WETH and ETH equal, such that you can convert WETH to ETH (and vice-versa) at a 1:1 ratio. - -## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} - -The [ERC-20 token standard](/developers/docs/standards/tokens/erc-20/) was introduced to ensure greater interoperability and compatibility between products and services in the Ethereum ecosystem. ERC-20 defines a standard interface for [fungible](https://www.investopedia.com/terms/f/fungibility.asp) tokens on Ethereum, making it easier for developers to build [decentralized applications](/dapps/) that can interact with tokens conforming to this standard. +Wrapping Ether requires depositing ETH into a smart contract that creates an amount of WETH tokens equal to the original deposit; you can also “unwrap” Ether by sending WETH to the contract and receiving ETH in return. By locking up ETH before minting new WETH tokens, the WETH contract ensures the value of WETH tokens in circulation is backed by ETH held in reserves. This keeps the prices WETH and ETH relatively equal, such that you can convert WETH to ETH (and vice-versa) at a 1:1 ratio -But the creation of Ether predates the [introduction of the ERC-20 standard](https://eips.ethereum.org/EIPS/eip-20), so ETH tokens don’t conform to the ERC-20 token interface. This means users cannot exchange ETH directly for other ERC-20 tokens (not without introducing trusted third parties or complex technical processes), which limits the functionality of ETH tokens for users. +Today, **nearly 3% of the circulating ETH supply is locked in the WETH token contract**—inspiring its description as the "World's Most Popular Smart Contract". WETH is also one of the most used ERC-20 tokens, especially among users interacting with Ethereum applications in the Decentralized Finance (DeFi) ecosystem. -Wrapped Ether (WETH) was created to [make Ether compatible with applications](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) implementing ERC-20 token interfaces. The WETH token is a representation of Ether that complies with the ERC-20 token standard whose value is backed by ETH locked up during the wrapping process. +## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} +The [ERC-20 token standard](https://www.gemini.com/cryptopedia/erc20-token-standard-ethereum) was introduced to ensure greater interoperability between products and services on Ethereum. ERC-20 defines a standard interface for fungible tokens, making it easier for developers to build tokens that seamlessly integrate with applications and other tokens in the Ethereum ecosystem. -As an ERC-20 token, WETH has more versatile use-cases, unlike ETH which is limited to making payments and [paying for computation](/developers/docs/gas/) on the Ethereum network. Some of the things you can do with WETH include: +But the creation of Ether predates the introduction of the ERC-20 standard, which means ETH tokens don’t conform to the ERC-20 specification. Wrapped Ether (WETH) was thus created to [make ETH compatible with applications](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) implementing ERC-20 interfaces. Compared to ETH, WETH is based on the ERC-20 standard and offers similar functionalities as other ERC-20 tokens (eg. the ability to approve token spends by third-party accounts). -- Make payments in dapps +### What are the use cases for WETH? {#weth-use-cases} +As an ERC-20 token, WETH has more versatile use-cases, unlike ETH which is limited to making payments and paying for computation on the Ethereum network. Benefits of using WETH include: -- [Exchange WETH for other tokens](/defi/#swaps) +1. **Exchange ETH for ERC-20 tokens** -- Use WETH as collateral to [borrow funds](/defi/#borrowing-privacy) +You cannot exchange ETH directly for other ERC-20 tokens (not without introducing trusted third parties or complex technical processes). WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged 1:1 for other ERC20 tokens. -- Supply liquidity to [lending platforms](/defi/#lending) +2. **Use ETH in dapps** -## How does Wrapped Ether (WETH) work? {#how-does-wrapped-ether-weth-work} +Because ETH isn’t ERC20-compatible, developers would need to create separate interfaces (one for ETH and another for ERC-20 tokens) in dapps. Wrapping ETH in ERC-20 standards using WETH removes this obstacle and enables developers to handle ETH and other tokens within the same dapp. -To wrap ETH, you need to send it to a [smart contract](/smart-contracts/) that mints an equivalent amount of Wrapped ETH (WETH) for you. This smart contract acts as a custodian as it holds your ETH until you decide to unwrap WETH. You can also swap ETH for WETH directly on a [decentralized exchange](/get-eth/#dex) without needing to interact with a smart contract. +3. **Interact with DeFi applications** -The process of unwrapping ETH is similar: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. Whenever you redeem WETH for ETH, the WETH tokens are [burned](https://decrypt.co/resources/what-is-a-token-burn-how-crypto-is-removed-from-circulation), which keeps the supply of WETH and ETH equal and enforces parity in prices. You can also unwrap ETH by swapping WETH for ETH directly using a decentralized exchange. +Besides borrowing and lending, DeFi enables complex use-cases like [yield farms](https://blockworks.co/what-is-yield-farming-what-you-need-to-know/) and [automated market makers](https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers) (AMMs). These applications can make investment decisions on your behalf, such as automatically supplying liquidity to a lending pool or executing trades. -Wrapping ETH to to WETH doesn't incur additional costs, as both assets are converted at a 1:1 ratio. Nevertheless, you'll need to have some extra ETH in your wallet to pay for gas fees when interacting with the WETH token contract. Gas fees on the Ethereum network—paid for performing computation—are paid solely in Ether (demoninated in gwei). +That said, these applications can only work if they have access to funds in your wallet. With ERC-20 tokens like WETH, you can approve a smart contract to deduct WETH tokens from your balance up to a predefined limit. This feature is, however, unavailable when using native ETH. ## Wrapped Ether (WETH) vs Ether (ETH): What is the difference? {#weth-vs-eth-differences} +Although they look similar, Wrapped Ether (WETH) and Ether (ETH) have subtle differences you should be aware of. For example, the Ethereum protocol recognizes Ether—but it has no native knowledge of WETH (and ERC-20 tokens), causing both assets to behave differently. We have listed other important distinctions between ETH and WETH tokens below: -Although they look similar, Wrapped Ether (WETH) and Ether (ETH) have subtle differences you should be aware of. For example, Ether is recognized by the Ethereum protocol, but the blockchain has no native knowledge of ERC-20 tokens like WETH—which causes differences in how both tokens behave. Below are some of the major distinctions between ETH and WETH tokens: - -### Control of supply, ownership, and transfer {#control-of-supply-ownership-transfer} - -#### Supply of ETH vs WETH {#eth-vs-weth-supply} - -As Ethereum's native token, the supply of Ether is managed at the protocol level. New units of ETH are produced as a result of the Ethereum protocol [issuing rewards](/glossary/#issuance) to validators processing transactions and adding new blocks to the chain. Also, a portion of Ether paid for gas (the [base fee](/glossary/#base-fee)) is also burned during every transaction, removing those ETH tokens from circulation. - -As an ERC-20 token, the supply of WETH is managed at the smart contract level. New units of WETH are issued by a token contract deployed on the Ethereum network. The contract monitors the supply of WETH and has mechanisms for increasing or reducing the amount of WETH tokens in circulation through [minting](/glossary/#mint) and burning, respectively. - -#### Ownership and transfer of ETH vs WETH {#eth-vs-weth-ownership-transfer} - -The Ethereum protocol defines and handles the ownership of Ether on the Ethereum network. Ether balances associated with [Ethereum accounts](/developers/docs/accounts/) are stored in the blockchain's [state](/glossary/#state) as [key-value pairs](https://www.techtarget.com/searchenterprisedesktop/definition/key-value-pair) where each *key* (an address) maps to a *value* (the amount of Ether owned by an account). Since Ether balances are stored in-protocol, [wallet applications](/wallets/) with access to the blockchain's state can automatically track ETH balances associated with any address. - -Transferring ETH to another account requires creating a `send` transaction with the recipient's address as the destination (after signing with your [private key](/glossary/#private-key) to prove ownership of funds). As with any other Ethereum transaction, sending ETH demands paying a gas fee which is demoninated in [gwei](/glossary/#gwei) (a unit of Ether). - -Unlike ETH, the ownership and transfer of WETH tokens is handled by the [WETH token contract](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2). Balances of WETH token owners are stored **inside the contract** as key-value pairs where a key (an address) maps to a value (the total tokens owned by an account). As such, a wallet application cannot automatically track changes in your WETH balance unless you explictly ask the wallet application to "watch" the WETH token contract (i.e., read the contract's state). - -Sending WETH tokens also requires a different approach: you'll have to create a transaction with the WETH token contract's address (not the recipient's address) as the destination. This transaction calls the smart contract's `transfer` function with the recipient's address and amount of tokens to transfer supplied as transaction parameters. While this transaction is recorded on the blockchain, the actual transfer of WETH tokens from one address to another occurs inside the token contract and isn't recorded directly on the blockchain (hence, it is described as an [internal transaction](https://coinmarketcap.com/alexandria/glossary/internal-transaction)). +| | **Ether (ETH)** | **Wrapped Ether (WETH)** | +|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Supply | **As Ethereum’s native token, the supply of ETH is managed by the protocol.** The supply of ETH increases when Ethereum validators earn rewards for processing transactions and creating blocks. | **WETH is an ERC-20 token whose supply is managed by a smart contract.** New units of WETH are issued by the contract after it receives ETH deposits from users. | +| Ownership | **Ownership of ETH is defined and guaranteed by the Ethereum blockchain.** For example, protocol rules ensure you can always spend from an account’s ETH balance if you control the [private key](/glossary/#private-key). | **Ownership of WETH depends on the WETH token contract.** For example, if nothing happens to the smart contract, you always have access to your WETH tokens. | +| Transfer | The transfer of ETH is intrinsic to the Ethereum protocol. Transfers are recorded on-chain and publicly verifiable. | **The transfer of WETH tokens occurs inside the WETH token contract and [isn’t directly recorded on-chain](https://coinmarketcap.com/alexandria/glossary/internal-transaction).** The blockchain only records the transaction authorizing the smart contract to deduct from the sender’s WETH balance. | +| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using WETH tokens (except when using a third-party relayers service). | +### Security considerations for using WETH {#weth-security-considerations} +As an asset native to Ethereum, the security of ETH is guaranteed by the Ethereum network—no one can steal your funds unless they have access to your private keys. Even in a [51% attack](https://academy.binance.com/en/glossary/51-percent-attack), attackers cannot create forged transactions to transfer ETH from your address without approval. -You cannot pay gas for a transaction using WETH tokens. Only Ethereum's native token, ETH, can be used to pay gas. This is why you must have some ETH in your wallet when wrapping/unwrapping ETH or sending WETH to another address. +Wrapped Ether (WETH) is not issued and secured by the Ethereum network; and being a token, WETH exposes you to smart contract risks that ETH does not have. The WETH contract is considered very secure, but some hypothetical attack scenarios exist including: -### Uses of ETH vs WETH {#eth-vs-weth-use-cases} +- **An attacker mints WETH tokens without depositing ETH (the equivalent of printing money out of thin air)**. If the attacker successfully redeems these tokens for ETH, other owners may be unable to withdraw their ETH deposits. -Ether is primarily used for transferring value between users and compensating validators securing the network. ETH is also used as collateral by validators. They stake ETH into a smart contract so that it can be destroyed if they act maliciously. +- **An attacker exploits a vulnerability that allows them to drain the WETH contract of ETH deposited by users**. This would leave users with valueless WETH tokens without any backing. -The main use case for WETH is making it easier to use ETH in dapps. Because ETH isn’t ERC-20 compatible, developers would need to create separate interfaces (one for Ether and another for ERC-20 tokens) in smart contracts. Wrapping ETH in ERC-20 standards removes this obstacle and enables developers to handle ETH and other fungible tokens within the same contract. +- **A smart contract bug prevents users from unwrapping WETH and withdrawing ETH deposits.** While the chances of this happening are low, it is still a feasible scenario that could affect the safety of WETH assets. -With the ERC-compatible WETH, you can access more functions than with regular ETH. WETH is particularly popular for users interacting with [decentralized finance](/defi/) (DeFi) applications. At its core, DeFi is a collection of primitives that allow for trading, borrowing, and exchanging assets with others without intermediaries. +Note that these security considerations apply **only if you’re using WETH issued on Ethereum**. [Blockchain bridges](/bridges/) allow you to use ETH on non-Ethereum blockchains by issuing a variant of WETH compatible with another blockchain’s technical standards. -DeFi enables even more complex use-cases, such as [yield farms](https://blockworks.co/what-is-yield-farming-what-you-need-to-know/) and [automated market makers](https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers) (AMMs) that can make investment decisions—like depositing into a lending pool or executing trades—for users. But these applications need access to your funds to work, which is why ERC-20 tokens like WETH define an `approve` function (used in combination with `transfer`) that allows you to approve other accounts (mostly contract accounts) to deduct a specific amount of tokens from your balance up to a predefined limit (`allowance`). +But this introduces additional security issues other than those described previously. For example, you must also believe the bridge is secure against attacks, the bridge operator(s) won’t freeze or steal your funds, etc. -### Security properties of ETH vs WETH {#eth-vs-weth-security-properties} - -As an asset native to Ethereum, the security of ETH is guaranteed by the Ethereum network—no one can steal your funds unless they have access to your private keys. Even in a [51% attack](https://academy.binance.com/en/glossary/51-percent-attack), attackers cannot create forged transactions to transfer ETH from your address without approval. In other words, your ETH remains safe as long as your private keys are safe. +## Frequently Asked Questions about Wrapped Ether (WETH) {#weth-frequently-asked-questions} -Wrapped Ether (WETH) is not issued and secured by the Ethereum network, so using WETH has smart contract risk that ETH does not. The WETH contract is very well battle-tested and is a relatively simple contract that is considered very secure. However, hypothetical attack scenarios might include: +**Are ETH and WETH the same?** -1. An attacker could exploit the WETH contract and mint WETH tokens without depositing Ether (the equivalent of printing money out of thin air). If the attacker successfully redeems these tokens for actual ETH, other owners will be unable to access their Ether deposits. +No. Ether (ETH) is the native coin of the Ethereum blockchain, used as a unit of payment on the Ethereum network (including paying for transaction fees). Wrapped Ether (WETH) is an ERC20-compatible version of ETH primarily designed to make ETH tokens compatible with applications built on the ERC-20 standard. -2. An attacker could exploit a vulnerability in the contract and drain the funds of users who deposited ETH during the wrapping process. This would leave users with valueless WETH tokens without any backing. +**How does Wrapped Ether (WETH) work?** -3. Beyond scenarios involving malicious actors, a bug in the smart contract could prevent you from unwrapping ETH and withdrawing your locked-up assets. - -## Frequently Asked Questions about Wrapped Ether (WETH) {#weth-frequently-asked-questions} +Users wrap ETH by sending it to a smart that mints an equivalent amount of Wrapped ETH (WETH) in return. Another way to get wrapped ETH is to swap ETH for WETH tokens on a decentralized exchange (DEX). +Unwrapping ETH requires a similar workflow: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. You can also unwrap ETH by swapping WETH for ETH directly using a decentralized exchange. -**Are ETH and WETH the same?** +**Do you pay to wrap/unwrap ETH?** -No. Ether (ETH) is the native coin of the Ethereum blockchain, used as a unit of payment on the Ethereum network (including paying for transaction fees). Wrapped Ether (WETH) is an ERC-20-compatible version of ETH primarily designed to make ETH tokens compatible with applications built on the ERC-20 standard. +No. You don’t pay to wrap ETH into WETH, as the assets are converted at a 1:1 ratio. However, interacting with the WETH contract to wrap/unwrap ETH involves sending an on-chain transaction—and this requires paying a gas fee. DEX platforms also charge for gas when executing swaps between ETH and WETH (or vice-versa). -**Do you pay to wrap ETH?** +**Can I pay for gas with WETH?** -No, you don’t pay to wrap ETH into WETH, as the assets are converted at a 1:1 ratio. However, interacting with the WETH contract to wrap ETH involves sending an on-chain transaction—and this requires paying a gas fee. You'll also pay gas when unwrapping ETH through a smart contract. +No. Ethereum nodes only accept ETH as payment for gas fees. You can only pay for gas in WETH only if using a third-party relayer that accepts the (signed) transaction off-chain and broadcasts it on-chain on your behalf. Typically, [relayers](https://blog.kyros.ventures/2022/07/24/meta-transaction-relayer-an-overview/) pay the gas fee for a relayed transactions from their ETH balance and accept payment for the service in ERC-20 tokens like WETH. **Are WETH and ETH the same price?** WETH is pegged 1:1 to the price of ETH, so the value of both assets are usually equal at any time. This peg is maintained by ensuring that every unit of WETH is backed by ETH held in reserves. Forces of supply and demand also keep the prices of ETH and WETH relatively equal: - If WETH were cheaper, more people would buy it and convert it to the more expensive ETH at a 1:1 ratio to make profit. This would drive up demand for WETH and increase the price of WETH tokens. + - If WETH is more expensive, more people would buy ETH and convert it to WETH to sell at a profit. As the supply of WETH increases, the value of WETH tokens would drop—keeping the peg relatively stable. **Why do people use WETH instead of ETH?** -WETH was created primarily because the ETH token doesn't comply with the ERC-20 technical standard. This made Ether difficult to use in decentralized applications (dapps). Unlike Ether, WETH follows the [ERC-20 fungible token standard](/developers/docs/standards/tokens/erc-20/) —so it can be exchanged for other ERC-20 tokens and used on applications (e.g., decentralized exchanges and wallets) that support ERC-20 interfaces. +WETH was created because the ETH token doesn't follow with the ERC-20 technical specification, making it difficult to use in decentralized applications (dapps). Unlike Ether, WETH follows the ERC-20 standard and is compatible with applications, such as decentralized exchanges and wallets, that support ERC-20 interfaces. WETH is also tradeable for other ERC-20 tokens while directly exchanging ETH for ERC-20 tokens requires complex accounting. **Is WETH safe?** -ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. However, WETH is generally considered a very safe asset because the token contract is small, simple, well-tested and it has been around for a long time. Furthermore, [formal verification of the WETH contract](https://www.zellic.io/blog/formal-verification-weth) has proved its safety (formal verification reasons about correctness of code using logical rules and is considered more rigorous than testing). +ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. Nevertheless, WETH is generally considered safe because it is based on a simple, well-tested smart contract with a limited attack surface. The WETH contract has also passed formal verification, which is considered the highest security standard for Ethereum-based applications. + +**Can I use WETH on other blockchains?** + +Yes. If using a bridge, it is possible to get WETH tokens compatible with other blockchain protocols aside from Ethereum. These variants of WETH have different security properties from Ethereum-native WETH, however. For example, you must believe the bridge is well-secured and will let you redeem your WETH tokens for ETH. **What can I do with WETH?** -WETH can be used with any decentralized application built on the ERC-20 standard. WETH is particularly useful for decentralized finance (DeFi) applications—you can [exchange WETH for other tokens](/defi/#swaps) on a decentralized exchange, use it as collateral to [borrow funds](/defi/#borrowing-privacy), or supply liquidity to [lending platforms](/defi/#lending) in order to earn interest. +WETH can be used with any decentralized application built on the ERC-20 standard. WETH is particularly useful for decentralized finance (DeFi) applications—you can [exchange WETH for other tokens](/defi/#swaps) on a DEX, use it as collateral to [borrow funds](/defi/#borrowing-privacy), or supply liquidity to [lending platforms](/defi/#lending) in order to earn interest. ## Further reading {#further-reading} - - [WTF is WETH?](https://weth.io/) - [What Is Wrapped Ether (WETH) and How to Wrap It?](https://academy.binance.com/en/articles/what-is-wrapped-ether-weth-and-how-to-wrap-it) - [What are the cheapest ways to wrap ETH into WETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) - [WETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) - [Formal Verification of WETH](https://zellic.io/blog/formal-verification-weth) + + From d80a2527fbd6edcbdaab5d3c269239b561734561 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Mon, 20 Feb 2023 07:47:30 -0500 Subject: [PATCH 10/47] Update wrapped-ether.md - Added context on the canonical implementation of WETH since there are [many implementations of WETH](https://tinyurl.com/weth-supply-SERPs) living on different chains. - Added more details on the security of WETH (not enough to tell people WETH is safe without giving them some evidence) --- src/content/wrapped-ether.md | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index 1c7e6ef3811..78741e1d167 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -8,14 +8,16 @@ Wrapped Ether (WETH) is an ERC-20 token representing Ether, Ethereum’s native Ether (ETH) doesn't comply with the ERC-20 standard, but there's significant demand to use it in ERC20-compatible wallets and dapps. Wrapped Ether (WETH) solves the problem by providing an ERC20-compliant version of ETH to use in dapps or swap with other ERC-20 tokens. As WETH is pegged to the price of ETH, using it will feel very similar to using native ETH. -Wrapping Ether requires depositing ETH into a smart contract that creates an amount of WETH tokens equal to the original deposit; you can also “unwrap” Ether by sending WETH to the contract and receiving ETH in return. By locking up ETH before minting new WETH tokens, the WETH contract ensures the value of WETH tokens in circulation is backed by ETH held in reserves. This keeps the prices WETH and ETH relatively equal, such that you can convert WETH to ETH (and vice-versa) at a 1:1 ratio +Wrapping Ether requires depositing ETH into a smart contract that creates an amount of WETH tokens equal to the original deposit; you can also “unwrap” Ether by sending WETH to the contract and receiving ETH in return. By locking up ETH before minting new tokens, the WETH contract ensures the value of WETH tokens in circulation is backed by ETH held in reserves. This keeps the prices WETH and ETH relatively equal, such that you can convert WETH to ETH (and vice-versa) at a 1:1 ratio -Today, **nearly 3% of the circulating ETH supply is locked in the WETH token contract**—inspiring its description as the "World's Most Popular Smart Contract". WETH is also one of the most used ERC-20 tokens, especially among users interacting with Ethereum applications in the Decentralized Finance (DeFi) ecosystem. +Today, **nearly 3% of the circulating ETH supply is locked in the WETH token contract**—inspiring its description as the "World's Most Popular Smart Contract". WETH is also one of the most used ERC-20 tokens, especially among users interacting with applications in Ethereum's Decentralized Finance (DeFi) ecosystem. ## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} -The [ERC-20 token standard](https://www.gemini.com/cryptopedia/erc20-token-standard-ethereum) was introduced to ensure greater interoperability between products and services on Ethereum. ERC-20 defines a standard interface for fungible tokens, making it easier for developers to build tokens that seamlessly integrate with applications and other tokens in the Ethereum ecosystem. +The [ERC-20 token standard](https://www.gemini.com/cryptopedia/erc20-token-standard-ethereum) was introduced to ensure greater interoperability between products and services on Ethereum. ERC-20 defines a standard interface for fungible tokens, making it easier for developers to build tokens that seamlessly interoperate with applications and other tokens in the Ethereum ecosystem. -But the creation of Ether predates the introduction of the ERC-20 standard, which means ETH tokens don’t conform to the ERC-20 specification. Wrapped Ether (WETH) was thus created to [make ETH compatible with applications](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) implementing ERC-20 interfaces. Compared to ETH, WETH is based on the ERC-20 standard and offers similar functionalities as other ERC-20 tokens (eg. the ability to approve token spends by third-party accounts). +But the creation of Ether predates the introduction of the ERC-20 standard, which means ETH tokens don’t conform to the ERC-20 specification. Wrapped Ether (WETH) was thus created to make ETH compatible with applications implementing ERC-20 interfaces. Compared to ETH, WETH is based on the ERC-20 standard and offers similar functionalities as other ERC-20 tokens (eg. the ability to approve token spends by third-party accounts). + +Important to note is that there are other variants than the [canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described here. These may be custom tokens created by dapp developers or versions issued on other blockchains and may behave differently. **Always doubleck the token information to know which WETH implementation you're interacting with.** ### What are the use cases for WETH? {#weth-use-cases} As an ERC-20 token, WETH has more versatile use-cases, unlike ETH which is limited to making payments and paying for computation on the Ethereum network. Benefits of using WETH include: @@ -42,11 +44,19 @@ Although they look similar, Wrapped Ether (WETH) and Ether (ETH) have subtle dif | Supply | **As Ethereum’s native token, the supply of ETH is managed by the protocol.** The supply of ETH increases when Ethereum validators earn rewards for processing transactions and creating blocks. | **WETH is an ERC-20 token whose supply is managed by a smart contract.** New units of WETH are issued by the contract after it receives ETH deposits from users. | | Ownership | **Ownership of ETH is defined and guaranteed by the Ethereum blockchain.** For example, protocol rules ensure you can always spend from an account’s ETH balance if you control the [private key](/glossary/#private-key). | **Ownership of WETH depends on the WETH token contract.** For example, if nothing happens to the smart contract, you always have access to your WETH tokens. | | Transfer | The transfer of ETH is intrinsic to the Ethereum protocol. Transfers are recorded on-chain and publicly verifiable. | **The transfer of WETH tokens occurs inside the WETH token contract and [isn’t directly recorded on-chain](https://coinmarketcap.com/alexandria/glossary/internal-transaction).** The blockchain only records the transaction authorizing the smart contract to deduct from the sender’s WETH balance. | -| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using WETH tokens (except when using a third-party relayers service). | +| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using WETH tokens (except when using a third-party relayer service). | ### Security considerations for using WETH {#weth-security-considerations} -As an asset native to Ethereum, the security of ETH is guaranteed by the Ethereum network—no one can steal your funds unless they have access to your private keys. Even in a [51% attack](https://academy.binance.com/en/glossary/51-percent-attack), attackers cannot create forged transactions to transfer ETH from your address without approval. -Wrapped Ether (WETH) is not issued and secured by the Ethereum network; and being a token, WETH exposes you to smart contract risks that ETH does not have. The WETH contract is considered very secure, but some hypothetical attack scenarios exist including: +As Ethereum's native asset, the security of ETH is guaranteed by the protocol—no one can steal your funds unless they have access to your private keys. Even in a [51% attack](https://academy.binance.com/en/glossary/51-percent-attack), attackers cannot create forged transactions to transfer ETH from your address without approval. + +In comparison, Wrapped Ether (WETH) is not issued and secured by the Ethereum network and using it may involve certain risks. Still, WETH is considered a safe asset to own and use (compared to similar wrapped tokens) due to its unique qualities: + +- **Simplistic design**: The canonical WETH smart contract has less than 60 lines of code and lacks complexities that can produce unintended bugs or exploitable vulnerabilities. +- **Zero admin controls**: Your interaction with WETH is fully **trustless** as no one has administrative control of the WETH token contract. As such, you don't have to worry about a malicious admin arbitrarily minting or burning tokens, censoring attempts to withdraw your ETH, or blacklisting transfers. +- **Non-upgradeable**: The WETH contract is non-upgradeable (unlike many variants) and has remained the same since its launch many years ago. +- **Extensively audited and tested**: Members of the Ethereum community (including auditors, developers, and security researchers) have tested the securityof the WETH contract before *and* after its launch. The WETH contract has also passed formal verification, which is considered the highest security standard for Ethereum-based applications. + +Now, while the WETH contract is considered very secure, some hypothetical attack scenarios exist including: - **An attacker mints WETH tokens without depositing ETH (the equivalent of printing money out of thin air)**. If the attacker successfully redeems these tokens for ETH, other owners may be unable to withdraw their ETH deposits. @@ -54,7 +64,7 @@ Wrapped Ether (WETH) is not issued and secured by the Ethereum network; and bein - **A smart contract bug prevents users from unwrapping WETH and withdrawing ETH deposits.** While the chances of this happening are low, it is still a feasible scenario that could affect the safety of WETH assets. -Note that these security considerations apply **only if you’re using WETH issued on Ethereum**. [Blockchain bridges](/bridges/) allow you to use ETH on non-Ethereum blockchains by issuing a variant of WETH compatible with another blockchain’s technical standards. +Note that these security considerations apply **only if you’re using WETH issued on Ethereum**. [Blockchain bridges](/bridges/) make ETH usable on a non-Ethereum blockchain by issuing a variant of WETH compatible that blockchain’s technical standards. But this introduces additional security issues other than those described previously. For example, you must also believe the bridge is secure against attacks, the bridge operator(s) won’t freeze or steal your funds, etc. @@ -62,11 +72,11 @@ But this introduces additional security issues other than those described previo **Are ETH and WETH the same?** -No. Ether (ETH) is the native coin of the Ethereum blockchain, used as a unit of payment on the Ethereum network (including paying for transaction fees). Wrapped Ether (WETH) is an ERC20-compatible version of ETH primarily designed to make ETH tokens compatible with applications built on the ERC-20 standard. +No. Ether (ETH) is the native coin of the Ethereum blockchain, used as a unit of payment on the Ethereum network (including paying for transaction fees). Wrapped Ether (WETH) is an ERC20-compliant version of ETH primarily designed to make ETH tokens compatible with applications built on the ERC-20 standard. **How does Wrapped Ether (WETH) work?** -Users wrap ETH by sending it to a smart that mints an equivalent amount of Wrapped ETH (WETH) in return. Another way to get wrapped ETH is to swap ETH for WETH tokens on a decentralized exchange (DEX). +Users wrap ETH by sending it to a smart contract that mints an equivalent amount of Wrapped ETH (WETH) in return. Another way to get wrapped ETH is to swap ETH for WETH tokens on a decentralized exchange (DEX). Unwrapping ETH requires a similar workflow: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. You can also unwrap ETH by swapping WETH for ETH directly using a decentralized exchange. **Do you pay to wrap/unwrap ETH?** @@ -91,15 +101,15 @@ WETH was created because the ETH token doesn't follow with the ERC-20 technical **Is WETH safe?** -ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. Nevertheless, WETH is generally considered safe because it is based on a simple, well-tested smart contract with a limited attack surface. The WETH contract has also passed formal verification, which is considered the highest security standard for Ethereum-based applications. +ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. Nevertheless, WETH is generally considered secure because it is based on a simple, battle-tested smart contract. The WETH contract has also beeen formally verified, which is the highest security standard for smart contracts on Ethereum. **Can I use WETH on other blockchains?** -Yes. If using a bridge, it is possible to get WETH tokens compatible with other blockchain protocols aside from Ethereum. These variants of WETH have different security properties from Ethereum-native WETH, however. For example, you must believe the bridge is well-secured and will let you redeem your WETH tokens for ETH. +Yes. If using a bridge, it is possible to get WETH tokens compatible with other blockchain protocols aside from Ethereum. These versions of WETH have different security properties from Ethereum-native WETH, however. For example, the bridge contact may be upgreadable or administered by a party with special priviledges. **What can I do with WETH?** -WETH can be used with any decentralized application built on the ERC-20 standard. WETH is particularly useful for decentralized finance (DeFi) applications—you can [exchange WETH for other tokens](/defi/#swaps) on a DEX, use it as collateral to [borrow funds](/defi/#borrowing-privacy), or supply liquidity to [lending platforms](/defi/#lending) in order to earn interest. +WETH can be used with any decentralized application built on the ERC-20 standard. WETH is particularly useful for decentralized finance (DeFi) applications—you can exchange WETH for other tokens on a DEX, use it as collateral to borrow funds, or supply liquidity to lending platforms in order to earn interest. ## Further reading {#further-reading} - [WTF is WETH?](https://weth.io/) From c2312846faf1ce062b4c4470ce2cadd6b6f22b10 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Tue, 21 Feb 2023 07:56:26 -0500 Subject: [PATCH 11/47] Update wrapped-ether.md Add intro to wrapped tokens section to provide more context for WETH --- src/content/wrapped-ether.md | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index 78741e1d167..32d63797d33 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -2,39 +2,35 @@ title: Wrapped Ether (WETH) description: An introduction to Wrapped Ether (WETH)—an ERC20-compatible version of Ether (ETH). --- - +--- # What Is Wrapped Ether (WETH)? {#what-is-wrapped-ether-weth} -Wrapped Ether (WETH) is an ERC-20 token representing Ether, Ethereum’s native coin. If you use Ethereum dapps, you've likely seen tokens built using the ERC-20 standard. The ERC-20 standard offers many benefits to developers and users, especially **flexibility** (tokens can be customized for different use cases) and **fungibility** (tokens are identical and interchangeable). - -Ether (ETH) doesn't comply with the ERC-20 standard, but there's significant demand to use it in ERC20-compatible wallets and dapps. Wrapped Ether (WETH) solves the problem by providing an ERC20-compliant version of ETH to use in dapps or swap with other ERC-20 tokens. As WETH is pegged to the price of ETH, using it will feel very similar to using native ETH. +Wrapped Ether (WETH) is an ERC-20 token representing Ether (ETH), Ethereum’s native coin. If you use Ethereum dapps, you've likely seen tokens built using the ERC-20 standard. The ERC-20 standard offers many benefits to developers and users, especially**flexibility** (tokens can be customized for different use cases) and **fungibility** (tokens are identical and interchangeable). -Wrapping Ether requires depositing ETH into a smart contract that creates an amount of WETH tokens equal to the original deposit; you can also “unwrap” Ether by sending WETH to the contract and receiving ETH in return. By locking up ETH before minting new tokens, the WETH contract ensures the value of WETH tokens in circulation is backed by ETH held in reserves. This keeps the prices WETH and ETH relatively equal, such that you can convert WETH to ETH (and vice-versa) at a 1:1 ratio +Ether (ETH) doesn't comply with the ERC-20 standard, but there's significant demand to use it in ERC20-compatible wallets and dapps. Wrapped Ether (WETH) solves the problem by providing an ERC20-compliant version of ETH to use in dapps or swap with other ERC-20 tokens. Today, **nearly 3% of the circulating ETH supply is locked in the WETH token contract**—inspiring its description as the "World's Most Popular Smart Contract". WETH is also one of the most used ERC-20 tokens, especially among users interacting with applications in Ethereum's Decentralized Finance (DeFi) ecosystem. -## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} -The [ERC-20 token standard](https://www.gemini.com/cryptopedia/erc20-token-standard-ethereum) was introduced to ensure greater interoperability between products and services on Ethereum. ERC-20 defines a standard interface for fungible tokens, making it easier for developers to build tokens that seamlessly interoperate with applications and other tokens in the Ethereum ecosystem. +## Introduction to wrapped tokens {#intro-to-wrapped-tokens} -But the creation of Ether predates the introduction of the ERC-20 standard, which means ETH tokens don’t conform to the ERC-20 specification. Wrapped Ether (WETH) was thus created to make ETH compatible with applications implementing ERC-20 interfaces. Compared to ETH, WETH is based on the ERC-20 standard and offers similar functionalities as other ERC-20 tokens (eg. the ability to approve token spends by third-party accounts). +A wrapped token is a token whose value is pegged to an underlying asset. An amount of the original asset is deposited into a smart contract—similar to a digital bank vault—that mints an equal amount of wrapped tokens. The vault holds the deposit until you're ready to exchange your wrapped tokens for the original asset (so you can think think of a wrapped token as a redeemable IOU issued by a smart contract). -Important to note is that there are other variants than the [canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described here. These may be custom tokens created by dapp developers or versions issued on other blockchains and may behave differently. **Always doubleck the token information to know which WETH implementation you're interacting with.** +Wrapping ETH today requires by depositing it in a smart contract which creates an amount of wrapped ETH (WETH) tokens equal to the original deposit. You can also “unwrap” ETH by sending WETH tokens to the contract and receiving ETH in return. -### What are the use cases for WETH? {#weth-use-cases} -As an ERC-20 token, WETH has more versatile use-cases, unlike ETH which is limited to making payments and paying for computation on the Ethereum network. Benefits of using WETH include: +In all cases, the conversion between WETH and ETH is always completed at a 1:1 ratio. Since the smart contract locks up ETH before minting WETH tokens, the value of WETH tokens in circulation is backed by ETH held in reserves. This keeps the prices of WETH and ETH relatively equal and ensures you can always swap both assets without realizing a loss. -1. **Exchange ETH for ERC-20 tokens** +## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} -You cannot exchange ETH directly for other ERC-20 tokens (not without introducing trusted third parties or complex technical processes). WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged 1:1 for other ERC20 tokens. +Common use cases for wrapping tokens include extending the functionality of a token, allowing a native cryptocurrency to behave like an ERC20 token, or allowing the use of a token outside its native blockchain. The [canonical implementation of Wrapped Ether (WETH)](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described here is designed for the former two use cases. -2. **Use ETH in dapps** +For example, the creation of Ether predates the introduction of the ERC-20 standard, which means ETH tokens don’t conform to the ERC-20 specification. Wrapped Ether (WETH) was thus created to **make ETH compatible with applications implementing ERC-20 interfaces**. -Because ETH isn’t ERC20-compatible, developers would need to create separate interfaces (one for ETH and another for ERC-20 tokens) in dapps. Wrapping ETH in ERC-20 standards using WETH removes this obstacle and enables developers to handle ETH and other tokens within the same dapp. +As a native cryptocurrency, the use of ETH is limited to transferring value and paying for computation on the Ethereum network. Transforming ETH into an ERC-20 token (WETH) increases the number of things you can do with it. Some use cases for WETH include: -3. **Interact with DeFi applications** +- **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens (not without introducing trusted third parties or complex technical processes). WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged 1:1 for other ERC-20 tokens. -Besides borrowing and lending, DeFi enables complex use-cases like [yield farms](https://blockworks.co/what-is-yield-farming-what-you-need-to-know/) and [automated market makers](https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers) (AMMs). These applications can make investment decisions on your behalf, such as automatically supplying liquidity to a lending pool or executing trades. +- **Use ETH in dapps**: Because ETH isn’t ERC20-compatible, developers would need to create separate interfaces (one for ETH and another for ERC-20 tokens) in dapps. Wrapping ETH in ERC-20 standards using WETH removes this obstacle and enables developers to handle ETH and other tokens within the same dapp. -That said, these applications can only work if they have access to funds in your wallet. With ERC-20 tokens like WETH, you can approve a smart contract to deduct WETH tokens from your balance up to a predefined limit. This feature is, however, unavailable when using native ETH. +- **Interact with DeFi applications**: DeFi enables complex use-cases like [yield farms](https://blockworks.co/what-is-yield-farming-what-you-need-to-know/) and [automated market makers](https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers) (AMMs), but these applications need access to funds in your wallet to work. With ERC-20 tokens like WETH, you can approve a smart contract to deduct WETH tokens from your balance up to a predefined limit (a feature that's unavailable when using native ETH). ## Wrapped Ether (WETH) vs Ether (ETH): What is the difference? {#weth-vs-eth-differences} Although they look similar, Wrapped Ether (WETH) and Ether (ETH) have subtle differences you should be aware of. For example, the Ethereum protocol recognizes Ether—but it has no native knowledge of WETH (and ERC-20 tokens), causing both assets to behave differently. We have listed other important distinctions between ETH and WETH tokens below: @@ -103,9 +99,9 @@ WETH was created because the ETH token doesn't follow with the ERC-20 technical ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. Nevertheless, WETH is generally considered secure because it is based on a simple, battle-tested smart contract. The WETH contract has also beeen formally verified, which is the highest security standard for smart contracts on Ethereum. -**Can I use WETH on other blockchains?** +**Why am I seeing different types of WETH?** -Yes. If using a bridge, it is possible to get WETH tokens compatible with other blockchain protocols aside from Ethereum. These versions of WETH have different security properties from Ethereum-native WETH, however. For example, the bridge contact may be upgreadable or administered by a party with special priviledges. +Besides the canonical implementation of WETH described om this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** **What can I do with WETH?** From 8db2c41e73409b80835e56702024e9a2f5214097 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Tue, 21 Feb 2023 10:35:47 -0500 Subject: [PATCH 12/47] Update wrapped-ether.md --- src/content/wrapped-ether.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index 32d63797d33..0a2c5801e1a 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -38,7 +38,7 @@ Although they look similar, Wrapped Ether (WETH) and Ether (ETH) have subtle dif | | **Ether (ETH)** | **Wrapped Ether (WETH)** | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Supply | **As Ethereum’s native token, the supply of ETH is managed by the protocol.** The supply of ETH increases when Ethereum validators earn rewards for processing transactions and creating blocks. | **WETH is an ERC-20 token whose supply is managed by a smart contract.** New units of WETH are issued by the contract after it receives ETH deposits from users. | -| Ownership | **Ownership of ETH is defined and guaranteed by the Ethereum blockchain.** For example, protocol rules ensure you can always spend from an account’s ETH balance if you control the [private key](/glossary/#private-key). | **Ownership of WETH depends on the WETH token contract.** For example, if nothing happens to the smart contract, you always have access to your WETH tokens. | +| Ownership | **Ownership of ETH is defined and guaranteed by the Ethereum blockchain.** For example, protocol rules ensure you can always spend from an account’s ETH balance if you control the [private key](/glossary/#private-key). | **Ownership of WETH depends on the WETH token contract.** The contract defines ownership of WETH tokens and determines the conditions under which you can access your WETH balance. | | Transfer | The transfer of ETH is intrinsic to the Ethereum protocol. Transfers are recorded on-chain and publicly verifiable. | **The transfer of WETH tokens occurs inside the WETH token contract and [isn’t directly recorded on-chain](https://coinmarketcap.com/alexandria/glossary/internal-transaction).** The blockchain only records the transaction authorizing the smart contract to deduct from the sender’s WETH balance. | | Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using WETH tokens (except when using a third-party relayer service). | ### Security considerations for using WETH {#weth-security-considerations} From d98943896222810498fa3593388c22e0e7c53cdd Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Wed, 22 Feb 2023 07:21:14 -0500 Subject: [PATCH 13/47] Apply suggestions from code review Co-authored-by: Jakub <100724231+konopkja@users.noreply.github.com> --- src/content/wrapped-ether.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index 0a2c5801e1a..f28369608fd 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -4,17 +4,17 @@ description: An introduction to Wrapped Ether (WETH)—an ERC20-compatible versi --- --- # What Is Wrapped Ether (WETH)? {#what-is-wrapped-ether-weth} -Wrapped Ether (WETH) is an ERC-20 token representing Ether (ETH), Ethereum’s native coin. If you use Ethereum dapps, you've likely seen tokens built using the ERC-20 standard. The ERC-20 standard offers many benefits to developers and users, especially**flexibility** (tokens can be customized for different use cases) and **fungibility** (tokens are identical and interchangeable). +Wrapped Ether (WETH) is an ERC-20 token representing Ethereum’s native Ether (ETH) coin. As a native cryptocurrency, the use of ETH is limited to transferring value and paying for computation on the Ethereum network. Using ETH in dapps is technically difficult because of its limitations. -Ether (ETH) doesn't comply with the ERC-20 standard, but there's significant demand to use it in ERC20-compatible wallets and dapps. Wrapped Ether (WETH) solves the problem by providing an ERC20-compliant version of ETH to use in dapps or swap with other ERC-20 tokens. +Transforming ETH into an ERC-20 token (WETH) increases the number of things you can do with it. Because there's significant demand to use ETH in the ecosystem, wrapped Ether (WETH) solves this problem by providing an ERC20-compliant version of ETH to use in dapps or swap with other ERC-20 tokens. -Today, **nearly 3% of the circulating ETH supply is locked in the WETH token contract**—inspiring its description as the "World's Most Popular Smart Contract". WETH is also one of the most used ERC-20 tokens, especially among users interacting with applications in Ethereum's Decentralized Finance (DeFi) ecosystem. +Today, **nearly 3% of the circulating ETH supply is locked in the WETH token contract** making it one of the most popular smart contracts. WETH is especially popular with users interacting with applications in Ethereum's Decentralized Finance (DeFi) ecosystem. -## Introduction to wrapped tokens {#intro-to-wrapped-tokens} +## What are wrapped tokens? {#intro-to-wrapped-tokens} A wrapped token is a token whose value is pegged to an underlying asset. An amount of the original asset is deposited into a smart contract—similar to a digital bank vault—that mints an equal amount of wrapped tokens. The vault holds the deposit until you're ready to exchange your wrapped tokens for the original asset (so you can think think of a wrapped token as a redeemable IOU issued by a smart contract). -Wrapping ETH today requires by depositing it in a smart contract which creates an amount of wrapped ETH (WETH) tokens equal to the original deposit. You can also “unwrap” ETH by sending WETH tokens to the contract and receiving ETH in return. +Wrapping ETH today requires depositing it in a smart contract which creates an amount of wrapped ETH (WETH) tokens equal to the original deposit. You can also “unwrap” ETH by sending WETH tokens to the contract and receiving ETH in return. In all cases, the conversion between WETH and ETH is always completed at a 1:1 ratio. Since the smart contract locks up ETH before minting WETH tokens, the value of WETH tokens in circulation is backed by ETH held in reserves. This keeps the prices of WETH and ETH relatively equal and ensures you can always swap both assets without realizing a loss. @@ -24,7 +24,7 @@ Common use cases for wrapping tokens include extending the functionality of a to For example, the creation of Ether predates the introduction of the ERC-20 standard, which means ETH tokens don’t conform to the ERC-20 specification. Wrapped Ether (WETH) was thus created to **make ETH compatible with applications implementing ERC-20 interfaces**. -As a native cryptocurrency, the use of ETH is limited to transferring value and paying for computation on the Ethereum network. Transforming ETH into an ERC-20 token (WETH) increases the number of things you can do with it. Some use cases for WETH include: +Some use cases for WETH include: - **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens (not without introducing trusted third parties or complex technical processes). WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged 1:1 for other ERC-20 tokens. @@ -37,7 +37,7 @@ Although they look similar, Wrapped Ether (WETH) and Ether (ETH) have subtle dif | | **Ether (ETH)** | **Wrapped Ether (WETH)** | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Supply | **As Ethereum’s native token, the supply of ETH is managed by the protocol.** The supply of ETH increases when Ethereum validators earn rewards for processing transactions and creating blocks. | **WETH is an ERC-20 token whose supply is managed by a smart contract.** New units of WETH are issued by the contract after it receives ETH deposits from users. | +| Supply | **The supply of ETH is managed by the protocol.** The supply of ETH increases when Ethereum validators earn rewards for processing transactions and creating blocks. | **WETH is an ERC-20 token whose supply is managed by a smart contract.** New units of WETH are issued by the contract after it receives ETH deposits from users. | | Ownership | **Ownership of ETH is defined and guaranteed by the Ethereum blockchain.** For example, protocol rules ensure you can always spend from an account’s ETH balance if you control the [private key](/glossary/#private-key). | **Ownership of WETH depends on the WETH token contract.** The contract defines ownership of WETH tokens and determines the conditions under which you can access your WETH balance. | | Transfer | The transfer of ETH is intrinsic to the Ethereum protocol. Transfers are recorded on-chain and publicly verifiable. | **The transfer of WETH tokens occurs inside the WETH token contract and [isn’t directly recorded on-chain](https://coinmarketcap.com/alexandria/glossary/internal-transaction).** The blockchain only records the transaction authorizing the smart contract to deduct from the sender’s WETH balance. | | Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using WETH tokens (except when using a third-party relayer service). | @@ -50,7 +50,7 @@ In comparison, Wrapped Ether (WETH) is not issued and secured by the Ethereum ne - **Simplistic design**: The canonical WETH smart contract has less than 60 lines of code and lacks complexities that can produce unintended bugs or exploitable vulnerabilities. - **Zero admin controls**: Your interaction with WETH is fully **trustless** as no one has administrative control of the WETH token contract. As such, you don't have to worry about a malicious admin arbitrarily minting or burning tokens, censoring attempts to withdraw your ETH, or blacklisting transfers. - **Non-upgradeable**: The WETH contract is non-upgradeable (unlike many variants) and has remained the same since its launch many years ago. -- **Extensively audited and tested**: Members of the Ethereum community (including auditors, developers, and security researchers) have tested the securityof the WETH contract before *and* after its launch. The WETH contract has also passed formal verification, which is considered the highest security standard for Ethereum-based applications. +- **Extensively audited and tested**: Members of the Ethereum community (including auditors, developers, and security researchers) have tested the security of the WETH contract before *and* after its launch. The WETH contract has also passed formal verification, which is considered the highest security standard for Ethereum-based applications. Now, while the WETH contract is considered very secure, some hypothetical attack scenarios exist including: From 752eec63e6e57ce585a6611c83dee600bd44ec62 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Wed, 22 Feb 2023 08:26:08 -0500 Subject: [PATCH 14/47] Update wrapped-ether.md --- src/content/wrapped-ether.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index f28369608fd..ceac724b4cb 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -12,7 +12,7 @@ Today, **nearly 3% of the circulating ETH supply is locked in the WETH token con ## What are wrapped tokens? {#intro-to-wrapped-tokens} -A wrapped token is a token whose value is pegged to an underlying asset. An amount of the original asset is deposited into a smart contract—similar to a digital bank vault—that mints an equal amount of wrapped tokens. The vault holds the deposit until you're ready to exchange your wrapped tokens for the original asset (so you can think think of a wrapped token as a redeemable IOU issued by a smart contract). +A wrapped token is a token whose value is pegged to an underlying asset. An amount of the original asset is deposited into a smart contract—similar to a digital bank vault—that mints an equal amount of wrapped tokens. The vault holds the deposit until you're ready to exchange your wrapped tokens for the original asset. Wrapping ETH today requires depositing it in a smart contract which creates an amount of wrapped ETH (WETH) tokens equal to the original deposit. You can also “unwrap” ETH by sending WETH tokens to the contract and receiving ETH in return. @@ -20,11 +20,11 @@ In all cases, the conversion between WETH and ETH is always completed at a 1:1 r ## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} -Common use cases for wrapping tokens include extending the functionality of a token, allowing a native cryptocurrency to behave like an ERC20 token, or allowing the use of a token outside its native blockchain. The [canonical implementation of Wrapped Ether (WETH)](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described here is designed for the former two use cases. +Common use cases for wrapping tokens include extending the functionality of a token and allowing the use of a token outside its native blockchain. With Wrapped Ether (WETH), the goal is to make ETH more useful by giving it the features of an ERC-20 token. -For example, the creation of Ether predates the introduction of the ERC-20 standard, which means ETH tokens don’t conform to the ERC-20 specification. Wrapped Ether (WETH) was thus created to **make ETH compatible with applications implementing ERC-20 interfaces**. +For context, [ERC-20](https://www.gemini.com/en-US/cryptopedia/erc20-token-standard-ethereum) defines a standard interface for fungible tokens, so anyone can create tokens that interact seamlessly with applications and other tokens in Ethereum's ecosystem. But, as the creation of Ether predates the ERC-20 standard, ETH tokens don’t conform to this specification. This means you can't easily exchange ETH for other ERC-20 tokens or use ETH coins in dapps built according to the ERC-20 standard. -Some use cases for WETH include: +Wrapped Ether (WETH) was created to **make ETH compatible with applications and tokens implementing ERC-20 interfaces**. WETH also extends the functionality of native ETH token and gives you the opportunity to do the following: - **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens (not without introducing trusted third parties or complex technical processes). WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged 1:1 for other ERC-20 tokens. @@ -101,7 +101,7 @@ ETH is the safest asset because it is part of the Ethereum protocol, whereas WET **Why am I seeing different types of WETH?** -Besides the canonical implementation of WETH described om this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** +Besides the {canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described om this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** **What can I do with WETH?** From 603dcae651fc35e99cf63adcf7a7eda75a0bb5e0 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Wed, 22 Feb 2023 08:59:45 -0500 Subject: [PATCH 15/47] Update wrapped-ether.md Add guide on how to add WETH to Metamask --- src/content/wrapped-ether.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index ceac724b4cb..5d3a5f0d9d5 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -99,19 +99,21 @@ WETH was created because the ETH token doesn't follow with the ERC-20 technical ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. Nevertheless, WETH is generally considered secure because it is based on a simple, battle-tested smart contract. The WETH contract has also beeen formally verified, which is the highest security standard for smart contracts on Ethereum. -**Why am I seeing different types of WETH?** +**Why am I seeing different WETH tokens?** -Besides the {canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described om this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** +Besides the [canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described om this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** -**What can I do with WETH?** +**How can I add WETH to my Metamask wallet?** -WETH can be used with any decentralized application built on the ERC-20 standard. WETH is particularly useful for decentralized finance (DeFi) applications—you can exchange WETH for other tokens on a DEX, use it as collateral to borrow funds, or supply liquidity to lending platforms in order to earn interest. +The easiest way to add WETH on Metamask is to use the "Import Tokens" feature: search for "wrapped ether" and select WETH as the token you want to import. You'll need to make sure your Metamask wallet is connected to Ethereum Mainnet before trying to add WETH to your wallet. + +Alternatively, you can add WETH to Metamask by clicking the "Custom Token" button (after selecting "Import Tokens"). Copy the WETH contract address from [Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) and paste into the "Token Contract Address" field. If the contract address is correct, WETH should appear as the Token Symbol, after which you'll need to confirm importing WETH before it appears in your wallet. ## Further reading {#further-reading} - [WTF is WETH?](https://weth.io/) -- [What Is Wrapped Ether (WETH) and How to Wrap It?](https://academy.binance.com/en/articles/what-is-wrapped-ether-weth-and-how-to-wrap-it) - [What are the cheapest ways to wrap ETH into WETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) - [WETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) +- [How To add Wrapped Ether (WETH) to Metamask](https://isitcrypto.com/add-weth-to-metamask/) - [Formal Verification of WETH](https://zellic.io/blog/formal-verification-weth) From b330f225d58b5a47546e7f24dfd06e74add43145 Mon Sep 17 00:00:00 2001 From: Emmanuel Awosika Date: Wed, 22 Feb 2023 09:01:54 -0500 Subject: [PATCH 16/47] Update wrapped-ether.md --- src/content/wrapped-ether.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/wrapped-ether.md b/src/content/wrapped-ether.md index 5d3a5f0d9d5..4e7b3cabffc 100644 --- a/src/content/wrapped-ether.md +++ b/src/content/wrapped-ether.md @@ -101,7 +101,7 @@ ETH is the safest asset because it is part of the Ethereum protocol, whereas WET **Why am I seeing different WETH tokens?** -Besides the [canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described om this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** +Besides the [canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described on this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** **How can I add WETH to my Metamask wallet?** From 4e2acf6b241c45b17edacb867bf2a0a1fec2e634 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 11 Mar 2024 09:59:58 -0600 Subject: [PATCH 17/47] setup wrapped-ether page in new repo structure --- public/content/{wrapped-ether.md => wrapped-ether/index.md} | 3 ++- src/lib/utils/gh.ts | 6 +++++- src/lib/utils/md.ts | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) rename public/content/{wrapped-ether.md => wrapped-ether/index.md} (99%) diff --git a/public/content/wrapped-ether.md b/public/content/wrapped-ether/index.md similarity index 99% rename from public/content/wrapped-ether.md rename to public/content/wrapped-ether/index.md index 4e7b3cabffc..205d36d3089 100644 --- a/public/content/wrapped-ether.md +++ b/public/content/wrapped-ether/index.md @@ -1,8 +1,9 @@ --- title: Wrapped Ether (WETH) description: An introduction to Wrapped Ether (WETH)—an ERC20-compatible version of Ether (ETH). +lang: en --- ---- + # What Is Wrapped Ether (WETH)? {#what-is-wrapped-ether-weth} Wrapped Ether (WETH) is an ERC-20 token representing Ethereum’s native Ether (ETH) coin. As a native cryptocurrency, the use of ETH is limited to transferring value and paying for computation on the Ethereum network. Using ETH in dapps is technically difficult because of its limitations. diff --git a/src/lib/utils/gh.ts b/src/lib/utils/gh.ts index 617d74b024e..934a6b634b8 100644 --- a/src/lib/utils/gh.ts +++ b/src/lib/utils/gh.ts @@ -13,12 +13,16 @@ const getGitLogFromPath = (path: string): string => { const extractDateFromGitLogInfo = (logInfo: string): string => { // Filter commit date in log and return date using ISOString format (same that GH API uses) - const lastCommitDate = logInfo + try { + const lastCommitDate = logInfo .split("\n") .filter((x) => x.startsWith("Date: "))[0] .slice("Date:".length) .trim() return new Date(lastCommitDate).toISOString() + } catch { + return new Date().toISOString() + } } // This util filters the git log to get the file last commit info, and then the commit date (last update) diff --git a/src/lib/utils/md.ts b/src/lib/utils/md.ts index d4577b25132..8f4e6dc8767 100644 --- a/src/lib/utils/md.ts +++ b/src/lib/utils/md.ts @@ -264,6 +264,7 @@ const getPostSlugs = (dir: string, files: string[] = []) => { "/terms-of-use", "/web3", "/whitepaper", + "/wrapped-ether", "/zero-knowledge-proofs", ] From 222732cd03c14534209b721864e72b7dcaf52fae Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Tue, 12 Mar 2024 23:50:18 -0600 Subject: [PATCH 18/47] rework weth intro --- public/content/wrapped-ether/index.md | 45 ++++++++------------------- src/intl/en/common.json | 1 + 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 205d36d3089..af707fd389c 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -1,45 +1,34 @@ --- -title: Wrapped Ether (WETH) +title: What is Wrapped Ether (WETH) description: An introduction to Wrapped Ether (WETH)—an ERC20-compatible version of Ether (ETH). lang: en --- -# What Is Wrapped Ether (WETH)? {#what-is-wrapped-ether-weth} -Wrapped Ether (WETH) is an ERC-20 token representing Ethereum’s native Ether (ETH) coin. As a native cryptocurrency, the use of ETH is limited to transferring value and paying for computation on the Ethereum network. Using ETH in dapps is technically difficult because of its limitations. +# Wrapped Ether (WETH) -Transforming ETH into an ERC-20 token (WETH) increases the number of things you can do with it. Because there's significant demand to use ETH in the ecosystem, wrapped Ether (WETH) solves this problem by providing an ERC20-compliant version of ETH to use in dapps or swap with other ERC-20 tokens. +[Ether](/eth) (ETH) is the native token on Ethereum, and is used for staking, as a currency and paying for gas fees for computation. However, ETH has limitations in how it can interact with assets and applications built on top of Ethereum, like ERC-20 tokens. In order for ETH to be able to interact with ERC-20 tokens, it must conform with the ERC-20 standard. -Today, **nearly 3% of the circulating ETH supply is locked in the WETH token contract** making it one of the most popular smart contracts. WETH is especially popular with users interacting with applications in Ethereum's Decentralized Finance (DeFi) ecosystem. +To bridge this gap, wrapped ETH (wETH) was created. Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract, and receive 1 minted wETH with conforms to the ERC-20 token standard. However, wETH is a representation of ETH that allows you to interact with ETH as an ERC-20, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. -## What are wrapped tokens? {#intro-to-wrapped-tokens} +You are able to unwrap wETH for ETH by using the wETH smart contract. You can deposit 1 wETH back into the wETH smart contract, and you will receive 1 ETH. The wETH deposited is then burned and taken out of the circulating supply of wETH. -A wrapped token is a token whose value is pegged to an underlying asset. An amount of the original asset is deposited into a smart contract—similar to a digital bank vault—that mints an equal amount of wrapped tokens. The vault holds the deposit until you're ready to exchange your wrapped tokens for the original asset. +Roughly 3% of the circulating ETH supply is locked in the WETH token contract making it one of the most used smart contracts. WETH is especially important with users interacting with applications in decentralized finance (DeFi). -Wrapping ETH today requires depositing it in a smart contract which creates an amount of wrapped ETH (WETH) tokens equal to the original deposit. You can also “unwrap” ETH by sending WETH tokens to the contract and receiving ETH in return. +## Why do we need to wrap ETH as an ERC-20? {#why-do-we-need-to-wrap-eth} -In all cases, the conversion between WETH and ETH is always completed at a 1:1 ratio. Since the smart contract locks up ETH before minting WETH tokens, the value of WETH tokens in circulation is backed by ETH held in reserves. This keeps the prices of WETH and ETH relatively equal and ensures you can always swap both assets without realizing a loss. +[ERC-20](/developers/docs/standards/tokens/erc-20/) defines a standard interface for fungible tokens, so anyone can create tokens that interact seamlessly with applications and tokens that use this standard in Ethereum's ecosystem. Since ETH predates the ERC-20 standard, ETH doesn't conform to this specification. This means you can't easily exchange ETH for other ERC-20 tokens or use ETH in apps using the ERC-20 standard. Wrapping ETH gives you the opportunity to do the following: -## Why do we need to wrap ETH? {#why-do-we-need-to-wrap-eth} +- **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens. WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged with other ERC-20 tokens. -Common use cases for wrapping tokens include extending the functionality of a token and allowing the use of a token outside its native blockchain. With Wrapped Ether (WETH), the goal is to make ETH more useful by giving it the features of an ERC-20 token. - -For context, [ERC-20](https://www.gemini.com/en-US/cryptopedia/erc20-token-standard-ethereum) defines a standard interface for fungible tokens, so anyone can create tokens that interact seamlessly with applications and other tokens in Ethereum's ecosystem. But, as the creation of Ether predates the ERC-20 standard, ETH tokens don’t conform to this specification. This means you can't easily exchange ETH for other ERC-20 tokens or use ETH coins in dapps built according to the ERC-20 standard. - -Wrapped Ether (WETH) was created to **make ETH compatible with applications and tokens implementing ERC-20 interfaces**. WETH also extends the functionality of native ETH token and gives you the opportunity to do the following: - -- **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens (not without introducing trusted third parties or complex technical processes). WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged 1:1 for other ERC-20 tokens. - -- **Use ETH in dapps**: Because ETH isn’t ERC20-compatible, developers would need to create separate interfaces (one for ETH and another for ERC-20 tokens) in dapps. Wrapping ETH in ERC-20 standards using WETH removes this obstacle and enables developers to handle ETH and other tokens within the same dapp. - -- **Interact with DeFi applications**: DeFi enables complex use-cases like [yield farms](https://blockworks.co/what-is-yield-farming-what-you-need-to-know/) and [automated market makers](https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers) (AMMs), but these applications need access to funds in your wallet to work. With ERC-20 tokens like WETH, you can approve a smart contract to deduct WETH tokens from your balance up to a predefined limit (a feature that's unavailable when using native ETH). +- **Use ETH in dapps**: Because ETH isn’t ERC20-compatible, developers would need to create separate interfaces (one for ETH and another for ERC-20 tokens) in dapps. Wrapping ETH removes this obstacle and enables developers to handle ETH and other tokens within the same dapp. Many decentralized finance applications use this standard, and create markets for exchanging these tokens. ## Wrapped Ether (WETH) vs Ether (ETH): What is the difference? {#weth-vs-eth-differences} -Although they look similar, Wrapped Ether (WETH) and Ether (ETH) have subtle differences you should be aware of. For example, the Ethereum protocol recognizes Ether—but it has no native knowledge of WETH (and ERC-20 tokens), causing both assets to behave differently. We have listed other important distinctions between ETH and WETH tokens below: + | | **Ether (ETH)** | **Wrapped Ether (WETH)** | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Supply | **The supply of ETH is managed by the protocol.** The supply of ETH increases when Ethereum validators earn rewards for processing transactions and creating blocks. | **WETH is an ERC-20 token whose supply is managed by a smart contract.** New units of WETH are issued by the contract after it receives ETH deposits from users. | -| Ownership | **Ownership of ETH is defined and guaranteed by the Ethereum blockchain.** For example, protocol rules ensure you can always spend from an account’s ETH balance if you control the [private key](/glossary/#private-key). | **Ownership of WETH depends on the WETH token contract.** The contract defines ownership of WETH tokens and determines the conditions under which you can access your WETH balance. | +| Supply | The supply of ETH is managed by the Ethereum protocol. The [issuance](/roadmap/merge/issuance) of ETH is handled by Ethereum validators when processing transactions and creating blocks. | WETH is an ERC-20 token whose supply is managed by a smart contract. New units of WETH are issued by the contract after it receives ETH deposits from users, or units of wETH are burned when a user wishes to redeem wETH for ETH. | +| Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of WETH managed by the WETH token smart contract, not the Ethereum protocol. | | Transfer | The transfer of ETH is intrinsic to the Ethereum protocol. Transfers are recorded on-chain and publicly verifiable. | **The transfer of WETH tokens occurs inside the WETH token contract and [isn’t directly recorded on-chain](https://coinmarketcap.com/alexandria/glossary/internal-transaction).** The blockchain only records the transaction authorizing the smart contract to deduct from the sender’s WETH balance. | | Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using WETH tokens (except when using a third-party relayer service). | ### Security considerations for using WETH {#weth-security-considerations} @@ -53,14 +42,6 @@ In comparison, Wrapped Ether (WETH) is not issued and secured by the Ethereum ne - **Non-upgradeable**: The WETH contract is non-upgradeable (unlike many variants) and has remained the same since its launch many years ago. - **Extensively audited and tested**: Members of the Ethereum community (including auditors, developers, and security researchers) have tested the security of the WETH contract before *and* after its launch. The WETH contract has also passed formal verification, which is considered the highest security standard for Ethereum-based applications. -Now, while the WETH contract is considered very secure, some hypothetical attack scenarios exist including: - -- **An attacker mints WETH tokens without depositing ETH (the equivalent of printing money out of thin air)**. If the attacker successfully redeems these tokens for ETH, other owners may be unable to withdraw their ETH deposits. - -- **An attacker exploits a vulnerability that allows them to drain the WETH contract of ETH deposited by users**. This would leave users with valueless WETH tokens without any backing. - -- **A smart contract bug prevents users from unwrapping WETH and withdrawing ETH deposits.** While the chances of this happening are low, it is still a feasible scenario that could affect the safety of WETH assets. - Note that these security considerations apply **only if you’re using WETH issued on Ethereum**. [Blockchain bridges](/bridges/) make ETH usable on a non-Ethereum blockchain by issuing a variant of WETH compatible that blockchain’s technical standards. But this introduces additional security issues other than those described previously. For example, you must also believe the bridge is secure against attacks, the bridge operator(s) won’t freeze or steal your funds, etc. diff --git a/src/intl/en/common.json b/src/intl/en/common.json index a1669ab757e..028c32e79d6 100644 --- a/src/intl/en/common.json +++ b/src/intl/en/common.json @@ -341,6 +341,7 @@ "what-is-ether": "What is ether (ETH)?", "what-is-ethereum": "What is Ethereum?", "withdrawals": "Staking withdrawals", + "wrapped-ether": "Wrapped Ether", "yes": "Yes", "zero-knowledge-proofs": "Zero-knowledge proofs" } From 3cb77f8915c62fdb8336c117089c42a66cb29197 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 18 Mar 2024 09:30:24 -0600 Subject: [PATCH 19/47] edits --- public/content/wrapped-ether/index.md | 94 ++++++++------------------- 1 file changed, 26 insertions(+), 68 deletions(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index af707fd389c..016d6c1cf35 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -1,10 +1,10 @@ --- -title: What is Wrapped Ether (WETH) -description: An introduction to Wrapped Ether (WETH)—an ERC20-compatible version of Ether (ETH). +title: What is Wrapped Ether (wETH) +description: An introduction to Wrapped Ether (wETH)—an ERC20-compatible version of Ether (ETH). lang: en --- -# Wrapped Ether (WETH) +# Wrapped Ether (wETH) [Ether](/eth) (ETH) is the native token on Ethereum, and is used for staking, as a currency and paying for gas fees for computation. However, ETH has limitations in how it can interact with assets and applications built on top of Ethereum, like ERC-20 tokens. In order for ETH to be able to interact with ERC-20 tokens, it must conform with the ERC-20 standard. @@ -12,90 +12,48 @@ To bridge this gap, wrapped ETH (wETH) was created. Wrapped ETH is a smart contr You are able to unwrap wETH for ETH by using the wETH smart contract. You can deposit 1 wETH back into the wETH smart contract, and you will receive 1 ETH. The wETH deposited is then burned and taken out of the circulating supply of wETH. -Roughly 3% of the circulating ETH supply is locked in the WETH token contract making it one of the most used smart contracts. WETH is especially important with users interacting with applications in decentralized finance (DeFi). +Roughly 3% of the circulating ETH supply is locked in the wETH token contract making it one of the most used smart contracts. wETH is especially important with users interacting with applications in decentralized finance (DeFi). ## Why do we need to wrap ETH as an ERC-20? {#why-do-we-need-to-wrap-eth} [ERC-20](/developers/docs/standards/tokens/erc-20/) defines a standard interface for fungible tokens, so anyone can create tokens that interact seamlessly with applications and tokens that use this standard in Ethereum's ecosystem. Since ETH predates the ERC-20 standard, ETH doesn't conform to this specification. This means you can't easily exchange ETH for other ERC-20 tokens or use ETH in apps using the ERC-20 standard. Wrapping ETH gives you the opportunity to do the following: -- **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens. WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged with other ERC-20 tokens. +- **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens. wETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged with other ERC-20 tokens. - **Use ETH in dapps**: Because ETH isn’t ERC20-compatible, developers would need to create separate interfaces (one for ETH and another for ERC-20 tokens) in dapps. Wrapping ETH removes this obstacle and enables developers to handle ETH and other tokens within the same dapp. Many decentralized finance applications use this standard, and create markets for exchanging these tokens. -## Wrapped Ether (WETH) vs Ether (ETH): What is the difference? {#weth-vs-eth-differences} +## Wrapped Ether (wETH) vs Ether (ETH): What is the difference? {#weth-vs-eth-differences} -| | **Ether (ETH)** | **Wrapped Ether (WETH)** | +| | **Ether (ETH)** | **Wrapped Ether (wETH)** | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Supply | The supply of ETH is managed by the Ethereum protocol. The [issuance](/roadmap/merge/issuance) of ETH is handled by Ethereum validators when processing transactions and creating blocks. | WETH is an ERC-20 token whose supply is managed by a smart contract. New units of WETH are issued by the contract after it receives ETH deposits from users, or units of wETH are burned when a user wishes to redeem wETH for ETH. | -| Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of WETH managed by the WETH token smart contract, not the Ethereum protocol. | -| Transfer | The transfer of ETH is intrinsic to the Ethereum protocol. Transfers are recorded on-chain and publicly verifiable. | **The transfer of WETH tokens occurs inside the WETH token contract and [isn’t directly recorded on-chain](https://coinmarketcap.com/alexandria/glossary/internal-transaction).** The blockchain only records the transaction authorizing the smart contract to deduct from the sender’s WETH balance. | -| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using WETH tokens (except when using a third-party relayer service). | -### Security considerations for using WETH {#weth-security-considerations} +| Supply | The supply of ETH is managed by the Ethereum protocol. The [issuance](/roadmap/merge/issuance) of ETH is handled by Ethereum validators when processing transactions and creating blocks. | wETH is an ERC-20 token whose supply is managed by a smart contract. New units of wETH are issued by the contract after it receives ETH deposits from users, or units of wETH are burned when a user wishes to redeem wETH for ETH. | +| Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of wETH managed by the wETH token smart contract, not the Ethereum protocol. | +| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using wETH tokens (except when using a third-party relayer service). | -As Ethereum's native asset, the security of ETH is guaranteed by the protocol—no one can steal your funds unless they have access to your private keys. Even in a [51% attack](https://academy.binance.com/en/glossary/51-percent-attack), attackers cannot create forged transactions to transfer ETH from your address without approval. +## Frequently Asked Questions + + -In comparison, Wrapped Ether (WETH) is not issued and secured by the Ethereum network and using it may involve certain risks. Still, WETH is considered a safe asset to own and use (compared to similar wrapped tokens) due to its unique qualities: +You pay gas fees to wrap or unwrap ETH using the wETH contract. -- **Simplistic design**: The canonical WETH smart contract has less than 60 lines of code and lacks complexities that can produce unintended bugs or exploitable vulnerabilities. -- **Zero admin controls**: Your interaction with WETH is fully **trustless** as no one has administrative control of the WETH token contract. As such, you don't have to worry about a malicious admin arbitrarily minting or burning tokens, censoring attempts to withdraw your ETH, or blacklisting transfers. -- **Non-upgradeable**: The WETH contract is non-upgradeable (unlike many variants) and has remained the same since its launch many years ago. -- **Extensively audited and tested**: Members of the Ethereum community (including auditors, developers, and security researchers) have tested the security of the WETH contract before *and* after its launch. The WETH contract has also passed formal verification, which is considered the highest security standard for Ethereum-based applications. + -Note that these security considerations apply **only if you’re using WETH issued on Ethereum**. [Blockchain bridges](/bridges/) make ETH usable on a non-Ethereum blockchain by issuing a variant of WETH compatible that blockchain’s technical standards. + -But this introduces additional security issues other than those described previously. For example, you must also believe the bridge is secure against attacks, the bridge operator(s) won’t freeze or steal your funds, etc. +Nevertheless, wETH is generally considered secure because it is based on a simple, battle-tested smart contract. The wETH contract has also beeen formally verified, which is the highest security standard for smart contracts on Ethereum. -## Frequently Asked Questions about Wrapped Ether (WETH) {#weth-frequently-asked-questions} + -**Are ETH and WETH the same?** + -No. Ether (ETH) is the native coin of the Ethereum blockchain, used as a unit of payment on the Ethereum network (including paying for transaction fees). Wrapped Ether (WETH) is an ERC20-compliant version of ETH primarily designed to make ETH tokens compatible with applications built on the ERC-20 standard. +Besides the [canonical implementation of wETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described on this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which wETH implementation you're interacting with.** -**How does Wrapped Ether (WETH) work?** - -Users wrap ETH by sending it to a smart contract that mints an equivalent amount of Wrapped ETH (WETH) in return. Another way to get wrapped ETH is to swap ETH for WETH tokens on a decentralized exchange (DEX). -Unwrapping ETH requires a similar workflow: send WETH to the smart contract and have an equivalent amount of ETH sent to your address. You can also unwrap ETH by swapping WETH for ETH directly using a decentralized exchange. - -**Do you pay to wrap/unwrap ETH?** - -No. You don’t pay to wrap ETH into WETH, as the assets are converted at a 1:1 ratio. However, interacting with the WETH contract to wrap/unwrap ETH involves sending an on-chain transaction—and this requires paying a gas fee. DEX platforms also charge for gas when executing swaps between ETH and WETH (or vice-versa). - -**Can I pay for gas with WETH?** - -No. Ethereum nodes only accept ETH as payment for gas fees. You can only pay for gas in WETH only if using a third-party relayer that accepts the (signed) transaction off-chain and broadcasts it on-chain on your behalf. Typically, [relayers](https://blog.kyros.ventures/2022/07/24/meta-transaction-relayer-an-overview/) pay the gas fee for a relayed transactions from their ETH balance and accept payment for the service in ERC-20 tokens like WETH. - -**Are WETH and ETH the same price?** - -WETH is pegged 1:1 to the price of ETH, so the value of both assets are usually equal at any time. This peg is maintained by ensuring that every unit of WETH is backed by ETH held in reserves. Forces of supply and demand also keep the prices of ETH and WETH relatively equal: - -- If WETH were cheaper, more people would buy it and convert it to the more expensive ETH at a 1:1 ratio to make profit. This would drive up demand for WETH and increase the price of WETH tokens. - -- If WETH is more expensive, more people would buy ETH and convert it to WETH to sell at a profit. As the supply of WETH increases, the value of WETH tokens would drop—keeping the peg relatively stable. - -**Why do people use WETH instead of ETH?** - -WETH was created because the ETH token doesn't follow with the ERC-20 technical specification, making it difficult to use in decentralized applications (dapps). Unlike Ether, WETH follows the ERC-20 standard and is compatible with applications, such as decentralized exchanges and wallets, that support ERC-20 interfaces. WETH is also tradeable for other ERC-20 tokens while directly exchanging ETH for ERC-20 tokens requires complex accounting. - -**Is WETH safe?** - -ETH is the safest asset because it is part of the Ethereum protocol, whereas WETH is defined in a smart contract which could feasibly be hacked. Nevertheless, WETH is generally considered secure because it is based on a simple, battle-tested smart contract. The WETH contract has also beeen formally verified, which is the highest security standard for smart contracts on Ethereum. - -**Why am I seeing different WETH tokens?** - -Besides the [canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described on this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** - -**How can I add WETH to my Metamask wallet?** - -The easiest way to add WETH on Metamask is to use the "Import Tokens" feature: search for "wrapped ether" and select WETH as the token you want to import. You'll need to make sure your Metamask wallet is connected to Ethereum Mainnet before trying to add WETH to your wallet. - -Alternatively, you can add WETH to Metamask by clicking the "Custom Token" button (after selecting "Import Tokens"). Copy the WETH contract address from [Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) and paste into the "Token Contract Address" field. If the contract address is correct, WETH should appear as the Token Symbol, after which you'll need to confirm importing WETH before it appears in your wallet. + ## Further reading {#further-reading} -- [WTF is WETH?](https://weth.io/) -- [What are the cheapest ways to wrap ETH into WETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) -- [WETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) -- [How To add Wrapped Ether (WETH) to Metamask](https://isitcrypto.com/add-weth-to-metamask/) -- [Formal Verification of WETH](https://zellic.io/blog/formal-verification-weth) - - +- [WTF is wETH?](https://weth.io/) +- [What are the cheapest ways to wrap ETH into wETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) +- [wETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) +- [How To add Wrapped Ether (wETH) to Metamask](https://isitcrypto.com/add-weth-to-metamask/) +- [Formal Verification of wETH](https://zellic.io/blog/formal-verification-weth) From dd6324d2ddc887eb174a9cc1b270fd7ef1bc9c1e Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Mon, 18 Mar 2024 10:07:52 -0700 Subject: [PATCH 20/47] Update public/content/wrapped-ether/index.md Co-authored-by: Joshua <62268199+minimalsm@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 016d6c1cf35..528b887aa74 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -8,7 +8,7 @@ lang: en [Ether](/eth) (ETH) is the native token on Ethereum, and is used for staking, as a currency and paying for gas fees for computation. However, ETH has limitations in how it can interact with assets and applications built on top of Ethereum, like ERC-20 tokens. In order for ETH to be able to interact with ERC-20 tokens, it must conform with the ERC-20 standard. -To bridge this gap, wrapped ETH (wETH) was created. Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract, and receive 1 minted wETH with conforms to the ERC-20 token standard. However, wETH is a representation of ETH that allows you to interact with ETH as an ERC-20, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. +To bridge this gap, wrapped ETH (wETH) was created. Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted wETH that conforms to the ERC-20 token standard. wETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. You are able to unwrap wETH for ETH by using the wETH smart contract. You can deposit 1 wETH back into the wETH smart contract, and you will receive 1 ETH. The wETH deposited is then burned and taken out of the circulating supply of wETH. From 7e6c477a0ea07df7698fc87958342f17729a2e94 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:21:11 -0600 Subject: [PATCH 21/47] Update public/content/wrapped-ether/index.md Co-authored-by: Joshua <62268199+minimalsm@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 528b887aa74..16f2720035b 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -1,6 +1,6 @@ --- title: What is Wrapped Ether (wETH) -description: An introduction to Wrapped Ether (wETH)—an ERC20-compatible version of Ether (ETH). +description: An introduction to Wrapped ether (wETH)—an ERC20-compatible wrapper for ether (ETH). lang: en --- From d7aa8ff2f38fa6f2937586170d5629e7e93aca2a Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:22:08 -0600 Subject: [PATCH 22/47] Update public/content/wrapped-ether/index.md Co-authored-by: Joshua <62268199+minimalsm@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 16f2720035b..91d0497e84d 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -4,7 +4,7 @@ description: An introduction to Wrapped ether (wETH)—an ERC20-compatible wrapp lang: en --- -# Wrapped Ether (wETH) +# Wrapped ether (wETH) {#intro-to-weth} [Ether](/eth) (ETH) is the native token on Ethereum, and is used for staking, as a currency and paying for gas fees for computation. However, ETH has limitations in how it can interact with assets and applications built on top of Ethereum, like ERC-20 tokens. In order for ETH to be able to interact with ERC-20 tokens, it must conform with the ERC-20 standard. From 20568d6cddda2cf404cc8334292cd994e37507ce Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:22:38 -0600 Subject: [PATCH 23/47] Update public/content/wrapped-ether/index.md Co-authored-by: Jakub <100724231+konopkja@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 91d0497e84d..18c752aae30 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -8,7 +8,7 @@ lang: en [Ether](/eth) (ETH) is the native token on Ethereum, and is used for staking, as a currency and paying for gas fees for computation. However, ETH has limitations in how it can interact with assets and applications built on top of Ethereum, like ERC-20 tokens. In order for ETH to be able to interact with ERC-20 tokens, it must conform with the ERC-20 standard. -To bridge this gap, wrapped ETH (wETH) was created. Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted wETH that conforms to the ERC-20 token standard. wETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. +To bridge this gap, wrapped ETH (wETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted wETH** that conforms to the ERC-20 token standard. wETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. You are able to unwrap wETH for ETH by using the wETH smart contract. You can deposit 1 wETH back into the wETH smart contract, and you will receive 1 ETH. The wETH deposited is then burned and taken out of the circulating supply of wETH. From 8a8ced96a91cb7128ccdc70d06a369b38ab02afa Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:25:04 -0600 Subject: [PATCH 24/47] Update public/content/wrapped-ether/index.md Co-authored-by: Jakub <100724231+konopkja@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 18c752aae30..0620d3102bb 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -12,7 +12,7 @@ To bridge this gap, wrapped ETH (wETH) was created. **Wrapped ETH is a smart con You are able to unwrap wETH for ETH by using the wETH smart contract. You can deposit 1 wETH back into the wETH smart contract, and you will receive 1 ETH. The wETH deposited is then burned and taken out of the circulating supply of wETH. -Roughly 3% of the circulating ETH supply is locked in the wETH token contract making it one of the most used smart contracts. wETH is especially important with users interacting with applications in decentralized finance (DeFi). +**Roughly 3% of the circulating ETH supply is locked in the wETH token contract** making it one of the most used [smart contracts](/glossary/#smart-contract). wETH is especially important with users interacting with applications in decentralized finance (DeFi). ## Why do we need to wrap ETH as an ERC-20? {#why-do-we-need-to-wrap-eth} From fc62e46a2bbcebe560f4bb396375e5627d6fd216 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:25:28 -0600 Subject: [PATCH 25/47] Update public/content/wrapped-ether/index.md Co-authored-by: Jakub <100724231+konopkja@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 0620d3102bb..458b8799f1d 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -16,7 +16,7 @@ You are able to unwrap wETH for ETH by using the wETH smart contract. You can de ## Why do we need to wrap ETH as an ERC-20? {#why-do-we-need-to-wrap-eth} -[ERC-20](/developers/docs/standards/tokens/erc-20/) defines a standard interface for fungible tokens, so anyone can create tokens that interact seamlessly with applications and tokens that use this standard in Ethereum's ecosystem. Since ETH predates the ERC-20 standard, ETH doesn't conform to this specification. This means you can't easily exchange ETH for other ERC-20 tokens or use ETH in apps using the ERC-20 standard. Wrapping ETH gives you the opportunity to do the following: +[ERC-20](/developers/docs/standards/tokens/erc-20/) defines a standard interface for fungible tokens, so anyone can create tokens that interact seamlessly with applications and tokens that use this standard in Ethereum's ecosystem. Since **ETH predates the ERC-20 standard**, ETH doesn't conform to this specification. This means **you can't easily** exchange ETH for other ERC-20 tokens or **use ETH in apps using the ERC-20 standard**. Wrapping ETH gives you the opportunity to do the following: - **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens. wETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged with other ERC-20 tokens. From 240f08568be34cc7222060dc685d12b40c786cf0 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:25:37 -0600 Subject: [PATCH 26/47] Update public/content/wrapped-ether/index.md Co-authored-by: Joshua <62268199+minimalsm@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 458b8799f1d..f0483661cc6 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -22,7 +22,7 @@ You are able to unwrap wETH for ETH by using the wETH smart contract. You can de - **Use ETH in dapps**: Because ETH isn’t ERC20-compatible, developers would need to create separate interfaces (one for ETH and another for ERC-20 tokens) in dapps. Wrapping ETH removes this obstacle and enables developers to handle ETH and other tokens within the same dapp. Many decentralized finance applications use this standard, and create markets for exchanging these tokens. -## Wrapped Ether (wETH) vs Ether (ETH): What is the difference? {#weth-vs-eth-differences} +## Wrapped ether (wETH) vs ether (ETH): What is the difference? {#weth-vs-eth-differences} | | **Ether (ETH)** | **Wrapped Ether (wETH)** | From 00096ae679d2bf1a625243e3c7289f2a4f71dbc0 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:25:52 -0600 Subject: [PATCH 27/47] Update public/content/wrapped-ether/index.md Co-authored-by: Joshua <62268199+minimalsm@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index f0483661cc6..e6f63f4dde3 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -31,7 +31,7 @@ You are able to unwrap wETH for ETH by using the wETH smart contract. You can de | Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of wETH managed by the wETH token smart contract, not the Ethereum protocol. | | Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using wETH tokens (except when using a third-party relayer service). | -## Frequently Asked Questions +## Frequently asked questions {#faq} From 07220fac3bae3cdb8e2d14f9d912cd46dcf37dcf Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:26:14 -0600 Subject: [PATCH 28/47] Update public/content/wrapped-ether/index.md Co-authored-by: Joshua <62268199+minimalsm@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index e6f63f4dde3..43a9a775e07 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -52,6 +52,7 @@ Besides the [canonical implementation of wETH](https://blog.0xproject.com/canoni ## Further reading {#further-reading} + - [WTF is wETH?](https://weth.io/) - [What are the cheapest ways to wrap ETH into wETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) - [wETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) From 2e4ab9297fed2ecc75052eaf3dfe366da83dabd3 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:26:26 -0600 Subject: [PATCH 29/47] Update public/content/wrapped-ether/index.md Co-authored-by: Jakub <100724231+konopkja@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 43a9a775e07..82c6fa10c6c 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -47,7 +47,7 @@ Nevertheless, wETH is generally considered secure because it is based on a simpl -Besides the [canonical implementation of wETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described on this page, there are other variants in the wild. These may be custom tokens created by dapp developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which wETH implementation you're interacting with.** +Besides the [canonical implementation of wETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described on this page, there are other variants in the wild. These may be custom tokens created by app developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which wETH implementation you're interacting with.** From 9cbc2cd29b0f89437bbf0ffe43e1e924b0dfbbb3 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:48:11 -0600 Subject: [PATCH 30/47] Update public/content/wrapped-ether/index.md Co-authored-by: Jakub <100724231+konopkja@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index 82c6fa10c6c..c0a0a01c8a9 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -6,7 +6,7 @@ lang: en # Wrapped ether (wETH) {#intro-to-weth} -[Ether](/eth) (ETH) is the native token on Ethereum, and is used for staking, as a currency and paying for gas fees for computation. However, ETH has limitations in how it can interact with assets and applications built on top of Ethereum, like ERC-20 tokens. In order for ETH to be able to interact with ERC-20 tokens, it must conform with the ERC-20 standard. +Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. However, **ETH can't easily interact with Ethereum applications and ERC-20 tokens**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. To bridge this gap, wrapped ETH (wETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted wETH** that conforms to the ERC-20 token standard. wETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. From 59a6cb8cfcaff765b2b54186bb12a9e216010bdf Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 10:50:42 -0600 Subject: [PATCH 31/47] Update public/content/wrapped-ether/index.md Co-authored-by: Joshua <62268199+minimalsm@users.noreply.github.com> --- public/content/wrapped-ether/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index c0a0a01c8a9..e3f6b4cd331 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -29,7 +29,7 @@ You are able to unwrap wETH for ETH by using the wETH smart contract. You can de |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Supply | The supply of ETH is managed by the Ethereum protocol. The [issuance](/roadmap/merge/issuance) of ETH is handled by Ethereum validators when processing transactions and creating blocks. | wETH is an ERC-20 token whose supply is managed by a smart contract. New units of wETH are issued by the contract after it receives ETH deposits from users, or units of wETH are burned when a user wishes to redeem wETH for ETH. | | Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of wETH managed by the wETH token smart contract, not the Ethereum protocol. | -| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | You cannot pay gas for a transaction using wETH tokens (except when using a third-party relayer service). | +| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | Paying gas with wETH tokens is not natively supported. | ## Frequently asked questions {#faq} From 5f4348b47813c8aead49d0d92aec10ce75defc84 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 11:00:46 -0600 Subject: [PATCH 32/47] Glossary use --- public/content/wrapped-ether/index.md | 4 ++-- src/layouts/Static.tsx | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index e3f6b4cd331..d15d9e18ed6 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -6,13 +6,13 @@ lang: en # Wrapped ether (wETH) {#intro-to-weth} -Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. However, **ETH can't easily interact with Ethereum applications and ERC-20 tokens**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. +Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. However, **ETH can't easily interact with Ethereum applications and ERC-20 tokens**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. To bridge this gap, wrapped ETH (wETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted wETH** that conforms to the ERC-20 token standard. wETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. You are able to unwrap wETH for ETH by using the wETH smart contract. You can deposit 1 wETH back into the wETH smart contract, and you will receive 1 ETH. The wETH deposited is then burned and taken out of the circulating supply of wETH. -**Roughly 3% of the circulating ETH supply is locked in the wETH token contract** making it one of the most used [smart contracts](/glossary/#smart-contract). wETH is especially important with users interacting with applications in decentralized finance (DeFi). +**Roughly 3% of the circulating ETH supply is locked in the wETH token contract** making it one of the most used smart contracts. wETH is especially important with users interacting with applications in decentralized finance (DeFi). ## Why do we need to wrap ETH as an ERC-20? {#why-do-we-need-to-wrap-eth} diff --git a/src/layouts/Static.tsx b/src/layouts/Static.tsx index d84deb10ab3..139c7f59e85 100644 --- a/src/layouts/Static.tsx +++ b/src/layouts/Static.tsx @@ -11,6 +11,7 @@ import DevconGrantsBanner from "@/components/DevconGrantsBanner" import EnergyConsumptionChart from "@/components/EnergyConsumptionChart" import FeedbackCard from "@/components/FeedbackCard" import GlossaryDefinition from "@/components/Glossary/GlossaryDefinition" +import GlossaryTooltip from "@/components/Glossary/GlossaryTooltip" import { HubHero } from "@/components/Hero" import NetworkUpgradeSummary from "@/components/History/NetworkUpgradeSummary" import Link from "@/components/Link" @@ -66,6 +67,7 @@ export const staticComponents = { Contributors, EnergyConsumptionChart, GlossaryDefinition, + GlossaryTooltip, Icon, Link, Logo, From 8810d72d319f206678b9c8ed0f94e4cb6dc922ea Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 11:02:05 -0600 Subject: [PATCH 33/47] copy fixes --- public/content/wrapped-ether/index.md | 44 +++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-ether/index.md index d15d9e18ed6..5bd503efb03 100644 --- a/public/content/wrapped-ether/index.md +++ b/public/content/wrapped-ether/index.md @@ -1,60 +1,60 @@ --- -title: What is Wrapped Ether (wETH) -description: An introduction to Wrapped ether (wETH)—an ERC20-compatible wrapper for ether (ETH). +title: What is Wrapped Ether (WETH) +description: An introduction to Wrapped ether (WETH)—an ERC20-compatible wrapper for ether (ETH). lang: en --- -# Wrapped ether (wETH) {#intro-to-weth} +# Wrapped ether (WETH) {#intro-to-weth} Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. However, **ETH can't easily interact with Ethereum applications and ERC-20 tokens**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. -To bridge this gap, wrapped ETH (wETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted wETH** that conforms to the ERC-20 token standard. wETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. +To bridge this gap, wrapped ETH (WETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted WETH** that conforms to the ERC-20 token standard. WETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. -You are able to unwrap wETH for ETH by using the wETH smart contract. You can deposit 1 wETH back into the wETH smart contract, and you will receive 1 ETH. The wETH deposited is then burned and taken out of the circulating supply of wETH. +You are able to unwrap WETH for ETH by using the WETH smart contract. You can deposit 1 WETH back into the WETH smart contract, and you will receive 1 ETH. The WETH deposited is then burned and taken out of the circulating supply of WETH. -**Roughly 3% of the circulating ETH supply is locked in the wETH token contract** making it one of the most used smart contracts. wETH is especially important with users interacting with applications in decentralized finance (DeFi). +**Roughly 3% of the circulating ETH supply is locked in the WETH token contract** making it one of the most used smart contracts. WETH is especially important with users interacting with applications in decentralized finance (DeFi). ## Why do we need to wrap ETH as an ERC-20? {#why-do-we-need-to-wrap-eth} [ERC-20](/developers/docs/standards/tokens/erc-20/) defines a standard interface for fungible tokens, so anyone can create tokens that interact seamlessly with applications and tokens that use this standard in Ethereum's ecosystem. Since **ETH predates the ERC-20 standard**, ETH doesn't conform to this specification. This means **you can't easily** exchange ETH for other ERC-20 tokens or **use ETH in apps using the ERC-20 standard**. Wrapping ETH gives you the opportunity to do the following: -- **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens. wETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged with other ERC-20 tokens. +- **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens. WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged with other ERC-20 tokens. - **Use ETH in dapps**: Because ETH isn’t ERC20-compatible, developers would need to create separate interfaces (one for ETH and another for ERC-20 tokens) in dapps. Wrapping ETH removes this obstacle and enables developers to handle ETH and other tokens within the same dapp. Many decentralized finance applications use this standard, and create markets for exchanging these tokens. -## Wrapped ether (wETH) vs ether (ETH): What is the difference? {#weth-vs-eth-differences} +## Wrapped ether (WETH) vs ether (ETH): What is the difference? {#weth-vs-eth-differences} -| | **Ether (ETH)** | **Wrapped Ether (wETH)** | +| | **Ether (ETH)** | **Wrapped Ether (WETH)** | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Supply | The supply of ETH is managed by the Ethereum protocol. The [issuance](/roadmap/merge/issuance) of ETH is handled by Ethereum validators when processing transactions and creating blocks. | wETH is an ERC-20 token whose supply is managed by a smart contract. New units of wETH are issued by the contract after it receives ETH deposits from users, or units of wETH are burned when a user wishes to redeem wETH for ETH. | -| Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of wETH managed by the wETH token smart contract, not the Ethereum protocol. | -| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | Paying gas with wETH tokens is not natively supported. | +| Supply | The supply of ETH is managed by the Ethereum protocol. The [issuance](/roadmap/merge/issuance) of ETH is handled by Ethereum validators when processing transactions and creating blocks. | WETH is an ERC-20 token whose supply is managed by a smart contract. New units of WETH are issued by the contract after it receives ETH deposits from users, or units of WETH are burned when a user wishes to redeem WETH for ETH. | +| Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of WETH managed by the WETH token smart contract, not the Ethereum protocol. | +| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | Paying gas with WETH tokens is not natively supported. | ## Frequently asked questions {#faq} -You pay gas fees to wrap or unwrap ETH using the wETH contract. +You pay gas fees to wrap or unwrap ETH using the WETH contract. - + -Nevertheless, wETH is generally considered secure because it is based on a simple, battle-tested smart contract. The wETH contract has also beeen formally verified, which is the highest security standard for smart contracts on Ethereum. +WETH is generally considered secure because it is based on a simple, battle-tested smart contract. The WETH contract has also beeen formally verified, which is the highest security standard for smart contracts on Ethereum. - + -Besides the [canonical implementation of wETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described on this page, there are other variants in the wild. These may be custom tokens created by app developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which wETH implementation you're interacting with.** +Besides the [canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described on this page, there are other variants in the wild. These may be custom tokens created by app developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** ## Further reading {#further-reading} -- [WTF is wETH?](https://weth.io/) -- [What are the cheapest ways to wrap ETH into wETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) -- [wETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) -- [How To add Wrapped Ether (wETH) to Metamask](https://isitcrypto.com/add-weth-to-metamask/) -- [Formal Verification of wETH](https://zellic.io/blog/formal-verification-weth) +- [WTF is WETH?](https://weth.io/) +- [What are the cheapest ways to wrap ETH into WETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) +- [WETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) +- [How To add Wrapped Ether (WETH) to Metamask](https://isitcrypto.com/add-weth-to-metamask/) +- [Formal Verification of WETH](https://zellic.io/blog/formal-verification-weth) From 76eb2b112da9f9e05bd5c1c83cd080eb1d5410e7 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 11:03:09 -0600 Subject: [PATCH 34/47] wrapped-ether -> wrapped-eth --- public/content/{wrapped-ether => wrapped-eth}/index.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename public/content/{wrapped-ether => wrapped-eth}/index.md (100%) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-eth/index.md similarity index 100% rename from public/content/wrapped-ether/index.md rename to public/content/wrapped-eth/index.md From 0f874e4232c677fa503f52af320b7769b88f1ddd Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 11:07:18 -0600 Subject: [PATCH 35/47] change requests --- public/content/wrapped-eth/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/content/wrapped-eth/index.md b/public/content/wrapped-eth/index.md index 5bd503efb03..a79de24f927 100644 --- a/public/content/wrapped-eth/index.md +++ b/public/content/wrapped-eth/index.md @@ -10,13 +10,13 @@ Ether (ETH) is the main currency of Ethereum. It's used for several purposes lik To bridge this gap, wrapped ETH (WETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted WETH** that conforms to the ERC-20 token standard. WETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. -You are able to unwrap WETH for ETH by using the WETH smart contract. You can deposit 1 WETH back into the WETH smart contract, and you will receive 1 ETH. The WETH deposited is then burned and taken out of the circulating supply of WETH. +You are able to unwrap WETH for ETH by using the WETH smart contract. You can redeem 1 WETH with the WETH smart contract, and you will receive 1 ETH. The WETH deposited is then burned and taken out of the circulating supply of WETH. **Roughly 3% of the circulating ETH supply is locked in the WETH token contract** making it one of the most used smart contracts. WETH is especially important with users interacting with applications in decentralized finance (DeFi). ## Why do we need to wrap ETH as an ERC-20? {#why-do-we-need-to-wrap-eth} -[ERC-20](/developers/docs/standards/tokens/erc-20/) defines a standard interface for fungible tokens, so anyone can create tokens that interact seamlessly with applications and tokens that use this standard in Ethereum's ecosystem. Since **ETH predates the ERC-20 standard**, ETH doesn't conform to this specification. This means **you can't easily** exchange ETH for other ERC-20 tokens or **use ETH in apps using the ERC-20 standard**. Wrapping ETH gives you the opportunity to do the following: +[ERC-20](/developers/docs/standards/tokens/erc-20/) defines a standard interface for transferable tokens, so anyone can create tokens that interact seamlessly with applications and tokens that use this standard in Ethereum's ecosystem. Since **ETH predates the ERC-20 standard**, ETH doesn't conform to this specification. This means **you can't easily** exchange ETH for other ERC-20 tokens or **use ETH in apps using the ERC-20 standard**. Wrapping ETH gives you the opportunity to do the following: - **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens. WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged with other ERC-20 tokens. @@ -28,7 +28,7 @@ You are able to unwrap WETH for ETH by using the WETH smart contract. You can de | | **Ether (ETH)** | **Wrapped Ether (WETH)** | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Supply | The supply of ETH is managed by the Ethereum protocol. The [issuance](/roadmap/merge/issuance) of ETH is handled by Ethereum validators when processing transactions and creating blocks. | WETH is an ERC-20 token whose supply is managed by a smart contract. New units of WETH are issued by the contract after it receives ETH deposits from users, or units of WETH are burned when a user wishes to redeem WETH for ETH. | -| Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of WETH managed by the WETH token smart contract, not the Ethereum protocol. | +| Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of WETH managed by the WETH token smart contract, secured by the Ethereum protocol. | | Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | Paying gas with WETH tokens is not natively supported. | ## Frequently asked questions {#faq} From 1ac0a024e36a6f614558042b2261b56a8aa327ef Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 11:25:53 -0600 Subject: [PATCH 36/47] reword --- public/content/wrapped-eth/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-eth/index.md b/public/content/wrapped-eth/index.md index a79de24f927..a9de831a6ba 100644 --- a/public/content/wrapped-eth/index.md +++ b/public/content/wrapped-eth/index.md @@ -6,7 +6,7 @@ lang: en # Wrapped ether (WETH) {#intro-to-weth} -Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. However, **ETH can't easily interact with Ethereum applications and ERC-20 tokens**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. +Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. **WETH is effectively an upgraded form of ETH with some additional functionality required by many applications and ERC-20 tokens Date: Thu, 21 Mar 2024 11:26:44 -0600 Subject: [PATCH 37/47] fix broken element --- public/content/wrapped-eth/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/content/wrapped-eth/index.md b/public/content/wrapped-eth/index.md index a9de831a6ba..813e55b6539 100644 --- a/public/content/wrapped-eth/index.md +++ b/public/content/wrapped-eth/index.md @@ -6,7 +6,7 @@ lang: en # Wrapped ether (WETH) {#intro-to-weth} -Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. **WETH is effectively an upgraded form of ETH with some additional functionality required by many applications and ERC-20 tokensERC-20 tokens**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. To bridge this gap, wrapped ETH (WETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted WETH** that conforms to the ERC-20 token standard. WETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. From 764c469c714cc54b3c6153a1576c4fb2799998b5 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 11:34:39 -0600 Subject: [PATCH 38/47] change requests --- public/content/wrapped-eth/index.md | 6 +++--- src/lib/utils/md.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/content/wrapped-eth/index.md b/public/content/wrapped-eth/index.md index 813e55b6539..a1546b2c3b8 100644 --- a/public/content/wrapped-eth/index.md +++ b/public/content/wrapped-eth/index.md @@ -6,13 +6,13 @@ lang: en # Wrapped ether (WETH) {#intro-to-weth} -Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. **WETH is effectively an upgraded form of ETH with some additional functionality required by many applications and ERC-20 tokens**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. +Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. **WETH is effectively an upgraded form of ETH with some additional functionality required by many applications and [ERC-20 tokens](/glossary/#erc-20)**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. To bridge this gap, wrapped ETH (WETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted WETH** that conforms to the ERC-20 token standard. WETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. You are able to unwrap WETH for ETH by using the WETH smart contract. You can redeem 1 WETH with the WETH smart contract, and you will receive 1 ETH. The WETH deposited is then burned and taken out of the circulating supply of WETH. -**Roughly 3% of the circulating ETH supply is locked in the WETH token contract** making it one of the most used smart contracts. WETH is especially important with users interacting with applications in decentralized finance (DeFi). +**Roughly ~3% of the circulating ETH supply is locked in the WETH token contract** making it one of the most used [smart contracts](/glossary/#smart-contract). WETH is especially important with users interacting with applications in decentralized finance (DeFi). ## Why do we need to wrap ETH as an ERC-20? {#why-do-we-need-to-wrap-eth} @@ -28,7 +28,7 @@ You are able to unwrap WETH for ETH by using the WETH smart contract. You can re | | **Ether (ETH)** | **Wrapped Ether (WETH)** | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Supply | The supply of ETH is managed by the Ethereum protocol. The [issuance](/roadmap/merge/issuance) of ETH is handled by Ethereum validators when processing transactions and creating blocks. | WETH is an ERC-20 token whose supply is managed by a smart contract. New units of WETH are issued by the contract after it receives ETH deposits from users, or units of WETH are burned when a user wishes to redeem WETH for ETH. | -| Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of WETH managed by the WETH token smart contract, secured by the Ethereum protocol. | +| Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of WETH is managed by the WETH token smart contract, secured by the Ethereum protocol. | | Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | Paying gas with WETH tokens is not natively supported. | ## Frequently asked questions {#faq} diff --git a/src/lib/utils/md.ts b/src/lib/utils/md.ts index 7305d8ef1d2..e7e243d57f0 100644 --- a/src/lib/utils/md.ts +++ b/src/lib/utils/md.ts @@ -266,7 +266,7 @@ const getPostSlugs = (dir: string, files: string[] = []) => { "/terms-of-use", "/web3", "/whitepaper", - "/wrapped-ether", + "/wrapped-eth", "/zero-knowledge-proofs", ] From 2f8d01735f9f2c0ccabf793027a56f56b88d3c40 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 11:39:43 -0600 Subject: [PATCH 39/47] change requests --- public/content/wrapped-eth/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/content/wrapped-eth/index.md b/public/content/wrapped-eth/index.md index a1546b2c3b8..be9e2926e36 100644 --- a/public/content/wrapped-eth/index.md +++ b/public/content/wrapped-eth/index.md @@ -6,7 +6,7 @@ lang: en # Wrapped ether (WETH) {#intro-to-weth} -Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for computational services. **WETH is effectively an upgraded form of ETH with some additional functionality required by many applications and [ERC-20 tokens](/glossary/#erc-20)**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. +Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for gas fees for computation. **WETH is effectively an upgraded form of ETH with some additional functionality required by many applications and [ERC-20 tokens](/glossary/#erc-20)**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. To bridge this gap, wrapped ETH (WETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted WETH** that conforms to the ERC-20 token standard. WETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. @@ -18,7 +18,7 @@ You are able to unwrap WETH for ETH by using the WETH smart contract. You can re [ERC-20](/developers/docs/standards/tokens/erc-20/) defines a standard interface for transferable tokens, so anyone can create tokens that interact seamlessly with applications and tokens that use this standard in Ethereum's ecosystem. Since **ETH predates the ERC-20 standard**, ETH doesn't conform to this specification. This means **you can't easily** exchange ETH for other ERC-20 tokens or **use ETH in apps using the ERC-20 standard**. Wrapping ETH gives you the opportunity to do the following: -- **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens. WETH is a representation of Ether that complies with the ERC-20 fungible token standard and can be exchanged with other ERC-20 tokens. +- **Exchange ETH for ERC-20 tokens**: You cannot exchange ETH directly for other ERC-20 tokens. WETH is a representation of ether that complies with the ERC-20 fungible token standard and can be exchanged with other ERC-20 tokens. - **Use ETH in dapps**: Because ETH isn’t ERC20-compatible, developers would need to create separate interfaces (one for ETH and another for ERC-20 tokens) in dapps. Wrapping ETH removes this obstacle and enables developers to handle ETH and other tokens within the same dapp. Many decentralized finance applications use this standard, and create markets for exchanging these tokens. @@ -29,7 +29,7 @@ You are able to unwrap WETH for ETH by using the WETH smart contract. You can re |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Supply | The supply of ETH is managed by the Ethereum protocol. The [issuance](/roadmap/merge/issuance) of ETH is handled by Ethereum validators when processing transactions and creating blocks. | WETH is an ERC-20 token whose supply is managed by a smart contract. New units of WETH are issued by the contract after it receives ETH deposits from users, or units of WETH are burned when a user wishes to redeem WETH for ETH. | | Ownership | Ownership is managed by the Ethereum protocol through your account balance. | Ownership of WETH is managed by the WETH token smart contract, secured by the Ethereum protocol. | -| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of Ether). | Paying gas with WETH tokens is not natively supported. | +| Gas | Ether (ETH) is the accepted unit of payment for computation on the Ethereum network. Gas fees are denominated in gwei (a unit of ether). | Paying gas with WETH tokens is not natively supported. | ## Frequently asked questions {#faq} @@ -47,7 +47,7 @@ WETH is generally considered secure because it is based on a simple, battle-test -Besides the [canonical implementation of WETH](https://blog.0xproject.com/canonical-weth-a9aa7d0279dd) described on this page, there are other variants in the wild. These may be custom tokens created by app developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** +Besides the [canonical implementation of WETH](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) described on this page, there are other variants in the wild. These may be custom tokens created by app developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** From 6cc21c6802cb6c5c610dd2466848c55eb407fcd5 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 21 Mar 2024 11:43:38 -0600 Subject: [PATCH 40/47] remove further reading articles --- public/content/wrapped-eth/index.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/public/content/wrapped-eth/index.md b/public/content/wrapped-eth/index.md index be9e2926e36..422b691c557 100644 --- a/public/content/wrapped-eth/index.md +++ b/public/content/wrapped-eth/index.md @@ -54,7 +54,5 @@ Besides the [canonical implementation of WETH](https://etherscan.io/token/0xc02a ## Further reading {#further-reading} - [WTF is WETH?](https://weth.io/) -- [What are the cheapest ways to wrap ETH into WETH?](https://medium.com/@therugpush/cheapest-way-to-wrap-eth-into-weth-446cf1ddccf7) - [WETH token information on Etherscan](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) -- [How To add Wrapped Ether (WETH) to Metamask](https://isitcrypto.com/add-weth-to-metamask/) - [Formal Verification of WETH](https://zellic.io/blog/formal-verification-weth) From f5038db3b2152f0271ff59dd8b43fe7040d77071 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Fri, 22 Mar 2024 13:45:10 -0700 Subject: [PATCH 41/47] chore: rename to wrapped-eth --- public/content/{wrapped-ether => wrapped-eth}/index.md | 0 src/lib/utils/md.ts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename public/content/{wrapped-ether => wrapped-eth}/index.md (100%) diff --git a/public/content/wrapped-ether/index.md b/public/content/wrapped-eth/index.md similarity index 100% rename from public/content/wrapped-ether/index.md rename to public/content/wrapped-eth/index.md diff --git a/src/lib/utils/md.ts b/src/lib/utils/md.ts index 7305d8ef1d2..e7e243d57f0 100644 --- a/src/lib/utils/md.ts +++ b/src/lib/utils/md.ts @@ -266,7 +266,7 @@ const getPostSlugs = (dir: string, files: string[] = []) => { "/terms-of-use", "/web3", "/whitepaper", - "/wrapped-ether", + "/wrapped-eth", "/zero-knowledge-proofs", ] From 3191a1192875e536ef095c1b8776530e809c6987 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 25 Mar 2024 15:39:40 -0600 Subject: [PATCH 42/47] wording around conversion --- public/content/wrapped-eth/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/content/wrapped-eth/index.md b/public/content/wrapped-eth/index.md index 422b691c557..ccd443eca47 100644 --- a/public/content/wrapped-eth/index.md +++ b/public/content/wrapped-eth/index.md @@ -8,9 +8,9 @@ lang: en Ether (ETH) is the main currency of Ethereum. It's used for several purposes like staking, as a currency, and paying for gas fees for computation. **WETH is effectively an upgraded form of ETH with some additional functionality required by many applications and [ERC-20 tokens](/glossary/#erc-20)**, which are other types of digital assets on Ethereum. To work with these tokens, ETH must follow the same rules they do, known as the ERC-20 standard. -To bridge this gap, wrapped ETH (WETH) was created. **Wrapped ETH is a smart contract that lets you deposit 1 ETH into the contract and receive 1 minted WETH** that conforms to the ERC-20 token standard. WETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. +To bridge this gap, wrapped ETH (WETH) was created. **Wrapped ETH is a smart contract that lets you deposit any amount of ETH into the contract and receive the same amount in minted WETH** that conforms to the ERC-20 token standard. WETH is a representation of ETH that allows you to interact with it as an ERC-20 token, not as the native asset ETH. You will still need native ETH to pay for gas fees, so make sure you save some when depositing. -You are able to unwrap WETH for ETH by using the WETH smart contract. You can redeem 1 WETH with the WETH smart contract, and you will receive 1 ETH. The WETH deposited is then burned and taken out of the circulating supply of WETH. +You are able to unwrap WETH for ETH by using the WETH smart contract. You can redeem any amount of WETH with the WETH smart contract, and you will receive the same amount in ETH. The WETH deposited is then burned and taken out of the circulating supply of WETH. **Roughly ~3% of the circulating ETH supply is locked in the WETH token contract** making it one of the most used [smart contracts](/glossary/#smart-contract). WETH is especially important with users interacting with applications in decentralized finance (DeFi). From a6246d1b2fa21a2a29c37c96039a90f8813e6948 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 25 Mar 2024 15:57:22 -0600 Subject: [PATCH 43/47] Add other networks contracts FAQ --- public/content/wrapped-eth/index.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/public/content/wrapped-eth/index.md b/public/content/wrapped-eth/index.md index ccd443eca47..39c3c831842 100644 --- a/public/content/wrapped-eth/index.md +++ b/public/content/wrapped-eth/index.md @@ -33,24 +33,30 @@ You are able to unwrap WETH for ETH by using the WETH smart contract. You can re ## Frequently asked questions {#faq} - + You pay gas fees to wrap or unwrap ETH using the WETH contract. - + WETH is generally considered secure because it is based on a simple, battle-tested smart contract. The WETH contract has also beeen formally verified, which is the highest security standard for smart contracts on Ethereum. - + Besides the [canonical implementation of WETH](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) described on this page, there are other variants in the wild. These may be custom tokens created by app developers or versions issued on other blockchains, and may behave differently or have different security properties. **Always double-check the token information to know which WETH implementation you're interacting with.** + +- [Ethereum Mainnet](https://etherscan.io/token/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2) +- [Arbitrum](https://arbiscan.io/token/0x82af49447d8a07e3bd95bd0d56f35241523fbab1) +- [Optimism](https://optimistic.etherscan.io/token/0x4200000000000000000000000000000000000006) + + ## Further reading {#further-reading} - [WTF is WETH?](https://weth.io/) From 674739487cf28d0e785518542eca7e737ee46bde Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 25 Mar 2024 23:10:25 -0600 Subject: [PATCH 44/47] Add content to link out to /wrapped-eth page --- public/content/defi/index.md | 3 +++ .../content/developers/docs/standards/tokens/erc-20/index.md | 3 +-- src/intl/en/page-eth.json | 1 + src/intl/en/page-get-eth.json | 1 + src/pages/eth.tsx | 1 + src/pages/get-eth.tsx | 1 + 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/public/content/defi/index.md b/public/content/defi/index.md index 05a72715121..05a45076875 100644 --- a/public/content/defi/index.md +++ b/public/content/defi/index.md @@ -308,6 +308,7 @@ Contracts are also public for anyone to inspect and audit. This means bad contra This does mean there's currently a need to trust the more technical members of the Ethereum community who can read code. The open-source based community helps keep developers in check, but this need will diminish over time as smart contracts become easier to read and other ways to prove trustworthiness of code are developed. + ## Ethereum and DeFi {#ethereum-and-defi} Ethereum is the perfect foundation for DeFi for a number of reasons: @@ -324,6 +325,8 @@ You can think of DeFi in layers: 3. The protocols – [smart contracts](/glossary/#smart-contract) that provide the functionality, for example, a service that allows for decentralized lending of assets. 4. [The applications](/dapps/) – the products we use to manage and access the protocols. +Note: much of defi uses the [ERC-20 standard](/glossary/#erc-20). Applications in defi use a wrapper for ETH called Wrapped Ether (WETH). [Learn more about wrapped ether](/wrapped-eth). + ## Build DeFi {#build-defi} DeFi is an open-source movement. The DeFi protocols and applications are all open for you to inspect, fork, and innovate on. Because of this layered stack (they all share the same base blockchain and assets), protocols can be mixed and matched to unlock unique combo opportunities. diff --git a/public/content/developers/docs/standards/tokens/erc-20/index.md b/public/content/developers/docs/standards/tokens/erc-20/index.md index 7e66e6fc83b..d414dc6483e 100644 --- a/public/content/developers/docs/standards/tokens/erc-20/index.md +++ b/public/content/developers/docs/standards/tokens/erc-20/index.md @@ -12,14 +12,13 @@ Tokens can represent virtually anything in Ethereum: - reputation points in an online platform - skills of a character in a game -- lottery tickets - financial assets like a share in a company - a fiat currency like USD - an ounce of gold - and more... Such a powerful feature of Ethereum must be handled by a robust standard, right? That's exactly -where the ERC-20 plays its role! This standard allows developers to build token applications that are interoperable with other products and services. +where the ERC-20 plays its role! This standard allows developers to build token applications that are interoperable with other products and services. The ERC-20 standard is also used to provide additional functionality to [ether](/glossary/#ether). **What is ERC-20?** diff --git a/src/intl/en/page-eth.json b/src/intl/en/page-eth.json index abcf7132bc3..704a3f373cb 100644 --- a/src/intl/en/page-eth.json +++ b/src/intl/en/page-eth.json @@ -55,6 +55,7 @@ "page-eth-underpins": "ETH underpins the Ethereum financial system", "page-eth-underpins-desc": "Not satisfied with payments, the Ethereum community is building a whole financial system that's peer-to-peer and accessible to everyone.", "page-eth-underpins-desc-2": "You can use ETH as collateral to generate entirely different cryptocurrency tokens on Ethereum. Plus you can borrow, lend and earn interest on ETH and other ETH-backed tokens.", + "page-eth-weth": "Wrapped ether (WETH) is used to extend the functionality of ETH to work with other tokens and applications. Learn more about WETH.", "page-eth-uses": "Uses for ETH grow every day", "page-eth-uses-desc": "Because Ethereum is programmable, developers can shape ETH in countless ways.", "page-eth-uses-desc-2": "Back in 2015, all you could do was send ETH from one Ethereum account to another. Here are just some of things you can do today.", diff --git a/src/intl/en/page-get-eth.json b/src/intl/en/page-get-eth.json index d5b5a23fd34..f096d79919e 100644 --- a/src/intl/en/page-get-eth.json +++ b/src/intl/en/page-get-eth.json @@ -25,6 +25,7 @@ "page-get-eth-dexs-desc": "Decentralized exchanges are open marketplaces for ETH and other tokens. They connect buyers and sellers directly.", "page-get-eth-dexs-desc-2": "Instead of using a trusted third party to safeguard funds in the transaction, they use code. The seller's ETH will only be transferred when payment is guaranteed. This type of code is known as a smart contract.", "page-get-eth-dexs-desc-3": "This means there are fewer geographical restrictions than with centralized alternatives. If someone is selling what you want and accepting a payment method you can provide, you’re good to go.", + "page-get-eth-dexs-desc-4": "Note: many dexes use wrapped ether (WETH) to function. Learn more about wrapped ether.", "page-get-eth-do-not-copy": "Example: Do not copy", "page-get-eth-exchanges-disclaimer": "We collected this information manually. If you spot something wrong, let us know at", "page-get-eth-exchanges-empty-state-text": "Enter your country of residence to see a list of exchanges you may be able to use", diff --git a/src/pages/eth.tsx b/src/pages/eth.tsx index 4db083ad7fd..0f0e4e0284c 100644 --- a/src/pages/eth.tsx +++ b/src/pages/eth.tsx @@ -468,6 +468,7 @@ const EthPage = () => { description={t("page-eth-whats-defi-description")} image={defi} /> + {t('page-eth-weth')} diff --git a/src/pages/get-eth.tsx b/src/pages/get-eth.tsx index a95a1ae1817..6adbca9cb1b 100644 --- a/src/pages/get-eth.tsx +++ b/src/pages/get-eth.tsx @@ -367,6 +367,7 @@ const GetEthPage = ({ {t("page-get-eth-get-wallet-btn")} + {t("page-get-eth-dexs-desc-4")} Date: Tue, 26 Mar 2024 08:47:10 -0700 Subject: [PATCH 45/47] chore: defi capitalization, linting --- public/content/defi/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/content/defi/index.md b/public/content/defi/index.md index 05a45076875..c108d21f48d 100644 --- a/public/content/defi/index.md +++ b/public/content/defi/index.md @@ -308,7 +308,6 @@ Contracts are also public for anyone to inspect and audit. This means bad contra This does mean there's currently a need to trust the more technical members of the Ethereum community who can read code. The open-source based community helps keep developers in check, but this need will diminish over time as smart contracts become easier to read and other ways to prove trustworthiness of code are developed. - ## Ethereum and DeFi {#ethereum-and-defi} Ethereum is the perfect foundation for DeFi for a number of reasons: @@ -325,7 +324,7 @@ You can think of DeFi in layers: 3. The protocols – [smart contracts](/glossary/#smart-contract) that provide the functionality, for example, a service that allows for decentralized lending of assets. 4. [The applications](/dapps/) – the products we use to manage and access the protocols. -Note: much of defi uses the [ERC-20 standard](/glossary/#erc-20). Applications in defi use a wrapper for ETH called Wrapped Ether (WETH). [Learn more about wrapped ether](/wrapped-eth). +Note: much of DeFi uses the [ERC-20 standard](/glossary/#erc-20). Applications in DeFi use a wrapper for ETH called Wrapped Ether (WETH). [Learn more about wrapped ether](/wrapped-eth). ## Build DeFi {#build-defi} From 2bcb9c6eb8e3f2ad2c769953d41e744274ed3a73 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Tue, 26 Mar 2024 08:53:30 -0700 Subject: [PATCH 46/47] fix: use Translation component for htmr strings --- src/pages/eth.tsx | 4 +++- src/pages/get-eth.tsx | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/eth.tsx b/src/pages/eth.tsx index 0f0e4e0284c..dce7ed369bc 100644 --- a/src/pages/eth.tsx +++ b/src/pages/eth.tsx @@ -468,7 +468,9 @@ const EthPage = () => { description={t("page-eth-whats-defi-description")} image={defi} /> - {t('page-eth-weth')} + + + diff --git a/src/pages/get-eth.tsx b/src/pages/get-eth.tsx index 6adbca9cb1b..998cd93d318 100644 --- a/src/pages/get-eth.tsx +++ b/src/pages/get-eth.tsx @@ -41,7 +41,6 @@ import dapps from "@/public/doge-computer.png" import oneinch from "@/public/exchanges/1inch.png" import bancor from "@/public/exchanges/bancor.png" import kyber from "@/public/exchanges/kyber.png" -import loopring from "@/public/exchanges/loopring.png" import hero from "@/public/get-eth.png" import wallet from "@/public/wallet.png" @@ -367,7 +366,9 @@ const GetEthPage = ({ {t("page-get-eth-get-wallet-btn")} - {t("page-get-eth-dexs-desc-4")} + + + Date: Tue, 26 Mar 2024 11:10:26 -0700 Subject: [PATCH 47/47] fix: markdown whitespace syntax --- public/content/wrapped-eth/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/content/wrapped-eth/index.md b/public/content/wrapped-eth/index.md index 39c3c831842..4b7e9c81127 100644 --- a/public/content/wrapped-eth/index.md +++ b/public/content/wrapped-eth/index.md @@ -52,9 +52,11 @@ Besides the [canonical implementation of WETH](https://etherscan.io/token/0xc02a + - [Ethereum Mainnet](https://etherscan.io/token/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2) - [Arbitrum](https://arbiscan.io/token/0x82af49447d8a07e3bd95bd0d56f35241523fbab1) - [Optimism](https://optimistic.etherscan.io/token/0x4200000000000000000000000000000000000006) + ## Further reading {#further-reading}