Multi-token: ERC-1155

The standard for fungible, non-fungible, and semi-fungible tokens.

Let's start with a quick overview of the ERC721 and ERC1155 standards:

Pros
Cons

ERC-721

Most widely recognized, golden NFT standard

Inability to conduct batch transfers

ERC-1155

Supports different token types in a single contract, allows batch transfers

Stores less robust information in order to save time and transaction costs

Let's have a look at what Voting Strategies you can use in your space:

The strategy returns the balance of a specific ERC-1155 token in the user's wallet.

Since the ERC-1155 standard supports multiple token types, the tokenId here may refer to a particular kind of token or a single item of the collection under the contract address.

If you want to get the balance of all tokenIds in the contract, you can use the erc1155-balance-of-all strategy. If you have multiple tokenIds, you can use the erc1155-balance-of-ids or erc1155-balance-of-ids-weighted strategy.

Strategy setup:

{
  "symbol": "ABC",
  "address": "0xE18a32192ED95b0FE9D70D19e5025f103475d7BA",
  "tokenId": "0x8000000000000000000000000000000200000000000000000000000000000000",
  "decimals": 0
}

You can test it out in the Playground on Snapshot:

This strategy returns the balance of voters for all tokens in an ERC1155 contract.

On Polygon, works only with contracts with total tokenIds less than 6000.

Strategy setup:

{
  "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2",
  "symbol": "CYBORG"
}

You can test it out in the Playground on Snapshot:

Use this strategy if you want to calculate the Voting Power taking into account multiple tokenIDs.

Try using this strategy with only a few tokenIDs passed in the parameter for the Score API server is likely to have difficulty handling a large number of requests.

Strategy setup:

{
  "symbol": "ABC",
  "address": "0x2939b94BDc377e66A377cfc15028DF3Bd6aC6C28",
  "ids": [
    "59",
    "352"
  ]
}

You can test it out in the Playground on Snapshot:

By adjusting the multiplier to 5, if a user owns 1 DAWN in his wallet, they will get 5 Voting Power (1*5).

Strategy setup:

{
  "address": "0x2C56b43983Ca77cc29b27B4a731F0f0d54ae7e52",
  "tokenId": 1,
  "symbol": "DAWN",
  "decimals": 0,
  "multiplier": 5
}

You can test it out in the Playground on Snapshot:

If you'd like to give more or less weight to a list of specific tokenIDs, you can do so by using this strategy. It might serve as a great addition to the erc1155-with-multiplier for VP differentiation.

Strategy setup:

{
  "symbol": "ABC",
  "address": "0x28472a58A490c5e09A238847F66A68a47cC76f0f",
  "ids": [
    "0",
    "1"
  ],
  "weight": 10
}

You can test it out in the Playground on Snapshot:

Last updated