Crypto Composables ERC-998 — Update 6 “In the Wild”

Haley Summers
Coinmonks
Published in
8 min readSep 11, 2018

--

A recap of the Composables Call held September 6th, 2018 in the NFTy Magicians Discord Voice Channel.

Composables are now “in the wild” with several DApps having implemented ERC-998 into their games. In the wild, the ability to adapt and change means the only strongest survive. And with more use cases being tested, the Composable ERC-998 Standard is becoming stronger and so is the community surrounding it.

If you have a DApp that is using or plans on implementing ERC-998, we would love to have you join the next call!

Background and Previous ERC-998 Updates:

Introducing Crypto Composables, Crypto Composables ERC-998 Update 😊, Update #2, Update 3: “First Contact”, Update 4: “The Namening”, Update 5

NFTy Magicians

Attendees of NFTy Magicians Composables Call:

Summary

The call began with a recap of the last call from Haley Summers, followed by updates to the ERC-998 Standard by Nick Mudge. Brian Burns from CryptoRome and Calvin from BitGuild shared their experiences with implementing ERC-998 into their DApp games.

Haley Summers

Recap of Last Call — Lead by Haley Summers from mokens.io

Matt Lockyer is backchanneling by creating partnerships and finding funding for EIPs. Nick Mudge announced big changes to ERC-998. Recap of Fellowship of Ethereum Magicians Berlin and NFTY HK. The ERC-998 repo now has an MIT license. DApps updates from Mokens.io, Crypto Rome, Mintable, Raxx Token, and Missingno’s post on Centrifuge. Question and answer round robin on the future of ERC-998.

Nick Mudge

Newest updates to material supporting the ERC-998 Standard — Lead by Nick Mudge from mokens.io

Since the last call, the ERC-998 Standard has not changed and it is not expected to change unless there is a major reason to do so. Traversals are probably the most complex part of the standard, so it was decided to add more documentation on the logic of traversal (pseudo code). Nick would like to hear feedback if anyone needs additional clarification.

How CryptoRome is using ERC-998 — Lead by Brian Burns from CryptoRome

CryptoRome

Introduction to CryptoRome:
Brian has been following Matt on ERC-998 and communicating with Nick Mudge. CryptoRome is the first game to use ERC-998 tokens and distribute them to players. These tokens represent composable land: villages that can be composed into towns, and towns that can be composed into cities. Friday, August 31st, 2018 CryptoRome started minting them & sending to players who already purchased land.

CryptoRome is approaching 5,000 ERC-998 tokens out in the wild.

It took four days to push the tokens out through Ethereum network. Friday, September 7th, 2018, the marketplace will go live and players will be able to do transactions with these tokens.

Implementation Lessons

Implementation Lessons of ERC-998 in CryptoRome:
Brian plans on writing blog posts on the implementation of ERC-998 (bottom-up vs. top-down) in CryptoRome to help anyone else who may want to do this. Top advice Brian had was to look at how the tokens will be used in the future.

CryptoRome went with bottom-up, based on the main criteria of how composables deal with ERC-721. If the parent will be ERC-721, use the bottom-up approach. If you are tracking child tokens via enumeration, use top-down. Since CryptoRome already had a way to track their tokens, there was no need for enumeration from top-down implementation. And since they are expanding upward, a bottom-up approach was used.

Brian had some pains with contract size. In hindsight, a proxy contract should have been used at the start. Contract size was offset by smaller end contracts, per feedback from Nick Mudge, which slim down the contract a lot. Brian also componentized functionality and used compiler optimizations.

Next Step — Future

Next steps for CryptoRome:
We want to see large adoption and need to get 998’s listed on wallets and marketplaces like Coinbase, Trust Wallet, and OpenSea. It will have big network effects for the game community. This will allow for cross-game assets to more easily occur. Hopefully, Etherscan will identify ERC-998 tokens once it is standardized.*

*Editor’s Note from Nick Mudge: Etherscan will identify ERC-998 when there is wider user adoption. ERC-998 is stable, with implementations on the Ethereum main net. Likewise, OpenSea will add functionality that shows NFTs owned by ERC-998 tokens when there is wider adoption.

Follow Up Question and Answers for CryptoRome

Q&A Follow Up on CryptoRome:
Question from Nick: “Does CryptoRome game have a user interface to compose land?”
Answer from Brian: ”That’s coming later this month. Right now, have to go to the smart contract to compose/decompose. Town = 4 composed tokens and City = 13 composed tokens.”

Question from Calvin: “Most games use Metamask as login. Why do you use a regular login?”
Answer from Brian: “We have both. We want to attract both Metamask users & non-Metamask users. Look and feel will change tomorrow. We will also improve the login process.”

Question from Calvin: “When you said contract size becomes really big, is it gas cost, or is stack too huge? How much reduction did you get eventually?”
Answer from Brian: ”It’s actually the runtime bytecode size, which cannot go over 24576 or the Ethereum network will block it. You can compile with solc instead of truffle, which is a bit leaner if set optimizes runs to 1 (truffle defaults to 200 runs). This will increase the gas cost for future transactions. I also componentized the functionality into other contracts for other stuff that didn’t need access to the storage. I would recommend others to use a proxy. I expect it would result in a lower gas cost in the future, but have not yet tested that.”

Question from Calvin: “How are you implementing the metadata?”
Answer from Brian: “Implemented everything: enumeration, metadata. Name, description, image, and further data is off-chain. If you follow the metadata standard, you’ll be fine.”

Question from Joseph: “How many layers deep? You mentioned 13 layers deep. Do you have any best practice guidance?”
Answer from Brian: “13 tokens are just 3 layers deep. The bottom layer is the villages, next is the towns, the top is cities. Can go as deep as you want. A transfer is just 1 Ethereum transaction from the top-most node. If you’re writing a recursive function in smart contract, you don’t want to go beyond the 1024 limit. But, probably would not want to go that far.

Question from Nick: “How difficult as a developer was it to implement ERC-998? Personal opinion.”
Answer from Brian: “It is simple to implement, but you have to first wrap your head around use cases and figuring it out. Now that I have a good understanding of the transfer functions, it’s not so bad. For a new person, it is a lot to grasp. Especially when considering if should do top-down or bottom-up. “RootOwnerOf” is a tough function to comprehend at the beginning. The documentation was very helpful. Understanding how you would hit case 8. Hope to add more to a blog post to elaborate.”

Question from Nathalie: “How to add documentation to the project so that people who come 6 months later know where to find it? There are articles spread across different blogs.”

Commentary and answer from Nick, Haley, and Nathalie: Submit links to ERC-998 SubReddit and put a link to the Reddit in the repo readme.

How Bitizens is using ERC-998 — Lead By Calvin from BitGuild

BitGuild

Introduction:
Calvin is an integration engineer for BitGuild, a portal for crypto games with a marketplace and user login, with plans for increased functionality. He works with teams to integrate their games into the BitGuild portal. Calvin started talking to the Bitizens team, a separate studio, about the use of ERC-998 for Bitizens avatar wardrobe, which just launched on BitGuild.

Implementation of ERC-998 in Bitizens:
Bitizens wardrobe: tops, bottoms, footwear are all ERC-721/ERC-998 tokens. Avatar items are not on the marketplace yet. Bitizens does not expect much trading for avatars, but rather the trading of the avatars’ wardrobe items. They are giving away a Lambo car token for each avatar for wardrobe launch. Check out the open sourced contract.

CTO, Mikhail, was in the early discussions for ERC-998 and is a big proponent of it. Initially, Bitizens tried using a contract to own different tokens and then trade the contract, but it is so much easier with ERC-998. The most difficult part was to understand what is and is not possible.

Calvin plans to write a Medium post on how they decided on using a top-down or bottom-up approach. The top-down approach was chosen because the main token will be an ERC-721 avatar. When have more, will talk to Nick about doing a more technical presentation.

The NFTy Magicians hold monthly meetings! We invite you to join the Discord Group to be part of the NFT movement.

Edited and Co-Written By:
Nathalie Chan King Choy
Nick Mudge

Get Best Software Deals Directly In Your Inbox

--

--