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

[erc721-multi-registry-weighted-max] Erc721 multi registry weighted max #1635

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aktoriukas
Copy link

New Strategy

This is to calculate the balance of the wallets in a multi-registry contract.
Calculation is weighted with a maxBalance parameter.

Here is an example of parameters:

    "symbol": "Total",
    "tokens": [
    "0x3106a0a076BeDAE847652F42ef07FD58589E001f",
    "0xb986Fd52697f16bE888bFAD2c5bF12cd67Ce834B",
    "0xb2d4F230298Cf68164F6C5DD994068Cbb4C3D335"
    ],
    "maxBalance": 200000,
    "weights": [1, 5, 10]
}

@ChaituVR ChaituVR changed the title Erc721 multi registry weighted max [erc721-multi-registry-weighted-max] Erc721 multi registry weighted max Nov 21, 2024
ChaituVR
ChaituVR previously approved these changes Nov 21, 2024
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 @aktoriukas I think you can use math strategy in your space instead of a new strategy https://snapshot.org/#/strategy/math did you try?

@aktoriukas
Copy link
Author

aktoriukas commented Nov 21, 2024

@ChaituVR
There is not much DOCS on what the math strategy suppose todo.

From a brief look i can't see how can i set-up multiple token with different weights and max value using math strategy.

Also, why would there be erc721-multi-registry-weighted if math could do it then ?

as my proposed strategy of erc721-multi-registry-weighted-max is just extension of the erc721-multi-registry-weighted with a max value added.


edit: there is plus in the math strategy.

@ChaituVR
Copy link
Member

hi @aktoriukas

edit: there is plus in the math strategy.

I don't get it 🤔 there is no plus operation on math strategy, you need to use erc721-multi-registry-weighted with
a-if-gte-b operation

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.

2 participants