-
Notifications
You must be signed in to change notification settings - Fork 12
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
Remove log2TotalSupply from Rewards in favor of passing in totalSupply #226
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Simpler computeTickTvl method in Volatility library * Eliminate IV's dependence on slot0.sqrtPriceX96 and pool.liquidity() * Clean up Oracle.sol
* Increase FEE_GROWTH_AVG_WINDOW so it's harder to manipulate * Allow IV to increase faster than it decreases to match CEX more closely * Interpolate between old and new IV samples instead of jumping * Switch to EMA updates for smoother IV
* Remove RESERVE and associated totalSupply inflation * Clean up _previewInterest return values * Add AccrueInterest() event * Create erase() function in Lender
* Evaluate shortfall at the probe prices in BalanceSheet.isHealthy * Rename SLOT0_MASK_UNLEASH * Replace strain with closeFactor in bips * Only reset warning state and pay out ANTE if healthy after liquidate() * Operate on unleashTime inside liquidate() instead of pre-adding in warn() * Implement dutch auction liquidations * Reuse assets and liabilities values for gas efficiency * Clamp liquidators' amounts to what's actually available
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
haydenshively
force-pushed
the
sherlock-audit-fixes
branch
2 times, most recently
from
December 9, 2023 05:27
7edebd5
to
4ff9aea
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Saves like 3% gas on most Lender methods; makes
Lender.transfer
more expensive; expands valid range ofrate
to 10^17 --> 10^28Not worth the last minute change imo, just posting for posterity.