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

Add 1 ppm fee to univ3 cal calculator #590

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fastlane_bot/helpers/poolandtokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ def decimal_converter(idx):
return lst

FEE_LOOKUP = {
0.000001: Univ3Calculator.FEE1,
0.000008: Univ3Calculator.FEE8,
0.00001: Univ3Calculator.FEE10,
0.00004: Univ3Calculator.FEE40,
Expand Down
5 changes: 4 additions & 1 deletion fastlane_bot/helpers/univ3calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Univ3Calculator():
__VERSION__ = __VERSION__
__DATE__ = __DATE__

FEE1 = 1
FEE8 = 8
FEE10 = 10
FEE40 = 40
Expand All @@ -39,6 +40,7 @@ class Univ3Calculator():
FEE10000 = 10000

TICKSZ = {
FEE1: 1,
FEE8: 1,
FEE10: 1,
FEE40: 8,
Expand Down Expand Up @@ -136,6 +138,7 @@ def __post_init__(self, tkn0decv=None, tkn1decv=None, addrdec=None):
super().__setattr__('liquidity', int(self.liquidity))
super().__setattr__('fee_const', int(self.fee_const))
assert self.fee_const in {
self.FEE1,
self.FEE8,
self.FEE10,
self.FEE40,
Expand All @@ -149,7 +152,7 @@ def __post_init__(self, tkn0decv=None, tkn1decv=None, addrdec=None):
self.FEE2500,
self.FEE3000,
self.FEE10000,
}, "fee not one of the FEEXXX constants {self.fee_const}"
}, f"fee not one of the FEEXXX constants {self.fee_const}"
assert not self.tkn0dec is None, "tkn0dec is None"
assert not self.tkn1dec is None, "tkn1dec is None"

Expand Down
253 changes: 0 additions & 253 deletions fastlane_bot/tools/univ3calc_DELETE.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK to remove

This file was deleted.

Loading