Chapter 4. How to Build a DeFi Application or Protocol
DeFi apps are blooming all over, and it seems every chain has a collection of return-generating and yield-farming apps ready to circulate funds. You should take a look at “Anti-Money Laundering and Know Your Customer” before you start your build, because it’s important to see what you need to avoid when building your application.1
Now, let’s talk about the order of operations in developing your DApp. Remember, they all deal with the same basic principles of finance.
Basic Principles of Financial Tools
Let’s review the basic principles of financial tools. First, you have to put your money to work. Sitting in a box or piggy bank isn’t going to do it (I’ve tried). You have to make your money go do something to come back with more; everyone needs a job to get money, and money is no exception. Generally, you’ll be loaning out your money, and this amount of money that comes from your wallet to theirs is the principal.
Next, you have to loan that money to another person or entity—someone who isn’t related to you or your company. Make sure it’s a genuine third party, not one you control or in common control with you. Otherwise, you’re just shuffling money around or, worse, pretending to have revenue you don’t really have. This is called cooking the books, or fraud. It’s not great. Don’t do that.
Now, how does this money generate more money? Because you’ve rented out your cash (you need to get that back), now you also get a rental fee because someone else is using your money and you can’t use it while the borrower has it. Think of it like this: your money is a truck. You rent out your truck (your money), and your whole truck has to come back, and you get a rental fee for using that truck. That rental fee is revenue to you, and we call it interest. That rental fee would be high for someone with a bad driving record or for someone who couldn’t be trusted to return the truck in one piece (or at all).
That’s how credit scores make interest rates vary. A credit score accounts for your history of paying things back and your current liquidity, converted into a three-digit number. This number signifies the risk in lending to particular borrowers. If you have a great score, everyone will want to lend to you, you’re low risk, and your interest rate will be low because lenders are competing for your business. If your credit score is low, you are a high-risk borrower, and some (or many) lenders won’t want to do business with you. As a result, the ones who will lend to you will demand you pay a very high interest rate to account for the risk you won’t pay the loan back, and because they know they can—you are unlikely to get a better deal elsewhere. Brutal, right?
But what happens to determining the riskiness of a borrower when you don’t have a credit score? Blockchain is conducted with anonymized wallets (for now), and there is no history of repayment or liquidity to attach to these transactions. For the most part, blockchain protocols resolve this by requiring collateral of some sort, usually valued significantly more than the amount of the loan. Collateralization will be discussed further, but both methods of reducing risk have problems.
Finally, you need to consider the length of time the money is loaned out. Lenders generally lower the interest rate for a longer lending period, because it guarantees revenue without having to spend time and money to look for a new borrower. Sometimes, however, lenders charge more, because the item is in high demand, and it is being taken out of circulation for a longer period, which means the opportunity to charge more for increased demand is reduced. Either way, longer periods usually mean a greater total amount paid in interest, because interest adds up quickly—especially when it is compounded instead of simple.2
Developing Your Application
This section is for readers who will be building decentralized financial protocols on blockchain. The temptation is apparently very high to merely copy something that already exists and put it on another blockchain—or even the same chain, under a different name. I urge you not to do this. Most of the products currently developed for the DeFi market are either illegal or impossible to maintain under basic business principles. Start from first principles and build cleanly.
Don’t worry about what anyone else is building, or how much money they’ve raised, or from whom. If you are solving a major problem for your market, applying business principles and legal constraints, you’ll be miles ahead of any of your competitors.
Rule 1: Which Market?
Ask yourself the following question: who are you building for?
First we have to think about who your application is for. Which market are you targeting as customers? Every financial market has three general categories:
- Institutional market
-
This market includes large banks or funds that move huge amounts of money around every day. They regularly borrow and loan money to one another, often using stealth markets like dark pools to manage market price.3 These include hedge funds, venture funds, investment banks, and similar entities. They have strong use of financial tools, but not novel ones; they are precluded from taking on more than a certain amount of risk, and new financial tools, such as DeFi, are quite risky. These investors have the benefit of being qualified institutional buyers (QIBs), which have additional advantages like early release from trading restrictions. Large, publicly traded companies (other than those driven primarily by a single person) should be considered part of this category.
- Enterprise market
-
This category includes large and small businesses, or even high-net-worth individuals. It can include smaller banks, small and medium enterprises (SMEs), collectives, DAOs, and other entity types. Large, publicly traded companies (e.g., Apple) tend to be what people think of in this group, but in financial tools (and lots of other things), they act much more like institutional investors.
This group has the largest contingent of novel financial tool use. They have enough money available to generate real returns using financial tools and are not too afraid of risk to try novel approaches. Actually, this entire group tends to be the least risk averse out there but is generally not considered a source of early adoption. They are more nimble than institutions and able to adjust quickly to new conditions. Realizing liquidity is their biggest concern. Investments that don’t lock up assets for years are incredibly appealing.
- Retail market
-
This group includes general consumers and people who generally aren’t accredited investors. They don’t have access to the most important source of wealth building—investing in private companies—so they have to make do with the pieces they get access to. Overall, they tend not to understand the level of risk suitable for their investments and tend to crowdsource investment picks and strategies.4 The lack of information, experience, and expertise available to this group makes them highly susceptible to fraud and scams, which they exercise by creating mildly viral negative social media posts and groups. They are vulnerable and often suffer unbearable loss simply because they do not understand risk or risk management. Both livelihoods and lives have been lost as a result of “novel investment opportunities”—including in DeFi—with risks and consequences neither the founders nor the investors fully understood.
If you want to pursue the retail market, please make sure you are completely aware of the following facts, which make the general industry resistance to the protection of regulation dangerous. This is the group the regulations were designed to protect, and the more we design for this group yet refuse to acknowledge the reason the regulations exist (they don’t know what questions to ask, they are susceptible to emotional investing, they don’t have access to skilled and reliable sources, etc.), the more we seem like the wolves in sheep’s clothing the regulators accuse us of being. To fight this, please take note of the following:
- Retail investors are highly susceptible to abuse and trickery. You have an active responsibility to keep either scams or retail investors out of your space, even if you want to be decentralized.
- Retail investors are also, as mentioned, the group most regulation is designed to protect. More regulation is coming, and you will have significant legal expenses in both hiring counsel and paying for them while they learn how to deal with the new rules and uncertainty.
- Retail investors tend to take losses hard. Because access to investment is an all-or-nothing enterprise in most Western countries (either you have access or you don’t, but there is no path to progressing from no access to access), they don’t have training in risk management. Many have harmed themselves or others as a result. Consider how you will create stop-loss opportunities or other breakfalls to prevent this type of catastrophic loss. Also, consider how you handle leverage and credit. Many retail investors have no idea how to use these tools, much less how to manage the risk. Quite a large percentage have ended up in significant debt after bad trading calls and have taken drastic measures as a result.
If managing these risks is not appealing or possible for you, please do not create for this space.
Consider carefully which market you want to address. Though you may eventually get overlap in markets (Great for you! More use = more money for you!), basic business principles still apply. Let’s take a look at those now.
Rule 2: Did You Apply Basic Business Principles and Process?
Next, we need to apply our business principles and processes. I’m assuming this is a revenue-generating, for-profit entity that is being created, not a nonprofit entity or a money-losing entity. For those who say we don’t need to run a profit, I would just like to point out that money-losing operations don’t last. Even patrons run out of patience for operational black holes. If you can’t build something that at least pays for itself (doesn’t require volunteers to continue running, or continued token offerings to gain value), you don’t have a business, you have a charity. And charities are more work than businesses.
Let’s look at those processes, to make sure you’re running something that can last.
Find a problem
First, you need to find a problem. Note that this is a problem, not an annoyance, not something you’d like to see addressed, or anything that starts with “Wouldn’t it be cool if…?” The problem with most projects, particularly in blockchain, is building something because you can, not because you should. If there isn’t a real pain you can alleviate, or a real benefit (10 times better than whatever people are currently doing to resolve it), don’t build it.
Build your community
Who is going to be in your community? Primarily two types of people: those with the problem you’re investigating, and other developers who either have the problem or want to help resolve it. Both are wonderful and will form the core of your platform. Finding them is your first hack and can be done in many ways, depending on what you are addressing.
Examine the problem
Third, make sure you have taken the time to fully examine the problem. This is where you talk to all those people you’ve been creating community conversations for. “Find a problem” and “build your community” occur repeatedly. Ask everything you can about the problem: what are they doing now, how important is the activity that underlies the problem, what have they already tried, what were the results, etc.
Do not ask about potential solutions, your solution, or features to add.
Release the beta
Then, you release the beta. This goes to your community and those with direct access to your community. Get feedback, refine, and repeat until you are ready for public launch. Done well, this will make your community your chief evangelists, which is how you gain users both cheaply and quickly. Make sure you have your revenue model in place and that your community accepts it. Everyone likes things when they’re free. When cash has to change hands, people start telling you what they really think.
Public launch
Finally! We’re at the public launch. You will need to engage with your community continuously following launch. One of the biggest mistakes protocols make is having very intense engagement for the months leading up to launch, then assuming the product will autopilot after it launches.
Your product will falter on launch, and you will need to continuously adapt, manage, repair, and engage. You will need to keep lines of communication with your community open on both Discord and Twitter to make sure people are always aware of what is happening and how you are addressing it. You want to avoid the worst of all responses: avoidance. In the event of avoidance, your community will find shortfalls (even if they don’t exist), blame you for personal losses, make up a reason that will become a surprisingly intricate conspiracy theory, and crash both your protocol and your TVL. Don’t assume it won’t happen to you. You exist only because people use your protocol. Make sure they know you see them.
If you are selling a token (and have determined that it is not a security), be cautious in releasing founding tokens to the market. Have a lockup or other agreement for tokens held by the founding team, or strictly limit the amount that can be sold to under 10% total. Flooding the market causes users and traders to worry that you’ve created a honeypot (even when the protocol is in active use), or the core team or main developers are taking the opportunity to leave the protocol. Wait, and publish your liquidity strategy so people know when to expect a downward surge on price—and that it doesn’t mean someone is on the way out.
Now what? Well, you iterate and grow. Just like any company.
Rule 3: Where Do You Build?
You can build on a variety of platforms or even create your own. In 2021, the choice was fairly straightforward: you built on Ethereum, or you had no chance of building a community or being used.
The industry has broadened considerably since then. Not only are there cheaper alternatives to Ethereum within the Ethereum system, but there are also a number of platforms that are compatible with Ethereum by bridge (a link between base platforms), backward compatibility (they usually evolved from an Ethereum standard, and the platform token is a derivative of an ERC-20 token), and/or the EVM (the Ethereum Virtual Machine, essentially a code compressor that some people think is a magic device that creates the blockchain version of HTTP. It does not.).
Ethereum is still the largest, most prolific, most used, and most mature ecosystem in the blockchain universe. In addition, the US SEC currently considers Ethereum a commodity, not a security, and therefore not in violation of state or federal securities laws. So, assuming you want to build something compliantly, it is possible to stay completely clear of US regulatory issues, either not being subject to regulatory agencies or, more likely, building in compliance with them. Most other ecosystems have violations baked into the system, making building on them more complex because you are just adding violations on top of preexisting violations.
Accordingly, we’re going to take a more detailed look at Ethereum, including what types of platforms people are building on and connecting to Ethereum.
Platforms and DApps offering DeFi capability are growing every day. We’ll just add some examples of each kind, so you have an idea of what to look for and why.
Option 1: Layer 2 options
Layer 2 protocols are sort of child chains to the Layer 1 parent (here, it’s Ethereum). I think of them as umbilically attached: they aren’t designed to be compatible with other chains and stay nestled within the Layer 1 universe.
Layer 2 options include state channels, rollups, and plasma. Let’s look at each.
Layer 1? Layer 2? Sidechain? What?!
Ethereum is a Layer 1 solution, meaning it is a foundational chain. It is a base protocol, complete with its own consensus, security, governance, and token-based operational system. Layer 2 solutions are protocols and platforms built within the Ethereum ecosystem that take some of the transactional weight off that base chain but don’t do anything independently. They don’t have their own security or consensus; they rely entirely on the base chain (Ethereum) for that. They are strictly performance boosting. Think of this like being an accountant at a company, and your division does taxes for other companies. But your company grew a lot over the last year, and the annual reports are due. The 10 people in your group just aren’t enough. So your boss starts asking for accountants who are free in other groups, then anyone who can help, including the bottled water delivery guy who thinks “numbers are cool.” You’re boosting the amount of work you can produce but keeping it all within the same structure.
Sidechains, on the other hand, are completely separate protocols or platforms, and they have their own security, governance, operations, consensus—and often their own token. They work by a two-peg system, and Ethereum has a particular protocol, the EVM, that assures that smart contracts and code are recognized between the Ethereum main chain and all the Ethereum sidechains. You are working with an entirely different chain when you use a sidechain. You lose your ETH when you use a sidechain because you “buy” into the separate chain; you have to trade your ETH for the sidechain token to engage in that chain’s operations and smart contracts, and you don’t get ETH back unless and until you sell whatever tokens you have when you have completed your sidechain transactions and convert them back into ETH.
Option 1A: State channels
State channels are platforms or protocols between two parties that basically conduct their transactions off the main chain, then transfer the results of those transactions in batches to the main chain to settle. These transactions could take place on-chain but don’t; they take place off-chain because it is (presumably) faster. This works only if they don’t add significant additional risk. State channels work very well for transactions that have simple state changes between parties and require speed to be useful, and the only cost is the cost to open and close the channel.
A few drawbacks are that even when transactions are sent and settled on the main chain, they aren’t final until the channel is closed, which usually requires both parties to cosign closure (but not always). Also, state channels require a lockup of payment to secure liquidity to the channel, which may make this less desirable. Finally, settlement back to the main chain introduces vulnerability in the security of the chain.
Payment systems, for example, are ideal use cases for state channel systems. Let’s look at how this works.
Option 1B: Rollups
Rollups are very similar to state channels, in that they have multiple transactions that occur off-chain, then are batched back to the main chain (they “roll up” a bunch of transactions into one, so you have to pay for only one transaction). However, rollups use proofs to verify accuracy and settle on the main chain, instead of closing transaction signatures. They are controlled by operators, who are node operators, or validators, and often require a stake in the system to ensure they contest incorrect decisions and pay a penalty for contributing to false data.
There are two main types of rollups: optimistic and zero-knowledge (or zk).
Optimistic
Optimistic rollups are a bit surprising, mostly because they require withholding a certain amount of skepticism that is innate to most of us in the space. Here, parties stake a certain amount of ETH to engage with Layer 2. All transactions are assumed to be correct when transferred to the main chain (hence, optimistic), and no judge smart contract or other device is used to ascertain the truth of transfer. Instead, if one of the parties believes the transfer or any of the underlying transactions to be fake, that party then gets to contest the fake transaction(s) by submitting it or them directly to the Ethereum network. The defending party must prove the transactions are correct and not forged, or the staked ETH is turned over to the other party.
Transaction data and state node updates are compressed and stored in a separate off-chain virtual machine (not the EVM) that is not controlled by the child chain operator. They have their own consensus method and governance, but use the main chain for security.
Rollups can take advantage of the EVM, which adds a lot to their arsenal. The EVM provides code, libraries, programming languages, testing tools and toolkits, and a host of other supplies that have been extensively vetted and debugged, all available for use and easily compatible.
Optimistic rollups commit their status at set periods to the main chain, like a state channel, only it is committed automatically. When transactions are finalized, the child chain assets are burned, and the proof of that burn is submitted to the parent chain, where they are minted as new assets for the holder.
They don’t produce immediate final validations, because of the fraud--proof option. You have to wait around seven days before you close to exhaust the fraud-proof period; then transactions are settled finally. If users don’t want to wait this period (and most don’t), they can use a liquidity provider to cash out, less a fee. Liquidity providers can always check the chain for proof by becoming an operator and executing the chain.
There are some censorship risks with bad actors, in that malicious node operators can go offline or refuse to produce blocks or particular transactions within them, can attempt to place their transactions ahead of others’ transactions (front run), or can withhold transactions to prevent final withdrawal. However, most of these are managed by the structure of the rollup. Another operator can take over as a node and produce the next block or execute transactions. Asset owners can use their own transaction data to produce a Merkle tree and prove ownership of the particular asset. And transaction parties can always write their transactions directly to the main chain, circumventing the operator altogether.
Zero-knowledge
Zero-knowledge (zk) rollups are the opposite of optimistic rollups: you have to submit the proof to have the transactions submitted to the Layer 1 chain for settlement. Zk proofs are usually done using a zk-SNARK system, although a few protocols using zk-STARKs are beginning to appear.
Zk proofs allow the person providing the proof (e.g., a password) to confirm the accuracy of the transactions without having to reveal what the proof actually is. This is what we mean by “zero-knowledge”—instead of asking for a password, which could accidentally reveal the password to someone trying to steal it, we ask to reveal proof that you know what the password is, without actually revealing the password itself.
SNARKs and STARKs are fairly similar but have some fundamental differences; see Table 4-1. One major difference is that the genesis, or creation, event for SNARKs requires a hidden parameter that creates the core of that zk proof. If the initial creators don’t destroy this parameter, anyone who knows it could create a “false validation” of any transaction. This means they could get fraudulent transactions approved, or create tokens out of thin air, or any other bad action. This is an enormous risk—you have to trust that the initial creators destroyed access to this parameter. In my opinion, that presents significant risk.
STARKs, on the other hand, hash from the outset, and they do not require any users to trust that the original developers did or did not do anything that can’t be seen in the code on-chain. While STARKs are more expensive to use and take longer, Layer 2 STARK chains are more likely to alleviate these problems while still providing the protection of the STARK system. However, SNARKs are far outpacing STARKs in adoption, likely due entirely to cost and speed.
Zk rollups attach to the main chain via a root contract, and they publish automatic state updates to Ethereum after every transaction. They also send a batch of transactions on a regular basis to Ethereum as a Merkle tree, which includes the validity proof of every transaction. This is the batch of transactions that is settled on Ethereum, and closed immediately.
STARKs | SNARKs | |
---|---|---|
Name | Scalable Transparent Argument of Knowledge | Succinct Noninteractive Argument of Knowledge |
Cheaper | ✓ | |
Less susceptible to quantum computer attack | ✓ | |
Does not require trust in genesis block | ✓ |
Zk rollups are able to produce final transactions without delay, because each transaction is written to the main chain with a validity proof. Transaction data and state node updates are compressed and stored in a separate off-chain virtual machine (not the EVM) that is not controlled by the child chain operator. They have their own consensus method and governance but use the main chain for security.
There is an interesting censorship prevention option for zk rollups. While they can be controlled by “supernodes” to increase efficiency, if anyone suspects the supernode operator to be censoring them, they can write their transactions directly to the main chain, forcing an exit from the child chain and bypassing the supernode operator. Alternatively, child chains can rotate this supernode role to reduce the likelihood of abuse.
Zk rollups tend to cost more than optimistic rollups (500,000 gas as compared to 40,000 gas, respectively) because they include the proofs. However, many more transactions can fit into a zk block than an optimistic block,7 making the per transaction price much lower.
Option 1C: Plasma
Plasma chains are the native child chains of Ethereum. The plasma chain has to tell the parent chain what it’s doing regularly, to keep the parent updated and have a constant state of “settlement.” Otherwise, the plasma chain can’t take advantage of the security of the parent chain.
Ethereum plasma chains use Merkle trees just like Ethereum, and they regularly commit a state update (just like a state channel, but it’s automated) to the main chain. It’s attached to Ethereum by a smart contract bridge called a root contract. Originally, all assets had to be created on the main chain to move to the plasma child chain through the root contract. Now, the root contract allows assets created on the child chain to be as valid as those created on the main chain. Assets are transferred to and from the main chain via bridges. Like optimistic rollups, assets generally aren’t directly transferred across these bridges. They are burned, and the proof of burn is submitted across the bridge. Then the asset is re-created on the main chain.
Like optimistic rollups, plasma bridges have the restriction of requiring 7–14 days of delay before withdrawal of the plasma chain token from the main token. This is because there is a challenge period in submitting the final state to the main chain. People originally had to stake funds to operate on a plasma chain, and they had a period of time to submit a fraud proof if they disputed a transfer. However, many people prefer immediate withdrawal, so platforms like Polygon created a separate bridge (the PoS [Proof of Stake] bridge) that provides immediate transfer of funds or assets but no ability to refute.
Sidechains
Sidechains, on the other hand, live completely outside the primary chain. They have their own consensus, tokens, governance, and security. They connect with Ethereum by sidechain bridges, which pose a risk—every bridge point is a potential access point for a hacker. They typically use the same mint-and-burn system as the child chains discussed previously.
Sidechains may or may not be EVM compatible. Those that are not compatible may have a difficult time creating compatible assets on their own systems, as they may not be able to recognize asset innovations newer than the bridge installation. Sidechain bridges typically do not have constant update and development like the connection with child chains, as internal developers are overseeing all the child chain infrastructure, but neither the sidechain nor the main chain is deployed particularly to maintain and update the bridge.
All these options are summarized in Table 4-2.
State channel | Optimistic rollup | Zk rollup | Plasma | Sidechain | |
---|---|---|---|---|---|
Not limited to two parties only | ✓ | ✓ | ✓ | ✓ | |
Parties don’t have to be identified to one another prior to transactions | ✓ | ✓ | ✓ | ✓ | |
Does not require trust in operator/validator | ✓ | ✓ | ✓ | ? | |
Lowest gas cost per transaction | ✓ | ||||
No data storage problem | ✓ | ✓ | ✓ | ? | |
Transactions are final when entered/ appended to on Ethereum | ✓ | ✓ | |||
Transactions can be refuted | ✓ | ||||
Censorship can be avoided | a | ✓ | ✓ | ? | |
Can use EVM | ✓ | ✓ | ✓ | ? | |
Fastest/most transactions per block | ✓ | ? | |||
Seamless interaction with Ethereum | ✓ | ✓ | ✓ | ✓ | ? |
Public can’t see transactions | ✓ | ✓ | ? | ||
Don’t need to lock up funds to secure liquidity | ✓ | ? | |||
Examples | Connext, KChannels | Optimism, Arbitrum | Loopring, Immutable X | Originally Polygon, but now most are not plasma | SKALE, Gnosis |
a One party can’t really censor the other, but the party can harass the other in a griefing attack, for example. |
Post-merge Ethereum
Ethereum 2.0 (post-merge) is vastly more streamlined with its unique sharding technique, called danksharding, and switching from proof of work to proof of stake.
This created an interesting problem: with Ethereum now running proof of stake, a faster and cheaper form of transaction processing, wouldn’t protocols all want to run directly on Ethereum, rather than on a secondary chain that then has to settle on Ethereum? This is exactly what the Layer 2 protocols were concerned about, and one of the reasons they were so reluctant to have Ethereum pivot to proof of stake.
In the end, the Layer 2 protocols (and the miners)8 reached a compromise. Ethereum would gain significant speed but would not reduce its transaction fees. That was understandable, but a shame—a mature ecosystem operating at a fast and cheap scale would have opened up opportunities for general adoption much quicker.
Option 2: Wallets!
The most recent innovation in the DeFi world has been to build a DeFi DApp inside a wallet, particularly an exchange, accepting as many tokens as possible within the ecosystem. It allows the holder of the wallet to avoid the fees of transferring to and from the wallet, and you can stake directly within the wallet.
Wallets have evolved from the MetaMask or nothing days, but they seem to be going in a few specific directions. The first is general use, or wallets that are user-friendly for easy onboarding into blockchain. As blockchain properties gain national attention, ease of onboarding people entirely new to the ecosystem will be mandatory. Some of these are even centralized, with centrally held passwords for easy retrieval. DeFi seems to be too complex an application for these entry-level wallets, but the UI/UX is truly delightful.
The second direction is the broad holding, basic DeFi wallets. They hold as many coins as possible within a particular ecosystem, and some in adjacent, compatible ecosystems (for example, Ethereum assets and some main Binance tokens and NFTs). They tend to have basic DeFi applications such as a swap exchange and basic staking, but nothing more complex like yield aggregation or flash loan protocols.
The third is the more advanced wallets, and there have been relatively few of those. Those have manual staking and locked staking, yield aggregation, and a variety of loans and vault functions. Options and other derivatives and forward contracts may be available, but those are not possible for tokenized assets in the US without using a registered token exchange like INX.9
Ideally, more wallets will be added with better capabilities that include advanced DeFi applications, and built in a compliant manner using a registered exchange. The great UI/UX of the introductory wallets would be very appreciated in complex wallets—I’m not sure where the desire for complicated functions to look like early 1990s DOS comes from, but I wish it would just die already. A great interface would allow for easy walk-through of functions, including a summary and highlight of risks so new users would be alerted to the risks of particular transactions before starting.
All the ecosystems discussed here have DeFi wallets already built as an option or are wallet-accessible.
Option 3A: Binance
Binance is a Cayman-based chain that was originally a Layer 2 of Ethereum, which gained enough traction to branch off on its own. It is still easily compatible with the Ethereum ecosystem and uses much of the same naming and terminology (e.g., Ethereum’s ERC-20 token is renamed the BRC-20 token, etc.).
Binance grew enormously after its launch in 2019 because it used proof of stake, a much cheaper and faster consensus method. As interest in blockchain grew, gas prices rose dramatically for Ethereum, which limited the ability of people to take part in the crazy price surges and even bull runs that seemed to keep popping up overnight. Binance was optimized for fast, cheap trading—but couldn’t run smart contracts.
Binance then launched the Binance Smart Chain (BSC) as a parallel chain in 2020 to fix the shortcomings of the main chain (the main chain was renamed the BNB Beacon Chain in 2022). The BSC was able to provide fast, cheap transactions, and permitted the use of smart contracts, which immediately set it up to be a challenger to Ethereum. The Binance ecosystem is the largest ecosystem in the world, transacting more cryptocurrency than any other ecosystem. It is an excellent system for the demands of DeFi.
However, it operates now nearly entirely offshore (not in the US). It is fully centralized, in that the entire system is controlled directly or indirectly by one person: Changpeng Zhao, also known as CZ. Binance has had multiple regulatory issues in nearly every primary jurisdiction, and it operates primarily in Africa, South Asia, the Middle East, and parts of Europe. Binance prefers to leave jurisdictions rather than revise operations and comply with regulations. Most recently, Binance is subject to a regulatory action by the CFTC in the US.
These violations make it more challenging to build on Binance and be clear of violations in the US. US builders will already be subject to US law, and may not be able to build on the Binance system without considerable difficulty and challenges by the Binance founding team and/or the US regulatory system. As of this writing, Binance has halted US dollar withdrawals, which is a major issue for even non-US-based users.
Other regulatory jurisdictions also have issues with Binance, so please be aware of any legal challenges you face in building on that chain.
Option 3B: Tron
Tron is a Singapore-based chain founded by Justin Sun, in conjunction with Samsung, Poloniex, and a few companies that he also owns or controls, like BitTorrent. It was originally designed as a peer-to-peer system that would allow content creators to directly transfer content to their consumers, under the title “Decentralizing the Web.” Content providers did not pay a fee to the Tron network. Instead, its users paid the network and the providers to access the providers’ content or applications.
Tron is extremely compatible with Ethereum, given that it uses the same base language, Solidity, the same types of smart contract, and the interchangeable token protocols. It has two key differences from Ethereum, however: it processes 2,000 transactions per second, and it costs nearly nothing. In fact, its fees have run as low as $0.000005. That is hard to beat in terms of value.
As a result, it hasn’t really developed a killer app as much as a reputation as a solid payment platform, particularly in dollar-denominated payment coins such as Tether (USDT) and Circle (USDC). This makes Tron extremely popular in countries that don’t have easy electronic payment transfer in peer-to-peer form, such as PayPal or even Venmo, and have a local currency that is less stable than the US dollar.
It is considered fairly centralized, given the ownership of the chain itself and its corporate nature. However, non-US builders may find Tron to be a particularly desirable ecosystem on which to build. DeFi DApps would place little strain on the system, and the cost of transactions would likely be negligible. Tron isn’t easily available in the US, but the US may not be the desired market.
Option 3C: Solana
Solana is a 2017 Swiss-based chain that came to prominence in the US in 2019. It was promoted as the Ethereum killer, and it looked as though that may have been possible, particularly when the cost of gas soared in 2020 and 2021. It operates using the Rust language.
Solana had a revolutionary concept, combining proof of stake with proof of history to end the bottleneck presented by software in scaling up transaction speed. In attempting to scale up to Visa’s maximum of 65,000 transactions per second, founder Anatoly Yakovenko realized putting a trusted clock to record a timestamp on transactions would greatly speed up the ability to prove or disprove transactions. Using the clock on each independent node, messages that were accepted or rejected by timestamps could be automatically synchronized across the network instantly.
The combination of proof of stake and proof of history has a theoretical upper limit of 710,000 transactions per second on a 1 gigabit network. However, it seems to average 5,000 transactions per second, with a peak of 65,000 transactions per second on a test net.10 Its average cost per transaction is $0.00025, compared to $1.68 per transaction for Ethereum.
Solana has a few problems, unfortunately. It hasn’t reached its projected pinnacle of speed, largely because of insufficient transaction demand. It suffered outages due to major attacks (one in 2021 and one in 2022), and there is no real evidence to assume it is any safer from major attacks than it was before. It also has an unfortunate connection with Sam Bankman-Fried, the owner of the fraudulent FTX platform and Alameda fund. Bankman-Fried was a prominent supporter of Solana and held a huge number of Solana coins, which are now being held in the bankruptcy proceedings. He was also the primary proponent of Serum, the popular Solana DeFi exchange, which further dropped the value and utility of the chain.
This doesn’t mean that Solana isn’t a good candidate for a great DeFi application. The success of Serum shows that demand is certainly there in the ecosystem, and a significant amount of community support remains for the project. It’s unclear whether it can reach anywhere near the speed promised. If it can, it will exceed any known payment system speed and become the default of both centralized and decentralized networks. Provided it can become more attack- and failure-resistant, of course.
Option 3D: Tezos
Tezos is a 2014 Swiss chain that went live in 2018. It was designed to make creating DApps faster and easier for the digital community. It runs on a unique bilingual system: an imperative language (Michelson) for designing its smart contracts, and a functional language (OCaml) to build security in the blockchain. Imperative languages, like Solidity and Michelson, are designed to create flexible smart contracts, while functional languages, like Ocaml, are strictly mathematical, and designed to be extremely robust and secure. This maximizes the strengths of both, while offsetting the weaknesses.
Tezos averages around 40 transactions per second on its main chain, but 1,000 transactions per second including scaling with rollups.11 The 1,000 tps limit is set by the maximum amount of allowable gas. This could be adjusted by governance or off-chain use, if the community wanted. It is well designed for DeFi applications.
Tezos is focused on decentralization and community cohesion, in that it avoids the possibility of forks. Votes require an incredibly high 81% approval in order to assure community acceptance and prevent hard forks. The network also passively amends constantly in order to maintain a constantly updated status, also preventing the need for a fork.
It uses a consensus method called liquid proof of stake, which allows anyone with one tez (listed as XTZ) to participate in electing a delegator.12 Holders who wish to participate stake their tez in a process called baking and hope to be selected as one of 32 random delegates for the next block. If selected, they are rewarded by being able to charge transaction fees for all transactions within that block.
Tezos is still a fairly small system, however, and is not compatible with Ethereum directly or via EVM.
Option 3E: Avalanche
Avalanche is a Singapore-based chain that launched in 2020. It is a proof-of-stake chain that is designed to be cheaper, faster, and more secure than Ethereum. It has a unique feature of having three distinct, interconnected chains:
- The X-Chain (Exchange Chain)
-
This is a DAG. DAGs have traditionally had faster processing speeds, but at the expense of security. This particular one was built before a number of innovations in security were developed in this area (which is 2022–2023), so is unlikely to have any of the most recent advancements in security. This layer is the exchange layer, where users’ assets are held and transferred.
- The C-Chain (Contract Chain)
-
This is the smart contract chain. It is EVM compatible and can work with any Ethereum or Ethereum-compatible DApps.
- The P-Chain (Platform Chain)
-
This is the base chain that coordinates all the nodes and creates the subnets that create expansion in the Avalanche network. Each subnet can create its own consensus, governance, economic model, etc. It can be public or private. These are like the internal child chains of Avalanche that rely on the platform’s security, but otherwise function fairly independently.
Avalanche uses a particularly complex consensus method called random subsampling. It’s a proof-of-stake chain, but instead of the traditional voting and staking mechanism, a random sampling of volunteer validators are asked to vote on a group of transactions for validation, then revote and revote, sharing information, until consensus is achieved within a specific time frame.
Generally, Avalanche is given good marks for speed and cost, processing approximately 4,500 transactions per second with an average cost of $0.13 per second.13
However, though it is supposed to be immune to attack below 80%, a network bug shut down the network in March 2023. More concerning was the insistence of the team that the network was not, in fact, shut down, despite evidence to the contrary. This lack of opacity and confusion made the Avalanche token, AVAX, stumble along with its reputation. It seems to have recovered, but people are still watching to see if it falters again.
Option 3F: Cardano
Cardano is a 2014 Swiss chain that still is not in its full public release. It is a proof-of-stake chain that has shown quite a lot of promise, but the build is so excruciatingly slow that what was cutting-edge at the time of starting the build (proof of stake) is nearly as outdated as the proof of work Charles Hoskinson was improving upon. It isn’t cheap, fast, or well-known, so it’s not likely to be a leading contender. However, it is a leading force in Africa, so for those building there, it may be a solid start.
Option 3G: Polkadot
Polkadot is a 2016 proof-of-stake chain that is based in Switzerland and was launched in 2020. Polkadot is an interesting development in the blockchain world; it and Cosmos (discussed next) had a new take on how to build infrastructure. Instead of building a platform and then trying to connect it with other chains, both of these chains are Layer 0 platforms. They sit beneath Layer 1 chains and are essentially a network of bridges to other chains. They provide interoperability and allow developers to create Layer 1 platforms in minutes to sit within these Layer 0 networks.
The Polkadot layer is called the relay chain, and it provides core security, consensus, validation, and interoperability for all the Layer 1s. You also stake the native Polkadot token, DOT, on the relay chain.
The Layer 1s are called parachains, and they are auctioned off to developers and users who wish to build within the Polkadot ecosystem. Layer 1s are built within a structured protocol called Substrate, which makes building the parachain more standardized and easier to integrate. All the parachains are proof of stake, but any applications, programs, conditions, etc. the parachain wants to add can be put into the parachain easily.
Polkadot also offers a parathread, which is a “pay as you go” blockchain model for those who don’t need continuously operating blockchains.
Polkadot averages approximately 1,000 transactions per second,14 and the average market price is approximately $0.54.
One major event in Polkadot’s history occurred in 2022, when a major hack tanked the primary stablecoin in the Polkadot ecosystem, Acala. This is particularly problematic because Polkadot provides the security for all the parachains and parathreads. The system works only if the relay chain keeps everything moving. However, Acala never recovered. The primary concern is no clear upgrades or updates in security were released. As with Avalanche, we keep an eye on this and keep moving.
Option 3H: Cosmos
Cosmos is a Swiss-based project that launched in 2019. At first glance, it seems very similar to Polkadot, in that it is a Layer 0 and provides a method for developers to easily create new blockchains. But, other than those two items, they are quite different. What’s really remarkable about Cosmos is it allows blockchains to use and trade assets from other, unrelated blockchains—even if they aren’t compatible.
These assets don’t have to be locked and wrapped or burned and reminted. They can travel freely from one chain to another as though they were native. This, in my opinion, is true interoperability.
The Cosmos network consists of three main layers:
- Application layer
-
This processes transactions and updates the state of the network.
- Networking layer
-
This allows the transactions and blockchains to communicate with one another.
- Communication layer
-
This allows all the nodes to agree on the state of the network.
Cosmos runs through a central hub, which connects all the developer-created chains, called zones. Cosmos provides a free set of tools for developers (an SDK) that runs a protocol called Tendermint Byzantine fault tolerance (TBFT). This allows developers to build blockchains without coding them from scratch, and the application blockchain interface connects the completed zone to the hub.
Unlike Polkadot, Cosmos isn’t there to provide security—though the TBFT assures a certain amount of security. It is basically an air traffic controller, making sure the validators in the zones all work together as a network, even though they are fundamentally working on completely different chains. The validators on the chains are all tied together by the native Cosmos token, ATOM. The ATOM token is staked by validators and locked up indefinitely. The top 100 stakers are validator nodes,15 though smaller holders can delegate their staked ATOM to receive rewards. Users can switch validators to delegate to as often as they want, which does give a measure of community trust to those validators with significant holdings of delegated ATOM.
The Validator Weakness
The only drawback is the one described in “The Validator Weakness” in this section.
Beyond this, all the blockchain developers can develop whatever they want. They can have their own token or use ATOM. They can be public or private, have whatever consensus or security measure they wish, have whatever governance they want, choose validators however they want. The Inter-Blockchain Communication Protocol allows these disparate chains to communicate, and everything is recorded three times: to each zone and to the hub.
Building a DeFi application in the Cosmos system would be straightforward and would allow a vast array of assets to be staked or pooled. The ability to use nonnative assets as though they were native opens up an enormous avenue of opportunity in the range of assets that can be used in a particular application as staking or as collateral. The SDKs have been extremely popular, and the use of the Cosmos protocol has been exploding.16
Option 3I: Algorand
Algorand is the sleeper here. It is a Boston-based project released in 2019. It had initial buzz as a much cheaper, faster Ethereum alternative that allowed you to create any tokens or applications easily.
It uses a consensus method called pure proof of stake. In this method, instead of a few people with the most tokens (often the wealthiest network users) becoming the validators, Algorand puts every Algorand token holder into a pool of potential validators. You must hold only a single ALGO to be part of this pool. One holder is randomly selected by Algorand’s Verifiable Random Function to open the next block.17 Then 1,000 other ALGO holders are randomly selected to form a temporary committee. The committee members are unknown to one another. The members then vote on whether to accept the block proposed. Once this is approved or rejected, all the members go back into the pool, and the process restarts with the next block.
This creates more security, as any attacker does not need to focus on wallets with the most tokens. It must focus on all wallets at each block opening, as it has no idea which wallets are the validators at any given time. And that means a 100% attack requirement, which makes it significantly more secure than Ethereum.
In addition, all transactions are final once the block closes. There will not be any forking, and there is no waiting 6–12 blocks for finality. Once the next block opens, all sales are final, and the opportunity to contest or revise, such as it may have been, is over forever. It produces 6,000 finalized transactions per second.
Finally, there are no gas fees on Algorand. It has a flat fee of 0.001 ALGO, which is $0.000165 as of this writing.
It’s not the fastest or the cheapest, but it is one of the strongest in terms of security and transparency, and it seems easily fast enough and cheap enough to attract winning applications. The main reasons Algorand isn’t discussed as often or considered in the top potential ecosystems are likely the concentration of its tokens in the hands of founders (over 50%) and the inability to attract successful DApps to date. It is a vicious or virtuous cycle, and Algorand needs to figure out where it sits in this battle.
Option 3J: Sui and Aptos
Sui and Aptos included were released in 2023, both from teams that were part of the failed Facebook/Meta blockchain/metaverse project. These chains are fascinating innovations on the DAG and modularity, using object-oriented or modular architecture to process transactions much more quickly. They both rely on parallel execution, or processing multiple transactions simultaneously, rather than one at a time like traditional blockchain. This is the “quantum-like” computing we see developing in the future until actual quantum computing becomes available for commercial use.
Unfortunately, we haven’t seen enough beyond early purchased hype to know how good these systems are and how hardy their networks and communities will be. It’s really quite early for both of them. We can keep an eye on these to see how they grow, but they have some excellent potential.
Rule 4: What’s Your Token, and Did You Apply Proper Tokenomics?
Tokenomics, as noted previously, are the economics of tokens—what makes a token valuable. Before creating complex tokenomics, first make sure you understand the difference between revenue models and tokenomics. Tokenomics are more like your stock structure, or bus tokens, or loyalty points, or money substitutes, or game tokens, or even an envelope of rights. None of these are revenue models—they are not what brings money in your door day after day, and they don’t represent the key to growing value in your company. They may represent captured value in your company, but not the value of what you put into the marketplace. If they do, you are doing this wrong, just like so many others in the industry, and will, at some point, fail disastrously.
So, your business does something. It’s on a blockchain. It’s a DeFi protocol (that’s why we’re here, right?). And you generate revenue. You are likely selling access to earn or borrow money in some context.
But you decide you must (not might—must. You must.) offer tokens. They are required for a certain purpose. First, you need to figure out that purpose. There are a few key purposes.
Types of tokens
The primary purposes are utility, currency, securities (the fundraising kind), governance, and nonfungibility. A single token can do one or more of these roles, sequentially or simultaneously. It’s one of the unique things about tokens, and one of the strongest arguments for a new form of regulation.
You’ll likely be developing them for the first four purposes, but may use all five in your protocol, depending on what you develop. Let’s look at each of them.
Utility tokens
Utility tokens are the bus tokens. They are ETH when used as gas fees, and tokens that make transactions move through and across chains. They are the easiest to justify, the least regulated, and also the least likely reason to create a token. Unless you are building a new Layer 1, your platform will need to connect with the Layer 1 of your ecosystem—Ethereum, Binance, Cosmos, etc. So you could just use the base token of that system. You are not required to create a new token, and you are making the Layer 1 ecosystem more valuable if you use the base token of that Layer 1 system. It should also make your token more interactive with other applications, and grant finality to your transactions easier and faster.
This is the only type of token sale you can really call revenue. If these tokens are being created and sold in response to demand and represent actual use of the protocol, they may be a whole or partial substitute for revenue.
Why wouldn’t you want to use the Layer 1 token? Good and bad reasons here: a good reason is there is not enough supply of the Layer 1 for your protocol. You anticipate heavy use, and all the Layer 1 has been issued and is being hoarded or not recirculated in large quantities. You’ll need to create a new token to avoid making your transactions very expensive. You could also be playing a game in your protocol, and the base token doesn’t have enough technology to manage the DeFi protocol and the game dynamics.
On the other hand, a bad reason would be just wanting to raise capital. That’s making your token stock, and you’re now in the securities field—and you need to treat your token like it’s a security, and your buyers like the investors they are (with the protections they deserve).
Currency tokens
Currency tokens are tokens or coins that are used like money. These are generally stablecoins (discussed extensively earlier) or other tokens that are used for payment. They may or may not be exchanged directly for goods and services, or they may just be a means of exchanging different fiat currencies or a fiat and cryptocurrency.
These are regulated by the Treasury and FinCEN, among other agencies, and regulations can vary from state to state. You will likely be required to register as a money services business and/or a money services transmitter. These regulations will be changing significantly under FATF, as discussed previously, and three pieces of legislation currently regulate these tokens. If this is what you’re offering, you’ll need to stay abreast of current legislation, because it will impact your business significantly.
Securities tokens
Securities tokens are the ones that most people are pretending don’t exist, but we all know they dominate the tokens that currently circulate. When buyers are more interested in the market price of the token than the use of the token, you’re looking at a security.
Many people have been relying on “the Howey test” or “the orange grove test” to determine if their token is a security. This refers to a 1946 case that resulted in a four-factor test to determine if something is a security because it is an investment contract.18 The four factors are: (1) an investment of money, which is interpreted as an investment of value, (2) in a common enterprise, (3) with the expectation of profits, and (4) solely or primarily from the efforts of others. Essentially, it requires investment in something, with the hopes that other people doing their jobs will make your investment gain value.
SEC Analysis of the Howey Test
The SEC has put out a paper discussing their analysis of the Howey test as it relates to tokens. You should definitely review this document, which can be accessed at https://oreil.ly/ud4Xa.
There are a few important notes. First, the analysis does not outright say all tokens are securities. This means you have to use a good securities attorney to complete an analysis—but also that you can design your token to not be a security. Second, the SEC indicates not just how they interpret each of these elements, but also how to make your token more or less likely to be considered a security (use this wisely!). Third, you will do better looking at this before you design your token and tokenomics, rather than after. It’s hard to undo things on blockchain after they’ve been initiated. Finally, note that this may not be the test used for DeFi. As I discuss in this chapter, Reves is the one you should likely be focusing on, though you should keep Howey in mind for non-DeFi aspects. As always, confirm your analysis with your own counsel.
So, even if the primary test in DeFi is Reves19 (which is discussed in “So, What’s This Reves Test?”), let’s go ahead and clarify one thing: if your blockchain isn’t even functioning, or your protocol doesn’t work, and you’re trying to sell tokens, you likely have a security.
If this is what you have, find some great securities lawyers who understand crypto (there aren’t many, unfortunately, but the number is growing), and look at your registration and exemption options. Registration options are likely to fall under Regulations A/A+ or a traditional Form S-1 offering, or an exemption under Regulations D, S, or CF. Be certain you’re dealing with registered brokers, dealers, alternative trading systems, and/or exchanges if you use them, and file all documents if exempt!
Governance tokens
Governance tokens give holders the right to propose and vote to approve or reject other proposals on the platform or DApp. These can deal with fees, development, audits, hiring, firing, forking, launching, burning, or any other item related to the underlying protocol. These tokens generally don’t have any sort of regulatory issues related to them other than, possibly, shareholder vote issues under the securities rules. However, this has not been established as of the date of this writing.
Nonfungible tokens
Nonfungible tokens (NFTs) are not interchangeable with other tokens of the same type. These NFTs are essentially ownership rights with a digital link that connects to an asset. This asset could be a digital asset (music, digital art, code, a digital document of provenance) or a digital representation of a physical asset (a deed to land, a rental agreement, a car title, a title to a specific collectible).
These asset-backed tokens are issued in a set amount that links holders with either full ownership or a defined set of rights, and the owner of the original asset can still retain interest in the original asset (like offering a private limited license in an art asset, but holding the remaining title for themselves). These assets can be traded between owners, but the rights remain the same unless changed on the blockchain for that holder or all holders.
These may be securities, depending on the type of asset, the type of NFT, and the nature of the offering—so please be mindful!
Applying Tokenomics
Tokenomics typically apply to securities tokens—how the token gains value in the market. But that’s really too narrow an application. You need to apply tokenomics to every type of token you employ. And looking at your tokenomics will show you if your multiple uses (e.g., a utility token, a security token, and a governance token) have tokenomics that work against one another, and require different tokens or changes in structure. Remember that unless these represent actual use of your underlying protocol, any tokenomics do not represent revenue. They are one-time income.
Your tokenomic model will vary based on the token’s goals and what you are creating, but here are some of the factors you will need to consider.
Supply
Supply has two parts: maximum supply and circulating supply. For maximum supply, you need to determine whether you will have a hard cap. The argument for a hard cap is that tokens with a limited total number of tokens issued (whatever that number is) will gain value because a certain amount of scarcity exists. However, we must remember that scarcity is not, in and of itself, useful. Scarcity creates a floor below which price can’t fall, and that floor is based on the amount of demand.
Scarcity matters only when people want that particular token or asset. After all, if only 21 million pieces of dog poop are in the world, that doesn’t make each individual piece of dog poop suddenly more valuable. Why? Because there is zero demand for dog poop. If you tell people there are only 21 million pieces, they won’t rush to grab what’s available; they will walk over what they see and say “good.”
So make sure you base your maximum supply on how much you think you will need to create to have enough to meet the requirements of whatever you are building. If there is more demand than supply, the price will increase. If not, the price will fall. But if there isn’t enough, people can’t use it. If you are not trying to limit price or availability, you may not need a maximum supply.
Circulating supply refers to the number of tokens actually available to purchase, rather than created and held in treasury or in a locked account. These are the tokens you’ve issued. You need to have enough to meet the minimum amount of use the token is designed for. Circulating supply and maximum supply are important for securities tokens, where price and availability are key factors in demand, and every increase in circulating supply will likely drop the price. When circulating supply is low because most of the maximum supply is committed to founders and “partners,” particularly when those insiders have little or no lockup period, this is a signal that may harm your price and keep away serious investors.
Distribution
How are you offering the tokens? If a security, it has to be compliant with securities regulations. If not, are you dumping them all on the market? Giving some people a right to purchase first? Giving everyone a fair shot (called a fair launch) to purchase, whether they are an insider or not? Are you matching demand for the token, or hoping demand meets the supply you offer?
Moderation
Do you need a method of moderating supply or use? Is it possible to use up all the tokens, or do you need to maintain a specific value? If so, is there a method of adding tokens to inflate value or simply increase supply? Do you have a method to deflate value or decrease supply, like rebasing, buybacks, or burning? How are those determined and conducted? What is the purpose—to maintain or manipulate value? To ensure available supply? Something else?
Backing
What is the core value underpinning your token? How are you assuring it maintains its value? Do you require collateral? How much, and how is it stored? When do you liquidate? On what terms? When do you pay out? On what terms? How does the market (such as interest rate changes or inflation of fiat) impact your economic modeling? If you hold a token that represents collateral held on another protocol, how do you fall in terms of liquidation rights?
Also, how do you approach the specific issues of your token type? For example, if governance, for example, are you ensuring an easy governance participation and communication structure, and active community participation for more proposals and voting? If it’s a currency, are you actively maintaining whatever supports the liquidity of the coin? If a utility, is the underlying protocol gaining users? Are you constantly upgrading and iterating to ensure more onboarding and use of the protocol, and that it is solving a real-world need? If a security, are you providing a real asset value for investors? If an NFT, is the underlying asset worth investment, and is it maintaining its value? These are vital to ensure long-term viability and limit concerns with fraud and scams.
Incentivization
Are you incentivizing the right people—the ones who actually generate value for your protocol? Make sure you align any incentives with the people who are putting in value—that may not always be the people who put in cash. For example, in the Axie Infinity game, all the incentives were directed toward NFT holders, when, in fact, it was the NFT renters who were driving adoption and value for the game. Know who is making your DApp work, and drive as much value as possible toward them. Anything else causes eventual collapse.
Many more issues arise when it comes to developing your particular tokenomic model for your token(s), but these comments identify some of the main issues in creating tokenomic models. They are quite complex and need to be created with care. Please don’t just copy someone else’s model; it is probably a copy of someone else’s, also—and a bad one, at that. Create your own.
Know how the value flows in your system. If you don’t, you’re going to either scam others or get scammed yourself. Hopefully, neither is what you want.
Rule 5: Did You Audit Your Tech?
Please, please, please—audit your tech before your public launch! And after your public launch. And at least every six months. Get an independent auditor to make sure your smart contracts work as intended without breaches or holes and that there are not clear security breaches in the user journey of your DApp. Check access to bridges and wallets in particular.
Every time anything you connect with updates, conduct a new audit for everything relating to that updated connection. Publish your results, and switch auditors every year, or two years at the outside. Have an active bug bounty program, and pay those who find bugs. It’s a constant battle to keep the crypto streets clean, and every protocol, platform, and DApp of any type has to do its part.
Rule 6: How Do You Launch?
There are many ways to launch now, any of which are fine as long as you are not offering a security. These include launching via a centralized exchange in an initial exchange offering (IEO), via a decentralized exchange in an initial DEX offering (IDO), from your website in an initial token offering (ITO), as an airdrop, and a few other formats. If you are offering a security token, you will need to conduct either an exempt or registered offering and stay strictly within the regulations (just as nearly every other stock offering does).
There are so many variations depending on the nature of your market and the size of your community, whether you attach to another community or draw from your own, whether you have a beta test that offers useful tokens or dummies, or a wide variety of other issues. Here, again, you need to speak with counsel who is seasoned in doing these offerings to understand the options available to you and the cost.
Conclusion
We’ve covered a lot here, including a good look at what you’ll need to know to build a financially viable product and the basic business principles and processes (or why and how to build). We took a deep dive into the Ethereum ecosystem and all its key concepts, and a more tailored look at other ecosystems you may want to consider. There’s a lot to think about! But don’t quit now—we’re about to get to the best part: how to make money in DeFi.
1 I’m assuming, of course, that you don’t plan to scam anyone or hack accounts. If that’s your goal, please put this book down immediately and do one of the following: (1) read one or more books on ethics, (2) volunteer to help someone in dire need, (3) find a therapist, (4) join a cult, preferably on an island. That last one is mostly just to keep you away from the rest of us.
2 Simple interest is calculated on the principal per period. So, if it’s 10% simple interest per year on $1,000, the amount owed at the end of the year is the $1,000 + (10% of 1,000), or $1,100. Compound interest is calculated on the principal plus accumulated interest per period. So, if it’s 10% interest compounded quarterly per year, the amount owed at the end of the year is calculated using the formula CI = P[1 + R100T –- 1], where P = principal, R = annual interest, T = annual period, or $1,103.81. The more compounding periods and the longer the period the principal is rolled over, the more extreme this difference between simple and compound interest.
3 Dark pools are financial markets that allow large buyers and sellers to move huge amounts of cash or security interests without moving the market price until after the entire deal is closed and registered. Without these pools, the price would change significantly with each chunk of securities bought or sold. Not only does this impact the potential profit or loss of any party, but knowledge of these movements can result in retail investor panic or poorly executed greed, such as attempting a short squeeze without knowing how or when to move in or out of it. Poorly executed greed also makes retail investors subject to a wide variety of low-level scams, which can destroy livelihoods.
4 Crowdsourced investment picks are found in various subreddits, through social audio and traditional social media, and similar places. They are productive places for scams, and great long-term investment strategies rarely come from these sources. They are not the place for thoroughly (and properly) researched and vetted information.
5 Degen is a community term of endearment for degenerate. Degens populate most speculative areas within the blockchain space, particularly the NFT and DeFi communities, often combining the two when possible. They flip and trade, with short-term strategies (or no strategy) designed solely to maximize gain. They hold no allegiance to chains, tokens, communities, or projects, but cluster into tightly held “alpha” communities to pass along information about which tokens/projects/memecoins—even memestocks—will start to rise in price. They are not value investors. They generally do not orchestrate illegal activity (to my knowledge), such as actively promoting pump-and-dump or honeypot scams. They are welcome in most communities as a way to spread news and generate activity in any particular token, and they were among the first to promote and use Compound when it offered transaction benefits for borrowers.
6 For example, Solana uses a “concurrent Merkle tree,” while Hedera uses a “Hedera-optimized virtual Merkle tree.”
7 This is mitigated in part by using BLS (Boneh-Lynn-Shacham) signatures, which save significant space by aggregating multiple signatures on an elliptic curve. The cost per transaction would then be nearly equal to zk rollups, per Vitalik Buterin.
8 The Ethereum miners were also reluctant to pivot, for a different reason. Proof of stake does not use mining, so their source of income (relatively free Ethereum gained by mining) would no longer be possible. They could move to becoming validators on the chain, but they had a new problem: as miners, they set the gas fees for transactions and took a share of those massive costs. With much lower transaction costs, and no say in the transaction fees, this revenue stream would also be reduced or cut off.
9 In the interest of disclosing all potential conflicts, note that the author is an advisor to INX.
10 Peter Wind, “Solana TPS–Will Solana Handle 600,000 Transactions per Second Soon?” CoinCodex, March 20, 2023, https://oreil.ly/AWUcn.
11 “We’re Doing 1 Million TPS on Tezos! Here’s How,” Nomadic Labs, August 24, 2023, https://oreil.ly/Os07I.
12 In the older model of delegated proof of stake, only those holding high numbers of tokens were able to participate in electing delegates, removing large chunks of holders from the governance process.
13 Salomon Kisters, “Avalanche Versus Solana—Which One Is Better?” OriginStamp, March 24, 2023, https://oreil.ly/LjkZP.
14 Ningwei Qin, “Polkadot Eyes Increasing Transaction Speed by 100 to 1,000 Times,” Yahoo! Finance, September 27, 2022, https://oreil.ly/Mscug.
15 This, unfortunately, does mean the wealthiest are always making the decisions. Moreover, this is a weakness in the system, as being able to identify the wallets that are most likely to be validators limits who must be attacked to control the system. That is a fundamental weakness in rich validator systems.
16 Over 20 blockchains use Cosmos, including Binance, the permissioned Chinese blockchains, Cosmos Hub, and Crypto.org.
17 As randomly as is possible without quantum computing.
18 SEC versus W.J. Howey Co., 328 U.S. 293 (1946).
19 The primary test in DeFi will likely be Reves v. Ernst & Young, 494 US 59 (1990) (the “family resemblance” test).
Get Understanding DeFi now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.