forked from snapshot-labs/snapshot-strategies
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
readme added for multichain and delegation (snapshot-labs#78)
* Create README.md * Create README.md
- Loading branch information
1 parent
9cee15f
commit 1958ba7
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# delegation | ||
|
||
If you want to delegate your voting power to another wallet address, you can do this using the “delegation strategy”. In delegation strategy, if A delegates to B and both of them vote, then the delegated voting power is not calculated. Only the vote of A will be calculated. The vote of B will be counted if A does not vote. | ||
|
||
In delegation strategy, the sub strategies defined in params are used to delegate vote from one address to another. | ||
|
||
|
||
Here is an example of parameters: | ||
|
||
```json | ||
{ | ||
"symbol": "YFI (delegated)", | ||
"strategies": [ | ||
{ | ||
"name": "erc20-balance-of", | ||
"params": { | ||
"address": "0xBa37B002AbaFDd8E89a1995dA52740bbC013D992", | ||
"symbol": "YFI", | ||
"decimals": 18 | ||
} | ||
}, | ||
{ | ||
"name": "yearn-vault", | ||
"params": { | ||
"address": "0xBA2E7Fed597fd0E3e70f5130BcDbbFE06bB94fe1", | ||
"symbol": "YFI (yYFI)", | ||
"decimals": 18 | ||
} | ||
} | ||
] | ||
} | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# multichain | ||
|
||
If you want to calculate the balance from various chains like Ethereum, Binance smart chain, polygon etc. and use them for voting using various strategies, you can do it by using a strategy called “multichain strategy”. This allows cross chain voting in which multiple chains can be used together to calculate the voting power. | ||
|
||
In multichain strategy, the params should define sub strategies which would use different networks mentioned in the field to combine the voting power. | ||
|
||
Here is an example of parameters: | ||
|
||
In the below example, the tokens on the three networks namely ethereum, polygon and bsc denotes combined voting power. | ||
|
||
|
||
```json | ||
{ | ||
"symbol": "MULTI", | ||
"strategies": [ | ||
{ | ||
"name": "erc20-balance-of", | ||
"network": "1", | ||
"params": { | ||
"address": "0x579cea1889991f68acc35ff5c3dd0621ff29b0c9", | ||
"decimals": 18 | ||
} | ||
}, | ||
{ | ||
"name": "erc20-balance-of", | ||
"network": "137", | ||
"params": { | ||
"address": "0xB9638272aD6998708de56BBC0A290a1dE534a578", | ||
"decimals": 18 | ||
} | ||
}, | ||
{ | ||
"name": "erc20-balance-of", | ||
"network": "56", | ||
"params": { | ||
"address": "0x0e37d70b51ffa2b98b4d34a5712c5291115464e3", | ||
"decimals": 18 | ||
} | ||
}, | ||
{ | ||
"name": "erc20-balance-of", | ||
"network": 137, | ||
"params": { | ||
"address": "0xfC0fA725E8fB4D87c38EcE56e8852258219C64Ee", | ||
"decimals": 18 | ||
} | ||
} | ||
], | ||
"graphs": { | ||
"56": "https://api.thegraph.com/subgraphs/name/apyvision/block-info", | ||
"137": "https://api.thegraph.com/subgraphs/name/sameepsi/maticblocks" | ||
} | ||
} | ||
|
||
``` |