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

[planet-finance-v2] Voting Strategy updated for New V3 Farm #1402

Merged
merged 8 commits into from
Feb 21, 2024

Conversation

defininja
Copy link
Contributor

Fixes # .

Changes proposed in this pull request:

  • added logic to increase voting weight for staking in v3 pools
  • calculated user staked Aqua balance in Aqua-Btcb pool
  • calculated user staked Aqua balance in Aqua Pool
  • Added above two Aqua Balance to User's Vote weight
  • new formula for voting
user's voting score  = user's wallet aqua balance + aqua balance in v2 aqua-bnb pool + 5 times the aqua balance in v2 infinity vault  + aqua balance in lending + 5 times the aqua balance in v3 aqua pool + aqua balance in v3 aqua-btcb pool

@ChaituVR ChaituVR changed the title Voting Strategy updated for New V3 Farm [planet-finance-v2] Voting Strategy updated for New V3 Farm Feb 1, 2024
Comment on lines 159 to 162
usersAquaInLending,
usersNewAquaBtcbVaultBalances,
usersNewAquaPoolBalances,
usersEarningSharesInAquaBtcbPool
Copy link
Member

Choose a reason for hiding this comment

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

This will cross our limit of 5 network calls, refer to https://github.com/snapshot-labs/snapshot-strategies?tab=readme-ov-file#code

@defininja
Copy link
Contributor Author

@ChaituVR - I have changed my code to use 5 network calls. Please review and merge my code. Thanks

Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

Hi @defininja It still call 6 network calls, there is one at line 151 apart from 5 calls in promise.all

@defininja
Copy link
Contributor Author

@ChaituVR - updated code to remove extra network call. Please check.

Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

I see a active proposal for this strategy
https://snapshot.org/#/planetfinance.eth/proposal/0x465d9939f333c6f5f778b29adfa25d19a8d6f9dbf1b616f01970a0cd85a8392a

Better to wait for it to be closed before merging this to avoid confusions with voting power.

@defininja
Copy link
Contributor Author

@ChaituVR - Above proposal is closed now. Please approve the merge request.

@ChaituVR ChaituVR merged commit ba4ca8a into snapshot-labs:master Feb 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants