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

Math n gas #42

Merged
merged 2 commits into from
Mar 24, 2022
Merged

Math n gas #42

merged 2 commits into from
Mar 24, 2022

Conversation

Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Mar 24, 2022

resolves #41 and #32 and #27

Joey Santoro added 2 commits March 24, 2022 09:40
@@ -134,7 +136,7 @@ contract FlywheelCore is Auth {
require(strategyState[strategy].index == 0, "strategy");
strategyState[strategy] = RewardsState({
index: ONE,
lastUpdatedTimestamp: uint32(block.timestamp)
lastUpdatedTimestamp: block.timestamp.safeCastTo32()

Choose a reason for hiding this comment

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

i still think using uint32 is a bad idea for timestamps, the system will be bricked in ~83 years

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we need to plan that far ahead tbh, 83 years ago neither computers nor the internet existed

Choose a reason for hiding this comment

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

bruh ok lol

Choose a reason for hiding this comment

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

also mainframe computers were around since the 30s

@Joeysantoro Joeysantoro merged commit b2d648b into main Mar 24, 2022
@Joeysantoro Joeysantoro deleted the feat/mathNGas branch March 24, 2022 22:24
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.

Fix divide by zero error
3 participants