From 64f2a7e941d04fafddb0aacefb56de59656e9094 Mon Sep 17 00:00:00 2001 From: eroderust Date: Wed, 4 Mar 2026 15:03:26 +0800 Subject: [PATCH] chore: fix some minor issues in the comments Signed-off-by: eroderust --- audit.py | 2 +- .../4-moccasin-signatures/10-ecdsa/+page.md | 8 ++++---- .../4-moccasin-signatures/17-workshop-1/+page.md | 6 +++--- courses/curve-v1/5-add-liquidity/4-imbalance-fee/+page.md | 4 ++-- .../8-code-walk-remove-liq-one-coin/+page.md | 2 +- courses/uniswap-v2/2-swap/19-spot-price-graph/+page.md | 2 +- courses/uniswap-v2/7-twap/8-twap-code-walk/+page.md | 2 +- .../3-difference-between-v2-and-v3/+page.md | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/audit.py b/audit.py index 7deaae97ba..e44b11e3f2 100644 --- a/audit.py +++ b/audit.py @@ -31,7 +31,7 @@ def audit(courses): depth = len(dirpath.split(os.sep)) - len(root_directory.split(os.sep)) if depth == 2: - # Print directory and caption_count if they are less than the threshold + # Print directory and caption_count if they are less than the threshold if caption_count < MIN_CAPTION_COUNT: count_line = f"{dirpath} Captions: {caption_count}" with open("audit.txt", "a") as file: diff --git a/courses/advanced-python-vyper-smart-contract-development/4-moccasin-signatures/10-ecdsa/+page.md b/courses/advanced-python-vyper-smart-contract-development/4-moccasin-signatures/10-ecdsa/+page.md index d0c18b4531..842bab50ef 100644 --- a/courses/advanced-python-vyper-smart-contract-development/4-moccasin-signatures/10-ecdsa/+page.md +++ b/courses/advanced-python-vyper-smart-contract-development/4-moccasin-signatures/10-ecdsa/+page.md @@ -2,7 +2,7 @@ We are going to continue our exploration of digital signatures with something called ECDSA recover, which was mentioned in the last video. This is a process that will be incredibly important to what we are doing here with our Merkle airdrop. Let's dive in. -### What are ECDSA Signatures? +### What are ECDSA Signatures? ECDSA stands for Elliptic Curve Digital Signature Algorithm. It's a mouthful, but it's based on Elliptic Curve Cryptography. Don't worry, we'll get into what that means in a second. ECDSA is used to: - generate key pairs @@ -40,7 +40,7 @@ Public and private keys are generated using a process that involves two importan We only really need to remember that these constants are, in fact, constants. They will be used in subsequent calculations. -### What is a Signature in ECDSA? +### What is a Signature in ECDSA? ECDSA signatures are made up of three integers: - V @@ -60,7 +60,7 @@ The ECDSA verification algorithm takes the signed message, the signature from th The EVM pre-compiler does this verification for us. It checks to see if the signature is valid. If it is not valid, the pre-compiler will return the zero address, and the smart contract will revert. -### ECDSA Recover +### ECDSA Recover ECDSA recover is a function used in smart contracts. It retrieves the signer's address of a message that has been signed using a private key with ECDSA. It uses the signature to do this. @@ -74,7 +74,7 @@ We should always use the OpenZeppelin ECDSA library to verify signatures. This l We also discussed another issue with using ECDSA recover directly. If the signature is invalid, the ECDSA recover function will return the zero address. The smart contract should have a check in place to ensure it reverts if the zero address is returned from the ECDSA recover function. Again, the OpenZeppelin ECDSA library already has this check in place. -### Conclusion +### Conclusion Well done, we covered a lot of information, and it can be overwhelming. You should be proud of yourself for making it through. If anything was confusing, or you need to go over this again, you can always read some other articles, or dive into the math. It's very complex stuff and it's unlikely you'll get your head around it the first time. diff --git a/courses/advanced-python-vyper-smart-contract-development/4-moccasin-signatures/17-workshop-1/+page.md b/courses/advanced-python-vyper-smart-contract-development/4-moccasin-signatures/17-workshop-1/+page.md index 5025eee2a9..a2b7af087e 100644 --- a/courses/advanced-python-vyper-smart-contract-development/4-moccasin-signatures/17-workshop-1/+page.md +++ b/courses/advanced-python-vyper-smart-contract-development/4-moccasin-signatures/17-workshop-1/+page.md @@ -6,7 +6,7 @@ Merkle trees are like a hierarchical data structure that allows for efficient an Let's dive into the world of Merkle Trees and understand the key concepts behind them. -## What are Merkle Trees? +## What are Merkle Trees? Merkle trees essentially help us to efficiently verify a large amount of data using a small, compact hash value. They are like a hierarchical data structure that holds data and its hash values. @@ -27,7 +27,7 @@ We can build a Merkle Tree by: 2. **Pairing and hashing hash values:** We pair up the hash values, creating a new hash by combining the two hash values. The new hash can be created by sorting the hashes and then combining them using a cryptographic hash function. 3. **Continuing the process:** The newly generated hash values from step 2 are then paired up and hashed again, creating a new level in the tree. This process continues until we reach the root node. -## Example +## Example We are going to go over a simple Merkle Tree with four leaf nodes. @@ -66,7 +66,7 @@ patrick@kcu:mox-signatures-cu % mox run make_merkle This will output a `JSON` file that contains the Merkle Tree data. -## Workshop +## Workshop We are now going to complete a workshop. We will build a Merkle Tree with eight leaf nodes. We will be using the code we've created above as a starting point. diff --git a/courses/curve-v1/5-add-liquidity/4-imbalance-fee/+page.md b/courses/curve-v1/5-add-liquidity/4-imbalance-fee/+page.md index 79317d27ff..0ee83a152d 100644 --- a/courses/curve-v1/5-add-liquidity/4-imbalance-fee/+page.md +++ b/courses/curve-v1/5-add-liquidity/4-imbalance-fee/+page.md @@ -68,10 +68,10 @@ b = [100, 90, 110] # Adding 300 DAI b1 = [b[0] + 300, b[1], b[2]] -# Initial liquidity +# Initial liquidity D0 = calc_D(b[0], b[1], b[2], A, [0, 0, 0]) -# Liquidity after adding liquidity +# Liquidity after adding liquidity D1 = calc_D(b1[0], b1[1], b1[2], A, D0) # Imbalance fee diff --git a/courses/curve-v1/6-remove-liquidity/8-code-walk-remove-liq-one-coin/+page.md b/courses/curve-v1/6-remove-liquidity/8-code-walk-remove-liq-one-coin/+page.md index 96995cc7bd..ae2620776c 100644 --- a/courses/curve-v1/6-remove-liquidity/8-code-walk-remove-liq-one-coin/+page.md +++ b/courses/curve-v1/6-remove-liquidity/8-code-walk-remove-liq-one-coin/+page.md @@ -1,4 +1,4 @@ -## Removing Liquidity +## Removing Liquidity We can call a function to remove liquidity from the pool. If we want to remove liquidity in one coin, then we can call the `remove_liquidity_one_coin()` function. diff --git a/courses/uniswap-v2/2-swap/19-spot-price-graph/+page.md b/courses/uniswap-v2/2-swap/19-spot-price-graph/+page.md index 82662154c6..dc7d0f469b 100644 --- a/courses/uniswap-v2/2-swap/19-spot-price-graph/+page.md +++ b/courses/uniswap-v2/2-swap/19-spot-price-graph/+page.md @@ -12,7 +12,7 @@ The slope of this line is dY / dX. We can see that as dX gets smaller, the slope So, the price of token X in terms of token Y is given by the slope of the tangent line to the curve at the point (X,Y). -## Diagram +## Diagram ```mermaid graph LR diff --git a/courses/uniswap-v2/7-twap/8-twap-code-walk/+page.md b/courses/uniswap-v2/7-twap/8-twap-code-walk/+page.md index ad75821893..082946e9b9 100644 --- a/courses/uniswap-v2/7-twap/8-twap-code-walk/+page.md +++ b/courses/uniswap-v2/7-twap/8-twap-code-walk/+page.md @@ -14,7 +14,7 @@ The code snippet below is the section of the `update` function we'll be focused price1CumulativeLast += uint(uq112x112.encode(reserve0).uqdiv(reserve1)) * timeElapsed; ``` -## Understanding Time-Weighted Average Price (TWAP) +## Understanding Time-Weighted Average Price (TWAP) TWAP is a mechanism used to calculate the average price of a token over a certain period. It's used to help mitigate price manipulation by preventing large, sudden trades from impacting the price too significantly. diff --git a/courses/uniswap-v3/2-uniswap-v3-intro/3-difference-between-v2-and-v3/+page.md b/courses/uniswap-v3/2-uniswap-v3-intro/3-difference-between-v2-and-v3/+page.md index fdf52ffaa1..aeb816810c 100644 --- a/courses/uniswap-v3/2-uniswap-v3-intro/3-difference-between-v2-and-v3/+page.md +++ b/courses/uniswap-v3/2-uniswap-v3-intro/3-difference-between-v2-and-v3/+page.md @@ -1,4 +1,4 @@ -### Difference between Uniswap V2 and V3 +### Difference between Uniswap V2 and V3 In this lesson, we will discuss the differences between Uniswap V2 and V3.