-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Multi ZNS] New formula for Curve pricer #114
base: zns-zchain-final
Are you sure you want to change the base?
Conversation
[ZNS ZChain] New formula for Curve pricer
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
contracts/price/ZNSCurvePricer.sol
Outdated
) external override onlyOwnerOrOperator(domainHash) { | ||
priceConfigs[domainHash].minPrice = minPrice; | ||
priceConfigs[domainHash].curveMultiplier = curveMultiplier; |
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.
do you have any limitations on what this value could be?
Are there any values that would break the formula if set as curveMultiplier
?
If you have limits for this value, it would be good to add checks here that will revert if incorrect value is set.
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.
curveMultiplier
= 1.000 - default. Makes a canonical hyperbola (regular).- It can be "0", which makes all domain prices max.
- If it is less than 1.000, then it pulls the bend towards the straight line.
- If it is bigger than 1.000, then it makes bigger slope on the chart.
I'm adding these comments to contract to be clear
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## zns-zchain-final #114 +/- ##
=================================================
Coverage 99.80% 99.81%
=================================================
Files 11 11
Lines 525 541 +16
Branches 117 123 +6
=================================================
+ Hits 524 540 +16
Misses 1 1 |
…ed value in old test
MERGED TO:
rc/multi-zns-main