This repository has been archived by the owner on May 15, 2021. It is now read-only.
Fixed OZ March 7 audit C01: Supply is Manipulable #2
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
Neglected to reduce supply when user withdraws their pending deposit. Fixed
There was an egregious mistake trying to transfer collateral tokens from the *operator* on deposit. Test had the same bug!
Overrode `send`, `transfer`, and `transferFrom` with versions that consolidate the users balance before calling the superclass function. Fixes M01
Removed return value from ScheduledBalance#clearConsolidated Fixes L01
After reviewing the audit and code, discovered the invariant that the committed draw exchange rate *is always known*, so there was no need to track previous / current deposits for a user. Fixes L03
Removed ExchangeRateTracker#currentExchangeRateMantissa Retained the tokenToCollateralValue and collateralTokenToValue functions for convenience and gas efficiency (they don't run `search`). Partially addresses issue N03
Added checks to ensure tracker is initialized only once Fixes N04
Fixed some old documentation, and most of the typos identified. "User's backing collateral" remained as it's a "possesive apostrophe". :) Fixes N06
Fixes OZ March 7 audit issue N06: Typographical errors
Fixes OZ March 7 audit issue N04: Reinitialize Exchange Rate Tracker
Fixes OZ March 7 audit issue N03: Duplicated Code
Fixes OZ March 7 Audit issue L03: Complicated Code
Fixes OZ March 7 audit issue L02: Misleading comments
Fixed OZ March 7 security audit issue L01: Missing Return Value
OZ March 7 security audit issue M01: Incomplete ERC777
Fixes OZ March 7 audit H01: Deposit uses operator collateral
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Neglected to reduce supply when user withdraws their pending deposit.