What it does

How I built it

Challenges I ran into

Accomplishments that I'm proud of

What I learned

What's next for Zero Exchange

Set White Paper Author: Felix Feng


We describe a protocol/specification that facilitates low-cost creation and exchange of a basket of ERC20 specification tokens on the Ethereum Blockchain. The protocol aims to serve as an open standard and building block that allows for the creation any conceivable basket of cryptocurrencies, similar to the way that we have index funds and exchange traded funds (ETFs) in the traditional financial services world. Sets are composable as each set is an ERC20 token. It is possible to have a basket that represents any type of desirable holding. Sets of cryptocurrencies are represented in an index contract and are collateralized during the issuance by the underlying tokens themselves. The task of rebalancing could be done by trading an existing basket of tokens for a different basket with different coin weights. Like other open protocols, decentralized governance will be used to continuously upgrade the contract.


With the explosion of new types of cryptographic assets on the ethereum blockchain, there has not been a way in which we abstract a large number of tokens and think about them the same way that we do in the financial world. In the traditional financial industry, we have benchmarks such as S&P500, DJIA, etc. that track numerous stocks and assets. Owning a basket of assets allows investors to diversify and manage their risk in any particular asset.

The only existing method for diversification at the moment is purchasing each individual asset. This is especially cumbersome as assets are traded on different exchanges and have varying levels of liquidity.

Existing Work

Is there any existing work? DigixDao Bancor Prism (mine is free) Set Underwriting

Alice wishes to underwrite a basket of decentralized exchange tokens including 0x, Kyber Network (KNC), and Airswap (ASP) tokens which Bob desires to purchase. Alice generates a child smart contract, specifying the allocations of 0x, KNC, and ASP that this specific basket would contain. Once this basket contract is deployed, anybody can convert the specific mix of ERC20 tokens into a token that represents a mix of decetralized exchange tokens.

Since Sets are ERC20 tokens and composed of ERC20 tokens, you can create a Set using other Sets. Thus, it is possible to create a Set that represents every single issued ERC20 token.

We envision that exchanges would be incentivized to underwrite and list create Sets if there is sufficient demand for it.

Underwriting Function Parameters

Array[ERC20 set] // Currently, there is a max number of tokens per basket Array[ERC20 set values] // There is a max number of tokens per basket Base token denomimation Base token price ERC20 Recipient // Optional Set Token Issuance

Alice now wishes to convert 0x, KNC, and ASP tokens she holds on her account into a Decentralized Exchange (DEX Index) token. Alice gathers the desired sums of 0x, Kyber Network, and Airswap and calls the issue function on the Decentralized Exchange token Smart Contract. Alice authorizes the contract access to her funds, and the contract automatically transfers the specified tokens to the contract as collateral and sends to Alice a Decentralized Exchange token, an ERC20 token that can be exchanged, traded, and converted back into its underlying represented tokens. There only exists as many basket tokens as there are tokens created. In theory, the cost of an issued token should be higher as the issuer had to aggregate the set of tokens and pay gas to convert such tokens into the index fund. There can only exist as many Set tokens as there are issuances.

Issue Function Parameters

uint quantityTokensToIssue (quantity of erc20 tokens) Redeem Tokens

Alice now has a DEX Index token and now wishes to convert her DEX Index token back into 0x, KNC, and ASP tokens - becauses she wishes to use them to pay for fees or to vote on governance. Alice can authorize the contract access to her funds and call the redeem function. The redeem function transfers the DEX Index token to the contract, destroys the token (it will no longer exist), and transfer the corresponding number of 0x, KNC, and Airswap tokens to Alice's account.

Redeem Function Parameters

uint quantityTokensToRedeem Interoperability with 0x and dy/dx

Issuance of Sets can be incentivized through make orders on 0x. For example, if there are not enough issued DEX Index tokens, interested purchasers could create a 0x make order for DEX Index tokens that prices it at a premium to the value of the underlying assets and associated cost to gathering such assets. Relayers on 0x can display such demand for DEX Index tokens and takers can issue DEX Tokens for sale to others. In addition, SET tokens can also be speculated on using options or short sells using dy/dx.


It is possible for portfolio managers and individual investors to rebalance their portfolios by exchanging an Set with a certain mix of assets for another set with the same mix of assets but with different proportions, as long as they are of the same value.


Is it possible to have transfer multiple ERC20 one transaction? // Confirm this is possible. What is the gas cost per transfer? What happens when there's an airdrop of tokens? Are there other index fund protocols / smart contracts out there? Notes

The issue and redeem functions are the most expensive functions

Share this project: