project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

DAG Token

A drag and drop UI framework to specify on-chain conditions in order to perform certain action on a smart contract. For e.g. - smart airdrops - create an nft which anyone can mint if they have more than 10 lens followers

DAG Token

Created At

ETHOnline 2022

Winner of

๐ŸŠโ€โ™‚๏ธ Tableland โ€” Pool Prize

๐ŸŠโ€โ™‚๏ธ XMTP โ€” Pool Prize

๐ŸŠโ€โ™‚๏ธ Valist โ€” Pool Prize

Project Description

SuperSolid is a micro framework to specify on-chain conditions in order to perform certain action on a smart contract.

In a nutshell you can use or create different adapters (will be covered later) and create a set of rules (condition set). Condition set will be stored on blockchain as bytes array and can be used to verify a user before a certain action.

For eg => A set of rules can be rule1 = account has 100 BNB ERC20 tokens rule2 = account has > 1 BAYC NFT rule3 = account has <= 100 lens followers condition_set = (rule1 && rule2) || rule3

We can use the final value of condition_set to allow the account to mint SuperSolid ERC721 Token

How it's Made

This project uses unstoppable domains to login into the dapp and then users can go through the list of already created conditions and check if they are eligible for any conditions. If they are eligible they can mint the tokens or else they can create their own condition set(Condition set can be defined as the entire set of rules and operators.) with an easy drag and drop UI which sets the condition rule on smart contract and assigns a token Id in ERC1155 to this condition set. Now anyone eligible for this condition set can claim the token.

Condition set is represented as a binary tree where leaves are Rules, intermediate nodes are operators. This tree is converted into a bytes array using the prefix notation. Operator bytes are calculated as the first 4 bytes of keccak256("and/or/nand") Adapter bytes are calculated as the address of adapter contract and the parameters required in the adapter's evaluate method Then these bytes are stored on smart contract and evaluated at the time to check if eligible for claim

Usecases -

  1. smart airdrops - Airdrops not just limited to balances anymore! More complex conditions can be created and new adapters can be created for custom use-cases such as
  • having more than 100 followers on lens
  • having more than 5 contribution badges on dework
  • having a BanklessDAO membership badge
  1. Fan / Social tokens - If you follow me on lens you can claim this NFT / Social Token
  2. Membership badges for DAOs - DAOs can create gamify the memberships without further human involvement. Few examples might be
  • Holding 100 ERC20 will get you a membership level A badge
  • Holding (membership level A and 200 ERC20 ) or 5 contribution / bounty badges will get you a membership level B

The Sponsor technologies used in this project are -

  1. Polygon - The project is deployed on polygon testnet
  2. IPFS - web3.storage is used to store the information about the condition set and the nft metadata related to that on IPFS.
  3. Lens - we have created 4 adapters on lens and anyone can use these adapters to create complex airdrops or gate memberships.
  4. XMTP - xmtp is used to send messages from claimers to the condition creators.
  5. Tableland - tableland is used as database to store information about condition sets.
  6. Unstoppable domains - unstoppable domain is used for authenticating the user
  7. Covalent - covalent is used to fetch info of tokens claimed and also for profile page of user. We have used 3 endpoints -
    • Get token balances for address: to show all tokens and whether claimed
    • Get NFT external metadata for contract: fetch metadata of nfts
    • Get log events by contract address: get total claimed for a collection set
  8. Valist - valist is used to deploy the dapp
background image mobile

Join the mailing list

Get the latest news and updates