Token Standards in The Sandbox

The Sandbox
The Sandbox
Published in
5 min readOct 5, 2018

At The Sandbox, we spend a lot of time looking at how to preserve security and integrity for assets on the blockchain while still allowing the speed and flexibility that players and creators demand. As with many aspects of game design, you can’t get everything you want easily, so it’s a matter of balancing elements to find the best possible solution.

The myriad of creations from The Sandbox will exist forever as NFTs on the blockchain and can be traded on 3rd party NFTs marketplaces for extra liquidity

We have been running some evaluations of the cost in Gas for minting and transferring our user-created NFTs. The results, as you can see in the table below, are astonishing and quickly revealed the limits of ERC-721 for our specific use-case, which is to allow anyone to make their own NFTs and decide how many copies of them they want to sell or trade on our marketplace.

Creating a single 3D Voxel Model and setting the scarcity to 1,000 (thus Minting 1,000 tokens with ERC-721) would represent a bare cost of $346 USD just in Gas Fees!

Simulation of Gas Costs with a sample implementation of each Standard (*)

(*) These implementations were made only for the purpose of this exercise and have not been particularly optimized For example, the Asset ERC-721 is using the ERC721 Token OpenZeppelin’s implementation with extra storage for keeping track of the creator.

This is why we have been looking at alternative solutions.

In the process of evaluating our needs for The Sandbox, we have defined six key parameters that our system must support:

  1. Provide Interoperability & Compatibility: We want to be compatible with wallets, other crypto games and other marketplaces like OpenSea and OPskins.
  2. Allow Copies of NFTs: Creators must be able to easily mint, manage and sell thousands of copies of their creations.
  3. Permit Composable Tokens: In The Sandbox, BOX worlds and AVATAR characters must be structured to allow other tokens to exist inside them.
  4. Economical Gas Transaction Prices: Every transaction/operation must be as cost-effective and efficient as possible.
  5. Facilitate Shared Ownership: This will allow users to own and share revenue of a BOX or ASSET among several users, which is important in our vision.
  6. Operate On-Chain & Off-Chain: With on-chain NFTs we provide true ownership, scarcity and the freedom to trade on third party marketplaces — but allowing users to trade off chain on our marketplace will lower the barrier to entry in our ecosystem.

Is there any single protocol that can satisfy all six of these requirements? Let’s take a look at current standards and see.

ERC-721

By using two contracts — one to track the supply and another to track actual items — it is possible to use ERC-721 by itself. This has the advantage of wide compatibility, but the drawback of a high price of gas (the metering unit for use of the Ethereum “World Computer”):

ERC-721 + ERC-20

This potential solution looks to use both the fungible ERC-20 token and the non-fungible token of ERC-721. Combining the use of these two accepted protocols could provide a compatible option, but will still remain expensive in terms of gas:

A Voxel Dragon, one of the many NFTs on The Sandbox marketplace

ERC-1155

The ERC-1155 standard was designed to create a shared platform to allow the transfer of magic items from different games. It allows multiple unique items to be delineated in a single smart contract, so perhaps it could be adapted to our purposes:

ERC-721x

The ERC-721x standard proposes to be fully backward compatible while being “a smarter token for the future of crypto collectibles” with support for multiple fungible classes and Plasma Cash while greatly reducing gas cost. While there are still issues to be solved, it could be another potential avenue to explore:

ERC-1155 and ERC-721x each have the same number of pros (four) and cons (three) in the tables above, and each can make a compelling argument. Our current research suggests that ERC-1155 is more compatible with ERC-721 than ERC-721x is, and that could end up tipping the balance toward it.

Initially, we thought that adding a proxy system to ERC-721x to allow us to update our smart contract easily in the future would be a good workaround for ERC-721x, but there are complications that could result in a higher gas price. A second approach of using an adapter contract where data resides in a smart contract that contains a set of data manipulation functions is also being considered. The adapter contract could then be used to implement different standards for the same data simultaneously — however, since each adapter would have a different address there could be issues with wallets supporting both ERC-1155 and ERC-721x since they would show duplicate items.

While neither of our proposed ERC-721x workarounds offers optimal performance at present to work seamlessly in The Sandbox’s ecosystem of NFTs and MFTs, we’re not the first group to tackle 721x, which allows us to see how other developers are considering it as we look for ways to potentially refine our approach. But our present sentiment is that using a proxy or adapter system to avoid picking an existing standard will cause more issues than it solves. Picking a standard and helping driving adoption and specification by participating in the conversation may be the optimal way forward.

Conclusion

At the present, The Sandbox is leaning toward using ERC-1155 while working with other developers to optimize our approach and drive adoption. At present, ERC-721x doesn’t provide a clear way forward for our needs, but should we find a new approach we’re still open to changing.

If you’re using ERC-1155 or ERC-721x we’d love to hear your thoughts, so please let us know!

Example of The Sandbox Composable NFT: a BOX holding several ASSETS inside it

--

--