diff --git a/src/strategies/delegation/README.md b/src/strategies/delegation/README.md new file mode 100644 index 000000000..a3668b5f0 --- /dev/null +++ b/src/strategies/delegation/README.md @@ -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 + } + } + ] +} + +``` diff --git a/src/strategies/multichain/README.md b/src/strategies/multichain/README.md new file mode 100644 index 000000000..d34310cf8 --- /dev/null +++ b/src/strategies/multichain/README.md @@ -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" + } +} + +```