Exploring the CyberMiles ecosystem: Virtual goods in today’s (crypto)economy

Mark Brinkerhoff
CyberMiles
Published in
4 min readAug 3, 2018

Fungible vs. non-fungible assets in blockchain, a #CMusecase

Bitcoin is a remarkable cryptographic achievement. The ability to create something which is not duplicable in the digital world has enormous value.

- Eric Schmidt, former Google C.E.O.

For all the money in the world, there are only two types of assets: fungible and non-fungible.

  • Fungible assets are like U.S. dollars or stock shares. Each unit of it is identical to another unit. Fungibility makes them easy to trade. Yet they are not “natural”; there are very few things in the real world that are truly fungible.
  • Real-world assets such as houses, factories, loans, bottles of wine, and companies are all different from each other. They are non-fungible.

Much of the world’s $10 trillion financial industry is to create fungible securities from underlying non-fungible assets so that they can be traded. Yet in the analog world of Wall Street securitization, key details of the underlying non-fungible asset could be lost, and cause the entire system to meltdown — the case in point being the securitization of subprime housing loans that then led to the financial crisis of 2008.

In the brave new world of blockchain-based finance, we’re aiming to make assets digital and programmable. Can you imagine a new way of securitization that preserves and even takes advantage of the non-fungibility of the underlying assets? Let’s explore.

Comparing ERC 20 and ERC 721
The ERC 20 token standard is designed specifically to be fungible, and therefore is similar to traditional money or securities. ERC 20 tokens can be traded easily, but also could lose key details of the assets they represent.

Technically, an ERC 20 token contract manages and tracks account balances as a data array. It provides no way to track individual tokens inside an account. Hence the tokens inside an account are all identical and fungible.

// Partial code
contract ERC20Token {
mapping(address => uint256) balances;

function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}

function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
return true;
}
}

With ERC 721, there is a tantalizing potential for anyone to issue tokens for unique, individual assets. However, today’s public blockchains lack key infrastructure, such as standard oracles, to connect to real-world objects. What is the actual use of ERC 721 tokens today? That’s where the possibilities gets very interesting.

// Partial code
contract ERC721Token {
mapping(address => uint) private balances;
mapping(uint256 => address) private tokenOwners;
mapping(address => mapping(uint256 => uint256)) private ownerTokens;

function balanceOf(address _owner) constant returns (uint){
return balances[_owner];
}

function ownerOf(uint256 _tokenId) constant returns (address){
return tokenOwners[_tokenId];
}

function takeOwnership(uint256 _tokenId){
address oldOwner = ownerOf(_tokenId);
address newOwner = msg.sender;

balances[oldOwner] -= 1;
tokenOwners[_tokenId] = newOwner;
balances[oldOwner] += 1;
}

function transfer(address _to, uint256 _tokenId){
address currentOwner = msg.sender;
address newOwner = _to;

balances[currentOwner] -= 1;
tokenOwners[_tokenId] = newOwner;
balances[newOwner] += 1;
}
}

Computer code makes it possible to create, track and even trade finely-grained digital assets beyond fungible securities. ERC 721, the Non-Fungible Token (NFT) standard, is designed for this purpose. An ERC 721 contract contains data structure to track not only account balances but also each individual token’s owner accounts. You can see there is a lot more data to be stored on the blockchain, and it will have implications on your choice of blockchains to issue ERC 721 tokens.

Addressing the pain points of ERC 271
As a public blockchain optimized for commercial applications, CyberMiles offers the best platform for issuing ERC 721 tokens for real-world assets. The reasoning is three-fold:

  1. The Lity compiler and CyberMiles virtual machine (CVM) proactively prevent common safety problems related to token contracts. As we’ve seen repeatedly recently, Ethereum token contracts are prone to bugs like integer overflow and other programming errors. The Lity compiler checks several classes of common coding errors. Then the virtual machine further protects runtime memory overflows. CyberMiles makes token contracts safer.
  2. The CyberMiles blockchain is optimized for low-cost, on-chain data storage. A characteristic of ERC 721 — and security tokens in general — is that the token contract needs to store a significant amount of related data (such as ownership, transaction history, and chat messages). On traditional Ethereum, on-chain storage is very expensive in terms of gas fees. At CyberMiles, we designed a novel DPoS consensus mechanism that results in a new gas fee structure. CyberMiles is optimized for storing both on-chain and off-chain (but verifiable) data at low costs.
  3. CyberMiles’ Library + Ethereum Native Interface (libENI) functionality enables first-class support for oracles. To represent real-world assets, ERC 721 tokens need to work, as mentioned, in tandem with oracles. However, the cryptographic computation required to interact with external systems make most oracles impractical on traditional Ethereum. For example, to verify a single bitcoin transaction on Ethereum, you need to spend over 370M (or $500 USD) in gas fees. The CyberMiles libENI allows on-demand extensions to the CVM to perform those tasks cheaply.

Looking forward, the virtual machine plus extensions (via hackathons that encourage future development, for example) will solidify the CyberMiles blockchain platform as the best option to issue asset-backed tokens for e-commerce — and beyond.

If you have use cases (e.g. DApps and side chain ideas) for the CyberMiles blockchain, please email business@cybermiles.io for collaboration/ investment opportunities.

--

--

Mark Brinkerhoff
CyberMiles

@5milesapp VP, comms. #ThinkBrink startup consultant. Co-founder, @GayForGood DFW. Former @SM_Dallas VP. Animal, movie, music lover. Raconteur. #TeamOverheard