What's in a Token?
Value attributes and functions encoded in smart contracts - a brief brief history from ICOs, to DeFi, to NFTs - and practical Legal & Governance implications
This post is a recap of A Hitchhiker’s Sync we had on October 7th. It is a collection of code-based stories from hitchhiking with token projects: some first hand stories in NFTs, some analysis of DeFi protocols and of Fair Launches as participants. The content brings practical insights to be captured in Chapter 3 “Cryptoeconomic Patterns & Applications”, and some questions for Chapter 7 “Decentralizing Organizations” and Chapter 8 “Legal Engineering”. One thing that became obvious is, we’re still flying by the seat of our pants, or
we’re still building the roads, the car, figuring out how to drive and hand out drivers licences all at the same time.
To stay up-to-date with the content development of the community sourced and crowdfunded book on applied token engineering and get an invite to future synchs:
Digital-only value creation, capture, and exchange is being tokenized relentlessly: finance, exchanges, marketplaces, games etc. Those token smart contracts represent business logic, incentive logic, and automation of the decision making process. Thereby Unbundling most of The Firm’s Functions. Human coordination at scale however requires each individual to level up (all without the “help” of HR and managers). A token economy’s net wealth is a function of its participants’ decision making logic, faculties. I would say, we are not yet proficient at the stage of decentralizing the CEO function: the decision making logic. Depending on the complexity landscape, the crowd can be wise or stupid. Which is which is really fascinating. These faculties and landscapes and how a crowd can create their own compass and become a wise community in its new form, is something we will dig deep in the Epilogue of the book (which by the way is the last remaining chapter being curated right now for the book’s 1st edition, yeay!).
But let’s dive into what value attributes and functions are encoded in smart contracts, and thereby make mass coordination on global scale possible - through a protocol.
Take Aways
Programmable value exchange over the internet has huge potential, yet motivations and capabilities of participants and infrastructure are still limiting as of 2021.
Some value attributes like, origin, date, signature, intrinsic value are already captured well with current infrastructure - if value is digital and created as close as possible to the blockchain. Hence, DeFi and NFTs took off.
Banking and financial institutions’ business logic such as spending, saving, lending, borrowing, exchanging, market making, are built up from the fundamental value of accounting on a global digital ledger.
Applications we witnessed are purchases of profit shares, and of collectibles, art, especially “The First…” or “The Only…” preferably both. Trademarks, Inventions, Licencing deals, could really be next, if people choose to accept blockchain transactions’ legitimacy over bureaucreatic stamps and paper-based processes. These can become defacto standards if we agree, building up from “big enough niches” of such value exchange.
Applications we likely won’t witness anytime soon are purchases of sustainably produced goods and services, like clean energy, organic food, carbon-free delivery (packaging, transportation, computing for coordination) and/or CO2 paybacks by means of reforestation and seaweed sequestration, …, because there is yet no markets for these that are big enough, or niche enough, that make employment of a global ledger necessary - and in addition this type of physical value is very much created in the physical space without any digital representation - yet.
Take away: valuable usecase ≠ value that pays off to encode on blockchain for now; historic value is preserved on blockchain, like on no other medium.
This is a discourse that wasn’t much fun before NFTs. Non-fungible tokens aren’t just non-fungible because they have unique ID and allow for easy traceability of transaction history, i.e. traceability of ownership. Non-fungible tokens imprint additional immutable value attributes and set those through functions in the token smart contract. This means the value is not entirely left to the imagination of Mr. Market - nor to all encompassing definitions of SEC.
On blockchains codified intrinsic value can exist.
Yet the plain ERC721 tokens fall a bit short of that potential. In an analysis we find that pioneering projects in the NFT space back in 2017 had much more fun with possibilities of smart contracts, than the ERC721-standard NFTs flooding peer-to-peer markets like OpenSea in 2021. The plain ERC721 contract only tracks ID and previous owners for provenance, and p2p marketplaces like OpenSea only facilitate trades between buyer and seller without using or checking all value attributes of the token - which introduces design incosistencies for provably rare art for example.
Because the potential is that one can program value into self-executing (smart) contracts that capture and share that value with participants according to terms and conditions encoded on a public permissionless infrastructure. I do have to admit that the infrastructure, Ethereum, itself falls short of that potential. But definitely shows it: All information about value is available, and information asymmetries can be overcome in the shortest amount of time given automated transparent processes. Participants can valueate that information qualitatively: subjectively, intersubjectively; and objectively, i.e. quantitatively. Hence -potentially - wealth can be created, accounted, shared and preserved on blockchain very effectively (not yet efficiently).
A brief code-based history
Fundraising v1 - 2017 era
/// @dev Sale(): constructor for Sale contract
/// @param _owner the address which owns the sale, can access owner-only functions
/// @param _wallet the sale's beneficiary address
/// @param _tokenSupply the total number of tokens to mint
/// @param _tokenName the token's human-readable name
/// @param _tokenDecimals the number of display decimals in token balances
/// @param _tokenSymbol the token's human-readable asset symbol
/// @param _price price of the token in Wei
/// @param _startBlock the block at which this contract will begin selling its token balance
function Sale(
address _owner,
address _wallet,
uint256 _tokenSupply,
string _tokenName,
uint8 _tokenDecimals,
string _tokenSymbol,
uint _price,
uint _startBlock,
uint _freezeBlock,
uint _totalPreBuyers,
uint _totalTimelockedBeneficiaries,
uint _endBlock
) {
An ERC20 token contract back in 2016.
The value attributes
A Name & a Symbol: that founders had to fill with vision and brand like in any other business
Total Supply: meant that there will only be this many tokens. Hence if you believed the market size to be a multiple of the supply, and back of a napkin calculation showed you a user would need this many tokens in their user life time…
…Then you would secure a portion of that market value that this token (and founders) promised to represent at cheap prices. And if you were with the project since the beginning even cheaper. So it kind of made sense to back these tokens, because even if the market didn’t turn out to be what the vision promised, you could still make a profit by selling some of it early. Scam?!? Yes, maybe, many (75%).
Value function: Sale( )
In hindsight it is clear this is the literal codification of an investment contract. And SEC did come down crushing on these early Initial Coin Offerings, with a ruling through their TheDAO report in 25 July 2017.
However, there were also many credible open source projects building public permissionless application level infrastructure. They argued that these tokens help fund and coordinate the development of the open source project in a decentralized manner, transparently from day 1; and that the token then will be the commodity of this digital utility network which will be owned by no one used by any one…some day in the future. Putting Ethereum forward as example, this was exactly what had happened. So a Safe Harbor “counter vision” started floating around: If you manage to decentralize the project and renounce all ownership by a central founding group, maybe then the SEC would not come after you. It’s a dance you would not want to get into unless you can lawyer up - and have a Crypto Mom in the regulatory body of your jurisdiction.
Viral Innovation
One thing that spreads like a virus in cryptospace is innovation, by the same token: the space is hyperconnected, always on, copy & paste. Contracts that survive and are successful at some coordination function get copy-pasted, minor variation added, and let loose on a global ledger.
In summer 2017, well into 2018 something else happend: Token smart contracts that have more than a name and symbol and artificial scarcity and a sale() function: namely, functions that execute “business” logic on chain. When you embed business logic into a self-executing contract and deploy on a permissionless world computer - then it’s not a promise anymore. It’s a functioning global “business.” I put that in quotation marks because often the next big thing starts out as a toy. This time it was automated creating, auctioning, selling and gifting of digital “goods”: Cryptopunks and Cryptokitties.
During the same time a real business need emerged: what to do with all these cryptotoken holdings from the ICOs? Why cold hodl, if tokens can earn hot passive income?
Fundraising v2 - BC, AD and the Bankless era
Before COMP and Anno DeFi - the breakpoint in history that made finance a feature
Vasily shared a great excerpt that goes into details of cryptoeconomic patterns of value creation and capture here, detailing with applications across a wide list of DeFi projects. All nine yards incl. staking, liquidity mining from the perspective of the actors in the token network.
Here we will only peak into the smart contract system of a DeFi protocol and into that value creating encoded logic:
Now this is still and ERC20 contract, with obviously value-added functions like accrueInterest()
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
/* We write the previously calculated values into storage */
accrualBlockNumber = currentBlockNumber;
borrowIndex = borrowIndexNew;
totalBorrows = totalBorrowsNew;
totalReserves = totalReservesNew;
/* We emit an AccrueInterest event */
emit AccrueInterest(cashPrior, interestAccumulated,
borrowIndexNew, totalBorrowsNew);
return uint(Error.NO_ERROR);
And many more functions like these that make up the business logic: deposit tokens (as collateral), borrow other tokens (according to your collateral, exchange rate), repay (with interest). But there was one complex function that went viral beyond DeFi:
The Governance Function:
In May 2020, Compound Labs - the company and team behind Compound Finance Protocol issued the governance token COMP - alongside the Decision Making Process automation through a Governor contract, and a Timer, which executes an approved proposal for protocol upgrade after review and voting period. And distributes the rewards of those decisions back to governance token holders.
The proposals are executable code that upgrade the protocol.
This open source set of smart contracts for distributing governance power and responsibility as well as rewards over to all governance token holders spread beyond DeFi, e.g. to Radicle and Gitcoin networks. There were instances of rewards for liquidity providers prior to this already in 2019, e.g. Synthetix using SNX rewards for liquidity providers for sETH/ETH pool on Uniswap. But wiring it all together inspired a whole range of viral activity within DeFi and lead to popularity increase of Fair Launches - i.e. no premine, no VCs, just a working protocol version to be bootstrapped through liquidity providers and coordinated through a governance token.
The most fun, fast, and furious episode of cryptonovela was Sushiswap: a forked off project of the open source Uniswap, with added SUSHI tokens being both decentralized governance and reward for liquidity providers, bootstrapped through a “vampire attack” - sucking the life blood (liquidity providers) from Uniswap through those rewards.
I remember VCs asking what the heck was going on, and people still wondering whether governance token is a thing, when just two weeks later Uniswap anounced UNI.
A sticky cryptoeconomic pattern, of which you will learn more about in Chapter 3.
Increasing liquidity is makes valueflows.
Bankless through Times of Bear and Bull
Payments, Savings, Lending, Investment, Exchanges - if you are dealing (and building, creating) only in crypto you can live comfortably without a bank. Is it risky? Yes! Yet most of these projects were incubated in the crypto winter of 2018, and survived the pretty volatile (yet still upward trending) 2021. Although (cyrpto) humans are still interacting with these protocols, it feels more like alphatesting party of a fully-autonomous public financial infrastructure that other digital goods and services will soon™ use as a feature.
Let’s get back to 2017-18, into the primordial cryptoinnovation soup: remember the Cryptopunks and Cryptokitties with their autonomous toy business of auctioning pixel art and breeding digital kitties on chain? It turns out those Non-Fungible Tokens, years later, would pour in a second wave of normies into crypto.
Trading Collectibles - Utility baked-in into early NFT smart contracts
The most interesting feature of these ERC20 and ERC721 based tokens was that they encoded more than the logic of provenance and rarity:
// seller gets base value plus 60% of the profit
pendingWithdrawals[seller] += offer.lastSellValue + (profit*60/100);
// dada gets 10% of the profit
// pendingWithdrawals[owner] += (profit*10/100);
// dada receives 30% of the profit to give to the artist
// pendingWithdrawals[owner] += (profit*30/100);
// going manual for artist and dada percentages (30 + 10)
pendingWithdrawals[owner] += (profit*40/100);
}else{
// if the seller doesn't make a profit of the sell he gets
// the 100% of the traded value.
pendingWithdrawals[seller] += msg.value;
}
// launch the CollectibleBought event
CollectibleBought(drawingId, printIndex, msg.value, seller, buyer);
The above snippet is from DADACollecible.sol, which is a fork of CryptoPunksMarket.sol with the value-added logic of profit sharing in its acceptBidForCollectible( ) and buyCollectible( ) autonomous marketplace functions.
Although Cryptokitties was exciting enough to clog the network, the historically more interesting aspects of it are implementation of access control, roles, and upgradeability. The chosen variable names sound like relicts from the olden corporate days. However, this was the start of a standardization that foresees the separation decentralizing roles (keys), responsibilities, and enables continuous improvements within its smart contract constructs. The start of DAOability, like we later (scroll up) saw in the Compound Finance smart contracts.
contract KittyAccessControl {
// - The CEO: The CEO can reassign other roles and
// change the addresses of our dependent smart
// contracts. It is also the only role that can
// unpause the smart contract. It is initially set to
// the address that created the smart in the
// KittyCore constructor.
//
// - The CFO: The CFO can withdraw funds from KittyCore
// and its auction contracts.
//
// - The COO: The COO can release gen0 kitties to
// auction, and mint promo cats.
/// @dev Emited when contract is upgraded - See README.md
// for updgrade plan
event ContractUpgrade(address newContract);
// The addresses of the accounts (or contracts) that can
// execute actions within each roles.
address public ceoAddress;
address public cfoAddress;
address public cooAddress;
Exciting as it may be, it is one of crypto’s elephants in the room: waves of normies still prefer platforms over autonomous assets. The more users the more network effects, the bigger the market. It seems it’s impossible to overcome - but it is only what we could call an onboarding pattern: People need handholding in this scary af space - more than just a front-end to smart contracts. At least in the beginning. The NFT space is waiting for its Uniswap moment yet to happen.
Broken process - Broken provenance
There’s of course is yet another elephant: marketplaces like Opensea have an entirely different purpose/protocol: buy and sell. They were never intended to check provenance, maybe there will be add-on improvement; but currently the platform features of Opensea make things even worse: like “lazy” minting. This doesn’t value the moment of creation - but the moment when something is sold.
Tokens like wine
Only in crypto, is 5 years an eternity: that means for many old or abandoned token projects that they became irrelevant - unless it was a collectible: then it meant they became antique!
And this is actually the first time in crypto ever (not even bitcoin maximalists can argue) that tokens have intrinsic value encoded in them - and a blockchain can preserve it like in digital amber. It’s not what normies would expect :)
The value of such tokens does not depend on anyone else!
The 2017 DADA Collectibles have that provenance value attribute. The Cryptopunks have upgraded the rather cumbersome way of checking provenance (counting punks on a composite image) in 2021 to actually put the pixels on-chain, too.
It is revolutionary.
It is horribly wasteful.
However, it wastes what’s abundant: Computing power. And the implications, the potential good, and plethora of innovation this will enable in the future are setting off the initial inefficiencies.
Computing needs electricity - and currently that electricity is generated without using primarily renewable energy sources, so it’s also wasting what’s scarce.
I haven’t taken a flight in the past 1.5 years, and will find ways to offset this in future (if it really must be on Ethereum 1.0) but I believe it is worth it. I feel as bad as if I would work for Shell, a company that makes profit of mining fossil fuels directly. But there are ways to change the dark side of electricity consumption of blockchains (or any digital compute infrastructure for that matter). If our electricity would come from clean energy sources with lesser waste, that wouldn’t be less of a problem. So we can start change there.
But still there’s an equal potential bad: gated digital content and artificial scarcity. Literally reversing all that enabled this viral innovation: open source, creative commons, copy & paste.
This post I think is already overlength, so allow me a cliff hanger. I promised to touch upon legal and governance implications — but I’m cutting that part out as draft for the next newsletter: