The heart of any decentralized application ecosystem, DApps, is the core technology suite. For Ethereum (ETH), this is the compatibility of Nakamoto, the Ethereum Virtual Machine (EVM), and the Solidity programming language. Together, these technologies have enabled smart contract developers to transform Decentralized Finance (DeFi) from concept to reality.
For DeFi to take the next leap – towards mainstream adoption – scalability is the technology requirement that receives the most attention. But one often overlooked but no less important aspect of top-tier platforms is their approach to smart contract development.
While Solidity and EVM are the key technologies that undoubtedly made Ethereum the pioneer of DeFi, the pioneers also make all the mistakes. Have you ever wondered why there is an endless series of DeFi hacks and exploits today? This is the result of a programming approach that makes token management very difficult. Because when Ethereum was created, DeFi didn’t even exist yet.
But fixing this is not easy. It is not possible to make major changes in Solidity and the EVM, as this will destroy most of the existing DApps. So there is a real opportunity for new platforms to learn from and improve the developer experience because the optimized DA applications these developers create can drive the next wave of DeFi adoption.
Why DeFi Development Is Difficult For Ethereum
Be it decentralized lending and lending tokens, NFT game tokens, artwork or financial derivative tokens, it supports almost all uses of DeFi and cryptocurrency.
The only token that the Ethereum platform naturally understands is ETH. All other tokens, whether it’s ERC-20, 721, 1155 or some other standard, exist only as variables (plain old numbers) in each smart contract.
Tether token – USDT – is a list of the accounts and related balances in the USDT smart contract. The same goes for Shiba Inu (SHIB) and all other Ethereum-based tokens. That’s why you can’t exchange ETH for Uniswap (UNI) and instead, oddly enough, you have to replace Wrap-ETH (wETH), which is an ETH-20 backed and maintained ERC-20 token.
cause problems. You cannot “send” tokens from one person to another because the tokens are not in the user’s wallet. They only live as a balance linked to an account within each contract.
To exchange USDT for SHIB, a message is sent that your USDT contract account is debited and your SHIB contract account is credited. However, the debited USDT from your account must be transferred to another account in the USDT contract, similarly, the SHIB debited in your account must come from another account in the SHIB contract.
With the burden of introducing new token into each smart contract and developers securing their contracts in all possible scenarios, developers spend almost all of their time, up to 90%, on testing and validation. This gives them little or no time to create what they really want: DeFi functionality.
With such a frustrating experience for developers, is there a better way?
Tokens as a basis for DeFi development
DeFi is about tokens. This means that tokens do not have to be secondary in the development process – they should be front and center – completely at the heart of the platform.
This is why the right programming language can accelerate the development of not just one platform, but an entire industry. An example of how to do this is Radix, a Layer 1 protocol that uses “asset-centric” programming and is represented by the Scrypto programming language.
How it works? First, the tokens are no longer specified in the smart contract, as in the list of accounts and balances shown above. Instead, the tokens live on a separate level, according to the rules imposed by the platform. Just as the Bitcoin platform ensures that BTC cannot be used twice, leaked or lost in a transaction, asset-centric programming provides the same logical behavior, but for every token created on the platform.
When you follow these rules, the tokens get the same properties as the pocket coins. You can give it physically to someone else, but the platform ensures that the token cannot be in two places at the same time, nor can it disappear.
Given this physical behavior, DeFi developers can intuitively create DeFi DApps the way they draw them on the board. Words like “take” and “put” in a programming language take the tokens and put them in their place.