Skip to content

Commit

Permalink
fix: write current block timestamp instead of previous timestamp for …
Browse files Browse the repository at this point in the history
…oracle observation
  • Loading branch information
xenide committed Jan 22, 2024
1 parent 573a2db commit 4c21ca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ReservoirPair.sol
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ abstract contract ReservoirPair is IAssetManagedPair, ReservoirERC20 {
lTimeElapsed = lBlockTimestamp - aBlockTimestampLast;
}
if (lTimeElapsed > 0 && aReserve0 != 0 && aReserve1 != 0) {
_updateOracle(aReserve0, aReserve1, lTimeElapsed, aBlockTimestampLast);
_updateOracle(aReserve0, aReserve1, lTimeElapsed, lBlockTimestamp);
}

// update reserves to match latest balances
Expand Down

0 comments on commit 4c21ca0

Please sign in to comment.