From 855c444b7181552f25ae07954dbbe6e48885e658 Mon Sep 17 00:00:00 2001 From: Taylor Ferran Date: Tue, 16 Aug 2022 22:19:26 +0100 Subject: [PATCH 1/2] Fix typo in liquidity --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e883978..c5ced35 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ Hardhat is an Ethereum development environment and framework designed for full s - To ensure this, we maintain a ratio which has to remain constant - Ratio is `(cryptoDevTokenAmount user can add/cryptoDevTokenReserve in the contract) = (Eth Sent by the user/Eth Reserve in the contract)` - This ratio decides how much `Crypto Dev` tokens user can supply given a certain amount of Eth - - When user adds liquidity, we need to provide him with some `LP` tokens because we need to keep track of the amount of liquiidty he has supplied to the contract + - When user adds liquidity, we need to provide him with some `LP` tokens because we need to keep track of the amount of liquidty he has supplied to the contract - The amount of `LP` tokens that get minted to the user are propotional to the `Eth` supplied by the user - In the initial liquidity case, when there is no liquidity: The amount of `LP` tokens that would be minted to the user is equal to the `Eth` balance of the contract (because balance is equal to the `Eth` sent by the user in the `addLiquidity` call) - When there is already liquidity in the contract, the amount of `LP` tokens that get minted is based on a ratio. From bb80c9e2e446b107ca41be46cdc20fd6b7ffc7bd Mon Sep 17 00:00:00 2001 From: Taylor Ferran Date: Tue, 30 Aug 2022 16:16:36 +0100 Subject: [PATCH 2/2] Fix typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5ced35..7bc5ae6 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ Hardhat is an Ethereum development environment and framework designed for full s - To ensure this, we maintain a ratio which has to remain constant - Ratio is `(cryptoDevTokenAmount user can add/cryptoDevTokenReserve in the contract) = (Eth Sent by the user/Eth Reserve in the contract)` - This ratio decides how much `Crypto Dev` tokens user can supply given a certain amount of Eth - - When user adds liquidity, we need to provide him with some `LP` tokens because we need to keep track of the amount of liquidty he has supplied to the contract + - When user adds liquidity, we need to provide him with some `LP` tokens because we need to keep track of the amount of liquidity he has supplied to the contract - The amount of `LP` tokens that get minted to the user are propotional to the `Eth` supplied by the user - In the initial liquidity case, when there is no liquidity: The amount of `LP` tokens that would be minted to the user is equal to the `Eth` balance of the contract (because balance is equal to the `Eth` sent by the user in the `addLiquidity` call) - When there is already liquidity in the contract, the amount of `LP` tokens that get minted is based on a ratio. @@ -932,7 +932,7 @@ contract Exchange is ERC20 { // We do that using the `parseEther` function from `ethers.js` const _addEtherAmountWei = utils.parseEther(_addEther); - // Ratio needs to be maintained when we add liquidty. + // Ratio needs to be maintained when we add liquidity. // We need to let the user know for a specific amount of ether how many `CD` tokens // He can add so that the price impact is not large // The ratio we follow is (amount of Crypto Dev tokens to be added) / (Crypto Dev tokens balance) = (Eth that would be added) / (Eth reserve in the contract)