Skip to content

Conversation

@MichaelKorchagin
Copy link
Collaborator

@MichaelKorchagin MichaelKorchagin commented Jul 27, 2024

MERGED TO: rc/multi-zns-main

@openzeppelin-code
Copy link

openzeppelin-code bot commented Jul 27, 2024

[ZNS ZChain] New formula for Curve pricer

Generated at commit: df9e5486c4e8718332374684c76c8d27130b431d

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
1
0
2
20
24
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@MichaelKorchagin MichaelKorchagin changed the title New formula for Curve pricer [WIP] New formula for Curve pricer Jul 30, 2024
uint256 curveMultiplier
) external override onlyOwnerOrOperator(domainHash) {
priceConfigs[domainHash].minPrice = minPrice;
priceConfigs[domainHash].curveMultiplier = curveMultiplier;
Copy link
Collaborator

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.

Copy link
Collaborator Author

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

@Whytecrowe Whytecrowe requested a review from JamesEarle August 20, 2024 23:32
@Whytecrowe Whytecrowe changed the title [WIP] New formula for Curve pricer [WIP] [ZNS Meowchain] New formula for Curve pricer Aug 22, 2024
@codecov
Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.81%. Comparing base (0db9875) to head (df9e548).
Report is 21 commits behind head on zns-zchain-final.

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           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MichaelKorchagin MichaelKorchagin changed the title [WIP] [ZNS Meowchain] New formula for Curve pricer [ZNS Meowchain] New formula for Curve pricer Sep 9, 2024
@Whytecrowe Whytecrowe changed the title [ZNS Meowchain] New formula for Curve pricer [ZNS ZChain] New formula for Curve pricer Sep 11, 2024
@Whytecrowe Whytecrowe changed the base branch from rc/zns-meowchain to zns-zchain-final September 11, 2024 22:42
@Whytecrowe Whytecrowe changed the title [ZNS ZChain] New formula for Curve pricer [Multi ZNS] New formula for Curve pricer Dec 17, 2024
@Whytecrowe Whytecrowe changed the title [Multi ZNS] New formula for Curve pricer [3.] New formula for Curve pricer Jan 31, 2025
@Whytecrowe Whytecrowe closed this May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants