Photo by Wesley Tingey on Unsplash
When you log into online banking, you give your account number and password and the servers query the database to see how much money you have in that account. It is looking up a big list of accounts and see what balance is written next to yours.
You can think of your crypto address as your account number and your private key as your password. You wallet software manages those for you, but it doesn’t actually “hold” your crypto.
What is a list?
A list is a collection of items that are related. Grocery lists are a collection of items that you need from the store. Santa has two lists, one is a collection of kids that are nice and one is a collection of kids that are naughty. Your phone’s address book is a list of phone numbers with names attached so that you know who you are contacting or being contacted by. Blockchains are lists of “blocks”, ordered by their creation. Tokens are lists of owners and their balances.
Tokens are just lists?
Tokens are applications that run on nodes connected to one of the various crypto networks with smart contract functionality. Ethereum nodes are computers that run the Ethereum Virtual Machine (EVM) operating system and are connected to the Ethereum network, which allows them to update the Ethereum blockchain. The applications are written as smart contracts and deployed in a transaction to the Ethereum blockchain. The smart contracts that manage tokens like USDC are a little bit of programming code and a mapping of balances.
mapping (address => uint256) public balances;
That code is traditionally what you would see in a token contract and represents the primary data store for the state of the token. It says there is a mapping (list) named balances with a row for each address and a positive number for that address’s balance.
This is what a balances map would look like:
That data is from the USDC contract, found here. To query the data, you can just use the `balanceOf()` function and provide an Etheruem address.
What about NFTs?
NFTs are also managed by smart contracts, and are very similar to the fungible tokens mentioned above. The main difference is that NFTs represent unique tokens, so the list is not a list of addresses but a list of tokens. If you have an NFT collection with 10000 tokens, you would have a list that is 10000 items long. Each item in that list would have an owner.
mapping (uint256 => address) internal idToOwner;
That code is traditionally what you would see in an NFT contract and represents the primary data store for the state of the tokens. It says there is a mapping (list) named idToOwner with a row for each token ID and the address that it belongs to.
This is what an NFT owner list looks like:
That data is from the Bored Ape Yacht Club contract, found here. To query the data, you can just use the `ownerOf()` function and provide a number between 0 and 9,999.
If you have a cartoon monkey NFT, your wallet doesn’t contain the cartoon monkeys, the cartoon monkey list contains your address.
How are the lists updated?
The programming code in the contract dictates how those lists are changed. For tokens like USDC, a ‘mint’ function increases the balance of a recipient address in the list, a ‘transfer’ function reduces the balance of one address while increasing the balance of another, and a ‘burn’ transaction just reduces the balance of an address. There are other functions, but these are the main ones, all centered around manipulating that one list of addresses and their token balances. When you are “sending” someone USDC, you are reducing the number of USDC next to your address in the list and increasing the USDC for the recipient address in the list. When you send fiat to Circle to get new USDC, they “mint” some by increasing your balance on the list. When you redeem USDC for fiat, they reduce the balance number for your address and send you fiat.
In an NFT contract, the ‘transfer’ function changes the address associated with that token ID. So if you owned token 12 and wanted to send it to me, you’d just change token 12’s owner on the list to my address.
The contract code controls whether the user trying to update the list has the authority to do so. You wouldn’t want someone else reducing your balance or taking control of your NFT.
Top level native assets like bitcoin and Ethereum work slightly differently, but they pretty much just look up all of the transactions to and from your address to see how much you have received but have not sent.
How are lists an innovation?
The innovation is how the lists are updated and maintained. The computers in the network are able to store all of these lists and keep them in sync, in a secure manner. They have a protocol for updating and agreeing on what should be in the list and what should not be in the list. Reaching agreement, or consensus, at scale is a difficult problem and comes at a compromise of security and performance. New blockchain networks are typically experiments at finding the right balance between those two tradeoffs.
Disclaimer
We, Digital Opportunities Group, LLC, are not providing investment or other advice. Nothing that we post on Substack should be construed as personalized investment advice or a recommendation that you buy, sell, or hold any security or other investment or that you pursue any investment style or strategy.
Case studies may be included for informational purposes only and are provided as a general overview of our general investment process. We have compiled our research in good faith and use reasonable efforts to include accurate and up-to-date information. In no event should we be responsible or liable for the correctness of any such research or for any damage or lost opportunities resulting from use of our data.
We are not responsible for the content of any third-party websites and we do not endorse the products, services, or investment recommendations described or offered in third-party social media posts and websites.
Nothing we post on Substack should be construed as, and may not be used in connection with, an offer to sell, or a solicitation of an offer to buy or hold, an interest in any security or investment product.