-
Notifications
You must be signed in to change notification settings - Fork 1
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
Post audit/treasury modifications #5
Merged
0xAplki
merged 6 commits into
post-audit/merge-to-develop
from
post-audit/treasury-modifications
Nov 25, 2021
Merged
Post audit/treasury modifications #5
0xAplki
merged 6 commits into
post-audit/merge-to-develop
from
post-audit/treasury-modifications
Nov 25, 2021
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
0xAplki
requested review from
bitcoinbrisbane,
chris247474,
mystbrent,
schystz and
tracyarciaga
November 12, 2021 01:36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few small things. Mocks seem to be full implementations though?
@bitcoinbrisbane thanks for catching, cleaned the uniswapv2 to make it as mocks instead. pushing in a bit! |
Updated! |
tracyarciaga
approved these changes
Nov 16, 2021
bitcoinbrisbane
approved these changes
Nov 24, 2021
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.
Description of Changes
Changes re: audit issues:
For Issue #1 - Treasury.buybackRnbw() is vulnerable to price manipulation attacks - Synced this with the
PotOfGold.sol
implementation. Thebuyback
function now hasminRNBWAmount
parameter and I added a require statement to check for the minRNBWAmount. Added tests to this as well.For Issue #2 - Unnecessary future deadline value passed to swap functions - I just added an extra
deadline
parameter just like thePotOfGold.sol
implementation to be more flexible. We can easily control this on the front end as well.For Issue #6 - WETH9 state variable can be made constant to save gas costs : This is removed and replaced by a hardcoded RNBWUSDC Pool instead.
Added and fixed the test cases for our purpose as well. Did some cleanup on unused and unnecessary code blocks/comments as well though some comments were preserved from gg's branch on other files since this might help us on some changes in the future as he answers the additional questions I have from him.
Link to Jira Ticket
How To Test
npm/yarn testhalo
Notes
Developer Checklist:
feature/HDF-XXX-description
Reviewers Checklist: