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

feat: add staked amounts, add position amounts and prices #48

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

ethzoomer
Copy link
Contributor

No description provided.

@ethzoomer ethzoomer requested a review from stas February 27, 2024 20:12
@@ -559,11 +583,15 @@ def _byData(_data: address[4], _token0: address, _token1: address, \
id: 0,
liquidity: acc_balance,
staked: acc_staked,
amount0: ((acc_balance + acc_staked) * reserve0) / pool_total_supply,
amount1: ((acc_balance + acc_staked) * reserve1) / pool_total_supply,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add staked0 and staked1 too here to separate these

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added, lmk if the way I did it makes sense

@@ -640,15 +673,28 @@ def _byDataCL(_data: address[4], _token0: address, _token1: address, \
fee_voting_reward = gauge.feesVotingReward()
emissions_token = gauge.rewardToken()

if gauge_alive:
emissions = gauge.rewardRate()
# fetch total staked liquidity from the ticks surrounding current tick
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@ethzoomer ethzoomer Feb 28, 2024

Choose a reason for hiding this comment

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

Added ty

@ethzoomer ethzoomer requested a review from stas February 28, 2024 05:21
Copy link
Collaborator

@stas stas left a comment

Choose a reason for hiding this comment

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

@stas stas merged commit 38c94b9 into offset_skips Feb 28, 2024
0 of 2 checks passed
@stas stas deleted the slipstream_library branch February 28, 2024 09:10
stas pushed a commit that referenced this pull request Feb 28, 2024
* feat: add staked amounts, add position amounts and prices

* feat: add staked/staked1 to Position

* refactor: use active tick staked liquidity on CL Lp
stas pushed a commit that referenced this pull request Mar 6, 2024
* feat: add staked amounts, add position amounts and prices

* feat: add staked/staked1 to Position

* refactor: use active tick staked liquidity on CL Lp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants