Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix accounting error in updatePeriodRevenue #6

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Conversation

08xmt
Copy link
Collaborator

@08xmt 08xmt commented Sep 13, 2024

No description provided.

src/sInv.sol Outdated
revenueData.lastPeriodRevenue = 0;
revenueData.periodRevenue = newRevenue;
revenueData.lastBuyPeriod = uint64(currentPeriod);
} else if(periodsSinceLastBuy - revenueData.lastBuyPeriod == 1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be periodsSinceLastBuy == 1 otherwise will revert

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right doh

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5458170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants