Programming languages prevent mainstream DeFi


Asset-oriented programming is a programming language that provides fundamental functions. DeFi requires more of this to improve security. Expert Take Decentralized finance is growing rapidly. The total value locked, which is a measure of money managed using DeFi protocols, has increased from $10 billion to just over $40 billion in the past two years, after peaking at $180billion. Source: DefiLamaThe elephant is in the room Hacks and exploits cost more than $10 billion in 2021 alone. Feeding the elephant: Smart contract programming languages today fail to provide sufficient features to create and manage assets, also known as tokens. DeFi must become mainstream programming languages that provide asset-oriented features in order to make smart contract development easier and more secure. DeFi programming languages currently do not have a concept of assets. Auditing code could be one way to reduce DeFi’s persistent hacks. Audits work to a certain extent. Nine of the 10 biggest DeFi hacks (give or take) in history were not audited. Nine of the 10 largest DeFi hacks in history (give or take) were not audited. Assets like tokens and non-fungible tokens (NFTs), exist only as variables (numbers that can be changed) in smart contracts such as the Ethereum’s ERC-20. The protections and validations that determine how the variable should behave — such as that it shouldn’t be spent twice, that it shouldn’t be drained or accessed by an unauthorized user, and that transfers should always balance out and net to zero — must be implemented by the developer for every smart contract. As smart contracts become more complex, so must the required validations and protections. Human beings make mistakes. Mistakes happen. Bugs happen. Money is lost. One example: In September 2021, $80 million was made of Compound, one the most blue-chip DeFi protocols. Why? Why? “The knock-on effect” Smart contracts can interact with each other, such as when a user swaps tokens with another. Each smart contract receives messages to update their internal variables. DeFi developers are responsible for ensuring that all interactions with smart contracts are properly handled. DeFi developers are responsible for ensuring that all interactions with the smart contract are handled correctly, as there are no innate safeguards built into Solidity or the Ethereum Virtual Machine. It is double- and triple-checked. This is how DeFi has grown so quickly. There is a demand for self-sovereign and permissionless programmable money, despite all the risks and challenges involved in providing it. Imagine how much innovation could be unleashed by DeFi developers focusing their productivity on features, not failures. This is the kind of innovation that could allow a fledgling industry worth $46 billion to disrupt an industry as large and complex as global finance. Total assets of global financial institutions between 2002 and 2020. Source: StatistaInnovation safetyDeFi is both innovative and safe because it makes it easy for developers to interact with assets. It also makes assets’ intuitive behavior a native feature. The asset-oriented programming paradigm makes it easy to create an asset. The platform knows what an asset is: .initial_supply_fungible(1000) creates a fungible token with a fixed supply of 1000 (beyond supply, many more token configuration options are available as well) while functions such as .take and .put take tokens from somewhere and put them elsewhere.Instead of developers writing complex logic instructing smart contracts to update lists of variables with all the error-checking that entails, in asset-oriented programming, operations that anyone would intuitively expect as fundamental to DeFi are native functions of the language. Asset-oriented programming ensures that tokens cannot be lost or stolen. This is how DeFi achieves innovation and safety. This is how you change the public’s perception of DeFi from one that DeFi is the wild west to one that DeFi is where you need to put your savings. Prior to RDX Works he was a manager at Deloitte and PwC, where he assisted clients in matters relating to governance, audit, risk management, and regulation of financial tech. He is a bachelor of science in geography and economics, and a master’s in mapping software and analytics from Leeds University. The author used a pseudonym to write this article. This article is intended for information purposes only and should not be construed as investment or legal advice. These views, thoughts and opinions are solely the author’s and do not necessarily reflect the views or opinions of Cointelegraph.


Add a Comment

Your email address will not be published. Required fields are marked *