How a game engine for DeFi could facilitate accelerated development

Published at: Feb. 1, 2022

The beating heart of any ecosystem of decentralized applications, DApps, is its underlying technology stack. For Ethereum (ETH), this is its “Nakamoto” consensus, Ethereum Virtual Machine (EVM) execution environment, and Solidity programming language. Together, these technologies have allowed smart contract developers to propel decentralized finance (DeFi) from concept to reality.

For DeFi to make the next leap - to mainstream adoption - scalability is the technological requirement that garners the most attention. But an often overlooked but equally important aspect of layer-one platforms is their approach to smart contract development. 

While Solidity and the EVM are the core technologies that allowed Ethereum to unquestionably be DeFi’s pioneer, pioneers are also the ones to make all the mistakes. Ever wonder why it feels like there are a never-ending series of DeFi hacks and exploits today? It’s the result of a programming approach that makes it incredibly hard to manage tokens securely. Because when Ethereum was being designed, DeFi didn’t exist.

But a fix isn’t easy. Major changes to Solidity and the EVM aren’t possible as this would break the majority of DApps that have already been built. Therefore, newer platforms have a real opportunity to learn from and improve upon the developer experience –– because the improved DApps that those developers build could enable the next wave of DeFi adoption.

Why DeFi development is hard on Ethereum

Whether it’s tokens for decentralized borrowing and lending, tokens for an NFT game or art piece, or tokens for a financial derivative, they are at the core of practically every use case in DeFi and crypto. 

However, the only token that the Ethereum platform natively understands is ETH. All other tokens, whether under the ERC-20, 721, 1155, or any other standard, only exist as variables (regular old numbers) inside each smart contract.

The Tether token – USDT –– is a list of accounts and associated balances inside the USDT smart contract. The same goes for Shiba Inu (SHIB) and every other token built on Ethereum. This is why you can’t swap ETH on Uniswap (UNI), and, instead, you have to, bizarrely, swap wrapped-ETH (wETH), which is an ERC-20 token backed by ETH held in custody.

This brings problems. You cannot “send” tokens from one person to another because the tokens don’t live in a user’s wallet. They live only as a balance associated with an account inside each individual contract.

To swap USDT for SHIB, a message is sent to debit your account in the USDT contract and credit your account in the SHIB contract. But the USDT debited from your account must go to some other account in the USDT contract, and likewise, the SHIB credited to your account must have come from some other account in the SHIB contract.

With the burden of implementing a new token in each and every smart contract and for developers to ensure that their contracts are safe under all possible scenarios, developers spend nearly all their time, up to 90%, on testing and validation. This leaves hardly any time left over for them to build what they actually want: DeFi functionality.

With such a frustrating developer experience, is there a better way? 

Tokens as the core of DeFi development

DeFi is all about tokens. This means tokens shouldn’t be an afterthought to the development experience - they should be front and center - right at the very core of the platform.

That’s why the right programming language can accelerate the development of not only a single platform but an entire industry. An example of this being done is Radix, a layer-one protocol, which uses “asset-oriented” programming and is introducing it with its Scrypto programming language.

How does it work? First, tokens are no longer defined inside a smart contract, as with the list of accounts and balances described above. Instead, tokens live in a separate layer, following rules that the platform enforces. Just as the Bitcoin platform enforces that BTC can’t be double spent, drained or lost in a transaction, so too does asset-oriented programming ensure these same kinds of logical behaviors but for every token created on the platform. 

With those rules in place, tokens gain the same properties as you would expect from a physical coin in your pocket. You can physically give it to someone else, but the platform guarantees that it is impossible for the token to be in two places at once, nor can it disappear. 

Given this physicality of behavior, DeFi developers can then build DeFi DApps as they would intuitively draw them on a whiteboard. Words like “take” and “put” in the programming language actually take and put tokens in places.

No more defining the rules of finance within every single smart contract, from scratch, as with Solidity. With Radix, developers are provided all the tools they need to build secure code quickly –– supercharging their productivity.

Ultimately whether developers flock to a new paradigm or prefer the old one depends on a fine-grained balance between the network effect of the old versus the advantages of the new.

Learning a new approach to developing DeFi takes work. And this is especially risky if the ecosystem you’re building for is starting from scratch, compared to one with thousands of DApps, mature developer communities and millions of users. 

But as we saw over 2021, new layer ones can grow quickly. With the right execution, there’s a chance that we may see a new upstart in town. One that might very well be capable of galvanizing a community of developers laser-focused on the mainstream adoption of DeFi.

Learn more about Radix’s Scrypto

Disclaimer. Cointelegraph does not endorse any content or product on this page. While we aim at providing you with all important information that we could obtain, readers should do their own research before taking any actions related to the company and carry full responsibility for their decisions, nor can this article be considered as investment advice.

Tags
Related Posts
Pragmatism: The true key to unlocking crypto mass adoption
When Bitcoin (BTC) launched in 2009, it was motivated by the distrust of financial institutions and their fees and the inflationary practices by central banks during the Great Recession. Bitcoin was supposed to usher in an era of decentralization, financial inclusion and democratization. Yet more than a decade later, with Bitcoin prices surging, we’re witnessing the digital asset being hoarded by large, centralized financial institutions, risking the principles behind its creation. Bitcoin is now in danger of being predominantly in the domain of the financially included — exactly the types of institutions that the creators sought to avoid in the …
Decentralization / Jan. 26, 2021
Conquering Decentralized Finance: Enter the Custodians
The future of finance is decentralized. Striving to facilitate that prognosis, decentralized finance — or DeFi — is quickly shaping into an alluring prospect for investors and companies alike. Looking to harness this decentralized ideal, rivals to the Ethereum-centric sector are feeling the fear of missing out and leveraging their own blockchains in order to gain dominance. Reaching an early climax this year, DeFi breached $1 billion in locked assets. For the Ethereum ecosystem, this stood as a significant boon, drastically increasing its value proposition — and leading competitors to turn their heads. With the Ethereum ecosystem intrinsically linked to …
Decentralization / May 31, 2020
This cryptocurrency wallet aims to provide secure and easy access to the crypto world
Bitcoin (BTC) was the first cryptocurrency, originating back in 2009. By offering a set-in-stone monetary policy combined with "permissionless-ness" and radical openness, Bitcoin presented an alternative opt-in financial system -- one where economic freedom reigns. The crypto space has since expanded far beyond Bitcoin. Largely driven by smart contract platforms like Ethereum (ETH), users now have access to an entire decentralized finance (DeFi) ecosystem, on-chain programmable art (in the form of nonfungible tokens, also known as NFTs), crypto-based games, and much much more. Given that less than 5% of people globally own Bitcoin, we can consider the cryptocurrency to still …
Decentralization / Oct. 25, 2021
From DeFi year to decade: Is mass adoption here? Experts Answer, Part 2
Yat Siu of Animoca Brands Yat is the executive chairman and co-founder of Animoca Brands, which delivers digital property rights to the world’s gamers and internet users, thereby creating a new asset class, play-to-earn economies and a more equitable digital framework contributing to the building of the open Metaverse. “2021 was the year of NFTs, and in the second half of the year, we saw a growing emphasis on GameFi. This trend will continue well into 2022. Real mass adoption of DeFi will happen via GameFi, which will explode in growth during 2022 as the potential for mass financial inclusion …
Decentralization / Dec. 22, 2021
Top 5 cryptocurrencies to watch this week: BTC, MANA, MKR, ZEC, KCS
Bitcoin (BTC) has been relatively calm during the weekend as crypto traders try to rebuild the markets after the Terra LUNA debacle. With macro factors not supportive, several analysts expect the recovery to be a slow grind. Crypto research firm Delphi Digital said in a recent report that the rally in the United States dollar index (DXY) had pushed its 14-month relative strength index “above 70 for the first time since its late 2014 to 2016 run up.” Historically, 11 out of 14 such instances had resulted in the DXY rising about 5.7% over the following 12 months. If the …
Adoption / May 16, 2022