-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add base test for incentive #443
Open
SidestreamStrongStrawberry
wants to merge
10
commits into
master
Choose a base branch
from
add-base-test-for-incentive
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
SidestreamColdMelon
approved these changes
Jan 9, 2025
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.
Performed sanity checks
Numbers that are fetched for ETH-A from etherscan
vat.ilks(ilk).dust
= 7500.000000000000000000000000000000000000000000000 [RAD]dog.chop(ilk)
= 1.130000000000000000 [WAD]clip.tip
= 250.000000000000000000000000000000000000000000000 [RAD]clip.chip
= 0.001000000000000000 [WAD]
Values calculated in this test (logged during the review)
tab
= 8475.000000000000000000000000000000000000000000000 [RAD]- ✅ Sounds reasonable (7500 * 1.13)
penaltyAmount
= 975.000000000000000000000000000000000000000000000 [RAD]- ✅ Sounds reasonable (7500 * 0.13)
incentiveAmount
= 258.475000000000000000000000000000000000000000000 [RAD]- ✅ Sounds reasonable (250 + 7500 * 1.13 * 0.001)
Overall
- ✅ Both
penaltyAmount
andincentiveAmount
values are in the same RAD denomination - ✅ Asserting that
penaltyAmount
is greater or equal toincentiveAmount
makes sense to prevent "infinite money" draining attack - ✅ Skipping the assert when
line == 0
makes sense, since no new vaults can be opened, therefore draining is not possible - ✅ Skipping the assert when
clip.stopped() != 0
makes sense, since no new auctions can be started, therefore draining is not possible - ✅ Asserting that flop delay is longer than GSM delay makes sense to allow potential (theoretical) unwinding of USDS/SKY LP tokens via out-of-schedule spell
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.
implement test for https://github.com/orgs/makerdao/projects/15/views/3?filterQuery=&sortedBy%5Bdirection%5D=desc&sortedBy%5BcolumnId%5D=Status&pane=issue&itemId=69698126
Context:
https://hackmd.io/HsJAhxaoRn-tWOK82pggQg?comment=a9e760be-2557-4f65-acb2-f17d2c4ae4d7
https://hackmd.io/HsJAhxaoRn-tWOK82pggQg?comment=09a103a7-2ee5-4e10-940e-83278c42ea72