Skip to content

Commit

Permalink
chore: fixed minor typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jatZama committed Mar 8, 2024
1 parent bb0a6e3 commit 30bd7d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/EncryptedDEXPair.sol
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ contract EncryptedDEXPair is EncryptedERC20 {
uint32 amount0Out;
uint32 amount1Out;
if (priceToken1Increasing) {
// in this case, first sell all amount1In at current fixed token1 price to get amount0Out, then swap remaining (amount0In-amount0Out)
// to get amount1out_remaining according to AMM formula
// in this case, first sell all amount1In at current fixed token1 price to get amount0Out, then swap remaining (amount0InMinusFee-amount0Out)
// to get amount1Out_remaining according to AMM formula
amount0Out = uint32((uint64(amount1InMinusFee) * uint64(reserve0)) / uint64(reserve1));
// NOTE : reserve1 should never be 0 after first liquidity minting event -see assert at the end- if first batchSettlement
// is called without minting, tx will fail anyways
Expand Down

0 comments on commit 30bd7d9

Please sign in to comment.