Skip to content
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

Open
wants to merge 18 commits into
base: zns-zchain-final
Choose a base branch
from

Conversation

MichaelKorchagin
Copy link
Collaborator

@MichaelKorchagin MichaelKorchagin commented Jul 27, 2024

MERGED TO: rc/multi-zns-main

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
) 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

.gitignore Show resolved Hide resolved
@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
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           

@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
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.

3 participants