-
Notifications
You must be signed in to change notification settings - Fork 22
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
Stable2 Well Function and Upgradeable Well Remediations. #143
Merged
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
S2 upgr well remediations 2
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.
This PR addresses all the high and medium severity findings for the Stable2 and Well upgradeable changes from the latest CodeArena audit.
Findings repo:
All findings Report
Sponsored Confirmed Issues:
Confirmed issues
Remediations:
High and Medium Severity
Issue
WellUpgradeable
Allows for Arbitrary Implementation Changes and Potential Fund Drainage code-423n4/2024-07-basin-findings#60Fix
authorizeUpgrade
[#60] [#18] #138upgradeTo
andupgradeToAndCall
functions inWellUpgradeable
.Issue
notDelegatedOrIsMinimalProxy
reverts incorrectly code-423n4/2024-07-basin-findings#26Fix
notDelegatedOrIsMinimalProxy
modifier fix [#26] #142notDelegatedOrIsMinimalProxy
modifier to allow delegate calls since we are always dealing with proxies here.Issue
updateReserve
will start breaking code-423n4/2024-07-basin-findings#22Fix
Stable2
whenscaledReserve[j]
is updated. This ensures thatmaxStep
size can never be larger than thej
reserve.Issue
WellUpgradeable#_authorizeUpgrade
should check tokens in the new implementation code-423n4/2024-07-basin-findings#23Fix
authorizeUpgrade
[#23] #140Issue
calcLpTokenSupply()
does not converge, it does not revert. code-423n4/2024-07-basin-findings#19Fix
Issue
decimal1
parameter upon decoding code-423n4/2024-07-basin-findings#17Fix
decimal1
fix [#17] #141decimal0
withdecimal1
indecodeWellData
.Low and QA fixes
Issue
: https://github.com/code-423n4/2024-07-basin-findings/blob/main/data/willycode20-Q.md#l-03-change-the-visibility-of-the-function-proxiableuuid-from-external-to-public
Fix
Issue
: https://github.com/code-423n4/2024-07-basin-findings/blob/main/data/zanderbyte-Q.md#i-1-incorrect-documentation-in-calcreserveatratioswap-function
Fix
Issue
calcReserveAtRatioSwap
function andcalcReserveAtRatioLiquidity
: https://github.com/code-423n4/2024-07-basin-findings/blob/main/data/zanderbyte-Q.md#i-2-unreachable-code-block-in-calcreserveatratioswap-functionFix
Issue
umReserves == 0
check in calcLpTokenSupply: https://github.com/code-423n4/2024-07-basin-findings/blob/main/data/ZanyBonzy-Q.md#2-redundant-sumreserves--0-check-in-calclptokensupply
Fix
The remediations were sent to codeArena for re-audit, and remaining issues were fixed in #145.