district0x Dev Update - April 17th, 2018

Development progress and product changes from district0x

In the last couple weeks, the team has been working towards implementations of our previous efforts on the CLJS wrapper for IPFS as well as an fx library for our 0x wrapper. With several engineers onboarding in the near future, we’ve also shifted efforts towards planning a series of smaller, more specific tasks.

In addition to all of this, we’ve begun to consider the design patterns originally committed to in the Meme Factory - notably whether memes themselves are represented by an ERC20 or ERC721 token. Below we’ll explore these tradeoffs and how we plan to go about making them.

d0xINFRA Updates

In Progress

Last time, we discussed the issues we encountered when trying to develop a native CLJS wrapper for the 0x Connect library. After troubleshooting many of the issues with the shadow-cljs compiler, we managed to complete the 0x Connect library and have now begun to build a library to cover all necessary re-frame effects in 0x. This effort will continue through the next update.

Completed

In previous updates we mentioned progress we’ve made towards a CLJS library we can use for administering IPFS across all of our tech stack. In order to correctly utilize this library in the browser setting, however, it was necessary to strip down and make as light as possible. After some extensive refining and testing, we’re excited to have this effectively complete.

Additionally, our work on the GraphQL module for future front end development has been extensively documented. This will allow facilitate rapid district building not only for us, but for other developers as well.

Meme Factory Updates

In Progress

As mentioned at the top of the post, the past two weeks have been in large part dedicated to a slight redesign of how we’re proceeding with Meme Factory. Originally, we planned on allowing users on Meme Factory to issue memes ERC20 tokens.

The basic reasoning behind this was pretty simple, and came down to two tradeoffs. First, in the most fundamental sense, the memes issued on Meme Factory *are* fungible. There is no functional difference between individual instances of the same meme card (with the exception of an order of issuance e.g. “#3 of 100”), and so each meme could have a unique ERC20 token that underwrites every instance of it. By affixing the token’s decimals the places to the lowest possible digit, you can prevent subdivision of each meme which forces each card to stay “whole”.

The second benefit to utilizing ERC20s is much simpler — it costs less gas. In most cases, it costs the same amount of gas to issue an ERC20 with a supply of 1 as it does to issue an identical ERC20 with a supply if 1 million. By contrast, ERC721s have an associated gas cost with *each* token issued, which in the extreme limits can easily run into the hard gas limits on Ethereum.

So why bother considering ERC721s given these heavy tradeoffs? To put it most simply, it’s the standard that most closely represents unique digital collectibles. As metadata around the ERC721 standard is formalized across the wallet/dApp ecosystem, these tokens will take an increasingly visual look and feel (a trend not quite present for ERC20s). Memes by their very nature need to leverage their visual component wherever they exist online.

Ultimately, as we developed the bulk of our smart contracts and began to iron out what we think would be a reasonable starting parameter set for the Dank Registry, we realized with a couple of small corners cut that ERC721s could serve the purpose better than ERC20s. Furthermore, by placing the final act of issuance on the meme creator (rather than automatically minting memes as soon as they’re accepted to the registry), we can remove the need for an “initial issuance” marketplace in addition to the secondary marketplace on Meme Factory. Under this model, the meme creator has the authority to issue up to a certain amount of memes allowed by registry voters, and can place them for sale thereafter, all on their own time and gas costs.

What’s Next?

The work necessary to convert our smart contract base to an ERC721 model has already begun, and is expected to continue through the next update. Additionally, expect an opening to the Meme Factory Community Design contest short. We can’t wait to see what you’re all holding in store for us.