Skip to content

Commit b3fc66e

Browse files
authored
Update src/content/developers/tutorials/uniswap-v2-annotated-code/index.md
1 parent ecb9e50 commit b3fc66e

File tree

1 file changed

+1
-1
lines changed
  • src/content/developers/tutorials/uniswap-v2-annotated-code

1 file changed

+1
-1
lines changed

src/content/developers/tutorials/uniswap-v2-annotated-code/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ If the time elapsed is not zero, it means we are the first exchange transaction
366366
}
367367
```
368368

369-
Each cost accumulator is updated with the latest cost (reserve of the other token/reserve of this token) times the elapsed time in seconds. To get an average price you read the cumulative price in two points in time, and divide by the time difference between them. For example, assume this sequence of events:
369+
Each cost accumulator is updated with the latest cost (reserve of the other token/reserve of this token) times the elapsed time in seconds. To get an average price, you read the cumulative price in two points in time and divide by the time difference between them. For example, assume this sequence of events:
370370

371371
| Event | reserve0 | reserve1 | timestamp | Marginal exchange rate (reserve1 / reserve0) | price0CumulativeLast |
372372
| -------------------------------------------------------- | --------: | --------: | --------- | -------------------------------------------: | -------------------------: |

0 commit comments

Comments
 (0)