Skip to content

Commit c83d76c

Browse files
authored
Merge pull request #796 from YuanBoXie/main
fix: fix typo
2 parents 8244302 + ca8880d commit c83d76c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

51_ERC4626/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ tags:
4747

4848
### ERC4626 要点
4949

50-
ERC4626 标准主要实现了一下几个逻辑
50+
ERC4626 标准主要实现了以下几个逻辑
5151

5252
1. ERC20: ERC4626 继承了 ERC20,金库份额就是用 ERC20 代币代表的:用户将特定的 ERC20 基础资产(比如 WETH)存进金库,合约会给他铸造特定数量的金库份额代币;当用户从金库中提取基础资产时,会销毁相应数量的金库份额代币。`asset()` 函数会返回金库的基础资产的代币地址。
5353
2. 存款逻辑:让用户存入基础资产,并铸造相应数量的金库份额。相关函数为 `deposit()``mint()``deposit(uint assets, address receiver)` 函数让用户存入 `assets` 单位的资产,并铸造相应数量的金库份额给 `receiver` 地址。`mint(uint shares, address receiver)` 与它类似,只不过是以将铸造的金库份额作为参数。

56_DEX/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ function addLiquidity(uint amount0Desired, uint amount1Desired) public returns(u
139139
接下来,我们需要实现移除流动性的功能。当用户从池子中移除流动性 $\Delta{L}$ 时,合约要销毁LP份额代币,并按比例将代币返还给用户。返还代币的计算公式如下:
140140

141141
$$\Delta{x}={\frac{\Delta{L}}{L} * x}$$
142+
142143
$$\Delta{y}={\frac{\Delta{L}}{L} * y}$$
143144

144145
下面的 `removeLiquidity()` 函数实现移除流动性的功能,主要步骤如下:

0 commit comments

Comments
 (0)