Skip to content

Commit

Permalink
Merge branch 'dev' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
corwintines authored Dec 19, 2024
2 parents 294711f + 3b136c0 commit c5addef
Show file tree
Hide file tree
Showing 115 changed files with 5,267 additions and 536 deletions.
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -12643,6 +12643,24 @@
"contributions": [
"doc"
]
},
{
"login": "YakshitAgarwal",
"name": "Yakshit Agarwal",
"avatar_url": "https://avatars.githubusercontent.com/u/153830716?v=4",
"profile": "https://github.com/YakshitAgarwal",
"contributions": [
"content"
]
},
{
"login": "mseidlx",
"name": "Matthias Seidl",
"avatar_url": "https://avatars.githubusercontent.com/u/32496674?v=4",
"profile": "https://growthepie.xyz",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-review-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}

- name: Upload output as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: output
path: ./src/data/crowdin/bucketsAwaitingReviewReport.csv
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ddannehh"><img src="https://avatars.githubusercontent.com/u/109203827?v=4?s=100" width="100px;" alt="ddannehh"/><br /><sub><b>ddannehh</b></sub></a><br /><a href="#design-ddannehh" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jkylling"><img src="https://avatars.githubusercontent.com/u/6781076?v=4?s=100" width="100px;" alt="Jonas Irgens Kylling"/><br /><sub><b>Jonas Irgens Kylling</b></sub></a><br /><a href="#content-jkylling" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/CremaFR"><img src="https://avatars.githubusercontent.com/u/5360522?v=4?s=100" width="100px;" alt="Thomas Brillard"/><br /><sub><b>Thomas Brillard</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=CremaFR" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/YakshitAgarwal"><img src="https://avatars.githubusercontent.com/u/153830716?v=4?s=100" width="100px;" alt="Yakshit Agarwal"/><br /><sub><b>Yakshit Agarwal</b></sub></a><br /><a href="#content-YakshitAgarwal" title="Content">🖋</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://growthepie.xyz"><img src="https://avatars.githubusercontent.com/u/32496674?v=4?s=100" width="100px;" alt="Matthias Seidl"/><br /><sub><b>Matthias Seidl</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=mseidlx" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"lodash.merge": "^4.6.2",
"lodash.shuffle": "^4.2.0",
"lodash.union": "^4.6.0",
"next": "^14.2.10",
"next": "^14.2.15",
"next-i18next": "^14.0.3",
"next-mdx-remote": "^3.0.8",
"next-sitemap": "^4.2.3",
Expand Down
2 changes: 2 additions & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

/nfts/ /en/nft/ 301!

/payments/ /en/payments/ 301!

/daos/ /en/dao/ 301!

/layer2/ /en/layer-2/ 301!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ This site uses **sentence casing** for header names as a convention. Only the fi

### Setting Up Your Wallet

### Getting Enough Ether
### Getting Enough ether
```

### Article authors {#authors}
Expand Down
3 changes: 2 additions & 1 deletion public/content/dao/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Decentralized autonomous organizations (DAOs)
title: What is a DAO?
metaTitle: What is a DAO? | Decentralized Autonomous Organization
description: An overview of DAOs on Ethereum
lang: en
template: use-cases
Expand Down
7 changes: 4 additions & 3 deletions public/content/defi/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Decentralized finance (DeFi)
metaTitle: What is DeFi? | Benefits and Use of Decentralised Finance
description: An overview of DeFi on Ethereum
lang: en
template: use-cases
Expand Down Expand Up @@ -168,7 +169,7 @@ If exchange B's supply dropped suddenly and the user wasn't able to buy enough t

To be able to do the above example in the traditional finance world, you'd need an enormous amount of money. These money-making strategies are only accessible to those with existing wealth. Flash loans are an example of a future where having money is not necessarily a prerequisite for making money.

<ButtonLink isSecondary href="https://aave.com/flash-loans/">
<ButtonLink isSecondary href="https://aave.com/docs/concepts/flash-loans">
More on flash loans
</ButtonLink>

Expand Down Expand Up @@ -324,7 +325,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}

Expand Down Expand Up @@ -358,4 +359,4 @@ DeFi is an open-source movement. The DeFi protocols and applications are all ope

<Divider />

<QuizWidget quizKey="defi" />
<QuizWidget quizKey="defi" />
2 changes: 1 addition & 1 deletion public/content/developers/docs/apis/json-rpc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params"

### eth_call {#eth_call}

Executes a new message call immediately without creating a transaction on the block chain. Often used for executing read-only smart contract functions, for example the `balanceOf` for an ERC-20 contract.
Executes a new message call immediately without creating a transaction on the blockchain. Often used for executing read-only smart contract functions, for example the `balanceOf` for an ERC-20 contract.

**Parameters**

Expand Down
2 changes: 1 addition & 1 deletion public/content/developers/docs/evm/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Some basic familiarity with common terminology in computer science such as [byte

The analogy of a 'distributed ledger' is often used to describe blockchains like Bitcoin, which enable a decentralized currency using fundamental tools of cryptography. The ledger maintains a record of activity which must adhere to a set of rules that govern what someone can and cannot do to modify the ledger. For example, a Bitcoin address cannot spend more Bitcoin than it has previously received. These rules underpin all transactions on Bitcoin and many other blockchains.

While Ethereum has its own native cryptocurrency (Ether) that follows almost exactly the same intuitive rules, it also enables a much more powerful function: [smart contracts](/developers/docs/smart-contracts/). For this more complex feature, a more sophisticated analogy is required. Instead of a distributed ledger, Ethereum is a distributed [state machine](https://wikipedia.org/wiki/Finite-state_machine). Ethereum's state is a large data structure which holds not only all accounts and balances, but a _machine state_, which can change from block to block according to a pre-defined set of rules, and which can execute arbitrary machine code. The specific rules of changing state from block to block are defined by the EVM.
While Ethereum has its own native cryptocurrency (ether) that follows almost exactly the same intuitive rules, it also enables a much more powerful function: [smart contracts](/developers/docs/smart-contracts/). For this more complex feature, a more sophisticated analogy is required. Instead of a distributed ledger, Ethereum is a distributed [state machine](https://wikipedia.org/wiki/Finite-state_machine). Ethereum's state is a large data structure which holds not only all accounts and balances, but a _machine state_, which can change from block to block according to a pre-defined set of rules, and which can execute arbitrary machine code. The specific rules of changing state from block to block are defined by the EVM.

![A diagram showing the make up of the EVM](./evm.png)
_Diagram adapted from [Ethereum EVM illustrated](https://takenobu-hs.github.io/downloads/ethereum_evm_illustrated.pdf)_
Expand Down
1 change: 1 addition & 0 deletions public/content/developers/docs/gas/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Gas and fees
metaTitle: "Ethereum gas and fees: technical overview"
description:
lang: en
---
Expand Down
2 changes: 1 addition & 1 deletion public/content/developers/docs/intro-to-ether/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Users can query the ether balance of any [account](/developers/docs/accounts/) b

## Further reading {#further-reading}

- [Defining Ether and Ethereum](https://www.cmegroup.com/education/courses/introduction-to-ether/defining-ether-and-ethereum.html)_CME Group_
- [Defining ether and Ethereum](https://www.cmegroup.com/education/courses/introduction-to-ether/defining-ether-and-ethereum.html)_CME Group_
- [Ethereum Whitepaper](/whitepaper/): The original proposal for Ethereum. This document includes a description of ether and the motivations behind its creation.
- [Gwei Calculator](https://www.alchemy.com/gwei-calculator): Use this gwei calculator to easily convert wei, gwei, and ether. Simply plug in any amount of wei, gwei, or ETH and automatically calculate the conversion.

Expand Down
2 changes: 1 addition & 1 deletion public/content/developers/docs/scaling/plasma/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Although exit games sound nice in theory, real-life mass exits will likely trigg

| Pros | Cons |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Offers high throughput and low cost per transaction. | Does not support general computation (cannot run smart contracts. Only basic token transfers, swaps, and a few other transaction types are supported via predicate logic. |
| Offers high throughput and low cost per transaction. | Does not support general computation (cannot run smart contracts). Only basic token transfers, swaps, and a few other transaction types are supported via predicate logic. |
| Good for transactions between arbitrary users (no overhead per user pair if both are established on the plasma chain) | Need to periodically watch the network (liveness requirement) or delegate this responsibility to someone else to ensure the security of your funds. |
| Plasma chains can be adapted to specific use-cases that are unrelated to the main chain. Anyone, including businesses, can customize Plasma smart contracts to provide scalable infrastructure that works in different contexts. | Relies on one or more operators to store data and serve it upon request. |
| Reduces load on Ethereum Mainnet by moving computation and storage off-chain. | Withdrawals are delayed by several days to allow for challenges. For fungible assets, this can be mitigated by liquidity providers, but there is an associated capital cost. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ That said, you should avoid treating audits as a silver bullet. Smart contract a

Setting up a bug bounty program is another approach for implementing external code reviews. A bug bounty is a financial reward given to individuals (usually whitehat hackers) that discover vulnerabilities in an application.

When used properly, bug bounties give members of the hacker community incentive to inspect your code for critical flaws. A real-life example is the “infinite money bug” that would have let an attacker create an unlimited amount of Ether on [Optimism](https://www.optimism.io/), a [Layer 2](/layer-2/) protocol running on Ethereum. Fortunately, a whitehat hacker [discovered the flaw](https://www.saurik.com/optimism.html) and notified the team, [earning a large payout in the process](https://cryptoslate.com/critical-bug-in-ethereum-l2-optimism-2m-bounty-paid/).
When used properly, bug bounties give members of the hacker community incentive to inspect your code for critical flaws. A real-life example is the “infinite money bug” that would have let an attacker create an unlimited amount of ether on [Optimism](https://www.optimism.io/), a [Layer 2](/layer-2/) protocol running on Ethereum. Fortunately, a whitehat hacker [discovered the flaw](https://www.saurik.com/optimism.html) and notified the team, [earning a large payout in the process](https://cryptoslate.com/critical-bug-in-ethereum-l2-optimism-2m-bounty-paid/).

A useful strategy is to set the payout of a bug bounty program in proportion to the amount of funds at stake. Described as the “[scaling bug bounty](https://medium.com/immunefi/a-defi-security-standard-the-scaling-bug-bounty-9b83dfdc1ba7)”, this approach provides financial incentives for individuals to responsibly disclose vulnerabilities instead of exploiting them.

Expand Down Expand Up @@ -235,7 +235,7 @@ The EVM doesn’t permit concurrency, meaning two contracts involved in a messag

Although mostly harmless, transferring control flow to untrusted contracts can cause problems, such as reentrancy. A reentrancy attack occurs when a malicious contract calls back into a vulnerable contract before the original function invocation is complete. This type of attack is best explained with an example.

Consider a simple smart contract (‘Victim’) that allows anyone to deposit and withdraw Ether:
Consider a simple smart contract (‘Victim’) that allows anyone to deposit and withdraw ether:

```solidity
// This contract is vulnerable. Do not use in production
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Many unit testing frameworks allow you to create assertions—simple statements

##### 3. Measure code coverage

[Code coverage](https://en.m.wikipedia.org/wiki/Code_coverage) is a testing metric that tracks the number of branches, lines, and statements in your code executed during tests. Tests should have good code coverage, otherwise you may get "false negatives" which happen a contract passes all tests, but vulnerabilities still exist in the code. Recording high code coverage, however, gives the assurance all statements/functions in a smart contract were sufficiently tested for correctness.
[Code coverage](https://en.m.wikipedia.org/wiki/Code_coverage) is a testing metric that tracks the number of branches, lines, and statements in your code executed during tests. Tests should have good code coverage to minimize the risk of untested vulnerabilities. Without sufficient coverage, you might falsely assume your contract is secure because all tests pass, while vulnerabilities still exist in untested code paths. Recording high code coverage, however, gives the assurance all statements/functions in a smart contract were sufficiently tested for correctness.

##### 4. Use well-developed testing frameworks

Expand Down Expand Up @@ -213,7 +213,7 @@ Running contracts on a local blockchain could be useful as a form of manual inte

### Testing contracts on testnets {#testing-contracts-on-testnets}

A test network or testnet works exactly like Ethereum Mainnet, except that it uses Ether (ETH) with no real-world value. Deploying your contract on a [testnet](/developers/docs/networks/#ethereum-testnets) means anyone can interact with it (e.g., via the dapp's frontend) without putting funds at risk.
A test network or testnet works exactly like Ethereum Mainnet, except that it uses ether (ETH) with no real-world value. Deploying your contract on a [testnet](/developers/docs/networks/#ethereum-testnets) means anyone can interact with it (e.g., via the dapp's frontend) without putting funds at risk.

This form of manual testing is useful for evaluating the end-to-end flow of your application from a user’s point of view. Here, beta testers can also perform trial runs and report any issues with the contract’s business logic and overall functionality.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ If an ERC-20 token is sent to the `RecipientContract`, the tokens will be transf

### What if we want to execute some function after the token deposit is completed? {#function-execution}

There are multiple ways of doing so. In this example we will follow the method which makes ERC-223 transfers identical to Ether transfers:
There are multiple ways of doing so. In this example we will follow the method which makes ERC-223 transfers identical to ether transfers:

```solidity
contract RecipientContract is IERC223Recipient {
Expand All @@ -178,7 +178,7 @@ contract RecipientContract is IERC223Recipient {
}
```

When the `RecipientContract` will receive a ERC-223 token the contract will execute a function encoded as `_data` parameter of the token transaction, identical to how Ether transactions encode function calls as transaction `data`. Read [the data field](https://ethereum.org/en/developers/docs/transactions/#the-data-field) for more information.
When the `RecipientContract` will receive a ERC-223 token the contract will execute a function encoded as `_data` parameter of the token transaction, identical to how ether transactions encode function calls as transaction `data`. Read [the data field](https://ethereum.org/en/developers/docs/transactions/#the-data-field) for more information.

In the above example an ERC-223 token must be transferred to the address of the `RecipientContract` with the `transfer(address,uin256,bytes calldata _data)` function. If the data parameter will be `0xc2985578` (the signature of a `foo()` function) then the function foo() will be invoked after the token deposit is received and the event Foo() will be fired.

Expand Down
16 changes: 16 additions & 0 deletions public/content/developers/docs/standards/tokens/erc-4626/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ ERC-4626 in yield-bearing vaults will lower the integration effort and unlock ac

The ERC-4626 token is described fully in [EIP-4626](https://eips.ethereum.org/EIPS/eip-4626).

**Asynchronous vault extension (ERC-7540)**

ERC-4626 is optimized for atomic deposits and redemptions up to a limit. If the limit is reached, no new deposits or redemptions can be submitted. This limitation does not work well for any smart contract system with asynchronous actions or delays as a prerequisite for interfacing with the Vault (e.g. real-world asset protocols, undercollateralized lending protocols, cross-chain lending protocols, liquid staking tokens, or insurance safety modules).

ERC-7540 expands the utility of ERC-4626 Vaults for asynchronous use cases. The existing Vault interface (`deposit`/`withdraw`/`mint`/`redeem`) is fully utilized to claim asynchronous Requests.

The ERC-7540 extension is described fully in [ERC-7540](https://eips.ethereum.org/EIPS/eip-7540).

**Multi-asset vault extension (ERC-7575)**

One missing use case that is not supported by ERC-4626 is Vaults which have multiple assets or entry points such as liquidity provider (LP) Tokens. These are generally unwieldy or non-compliant due to the requirement of ERC-4626 to itself be an ERC-20.

ERC-7575 adds support for Vaults with multiple assets by externalizing the ERC-20 token implementation from the ERC-4626 implementation.

The ERC-7575 extension is described fully in [ERC-7575](https://eips.ethereum.org/EIPS/eip-7575).

## Prerequisites {#prerequisites}

To better understand this page, we recommend you first read about [token standards](/developers/docs/standards/tokens/) and [ERC-20](/developers/docs/standards/tokens/erc-20/).
Expand Down
Loading

0 comments on commit c5addef

Please sign in to comment.