Programming languages ​​prevent mainstream DeFi

Asset-oriented programming makes fundamental functions native to the programming language. DeFi needs more of this to improve security.

Decentralized finance (DeFi) is growing rapidly. Total value locked, a measure of money managed by DeFi protocols, has risen from $10 billion to just over $40 billion in the past two years after peaking at $180 billion.
Total value locked in DeFi in November 2022. Source: DefiLlama

The elephant in the room? Over $10 billion has been lost to hacks and exploits in 2021 alone. Feeding This Elephant: Today's smart contract programming languages ​​do not provide adequate functionality to create and manage assets, also known as "tokens". For DeFi to go mainstream, programming languages ​​need to provide asset-centric features to make DeFi smart contract development more secure and intuitive.

Current DeFi programming languages ​​have no concept of assets

Solutions that could help reduce perennial DeFi hacks include code auditing. To a certain extent, audits work. Of the 10 biggest DeFi hacks in history (more or less), nine of the projects were unaudited. But putting more resources into the problem is like putting more motors into a square-wheeled car: it might go a little faster, but there's a fundamental problem at play.

The problem: The programming languages ​​used for DeFi today, such as Solidity, have no idea what an asset is. Assets such as tokens and non-fungible tokens (NFTs) only exist as a variable (numbers that can change) in a smart contract like with Ethereum's ERC-20. The protections and validations that define how the variable should behave, for example, that it should not be spent twice, that it should not be drained by an unauthorized user, that transfers should always be balanced, and nets to zero - all must be implemented by the developer from scratch, for each smart contract.

Related:

Programming languages ​​prevent mainstream DeFi

Asset-oriented programming makes fundamental functions native to the programming language. DeFi needs more of this to improve security.

Decentralized finance (DeFi) is growing rapidly. Total value locked, a measure of money managed by DeFi protocols, has risen from $10 billion to just over $40 billion in the past two years after peaking at $180 billion.
Total value locked in DeFi in November 2022. Source: DefiLlama

The elephant in the room? Over $10 billion has been lost to hacks and exploits in 2021 alone. Feeding This Elephant: Today's smart contract programming languages ​​do not provide adequate functionality to create and manage assets, also known as "tokens". For DeFi to go mainstream, programming languages ​​need to provide asset-centric features to make DeFi smart contract development more secure and intuitive.

Current DeFi programming languages ​​have no concept of assets

Solutions that could help reduce perennial DeFi hacks include code auditing. To a certain extent, audits work. Of the 10 biggest DeFi hacks in history (more or less), nine of the projects were unaudited. But putting more resources into the problem is like putting more motors into a square-wheeled car: it might go a little faster, but there's a fundamental problem at play.

The problem: The programming languages ​​used for DeFi today, such as Solidity, have no idea what an asset is. Assets such as tokens and non-fungible tokens (NFTs) only exist as a variable (numbers that can change) in a smart contract like with Ethereum's ERC-20. The protections and validations that define how the variable should behave, for example, that it should not be spent twice, that it should not be drained by an unauthorized user, that transfers should always be balanced, and nets to zero - all must be implemented by the developer from scratch, for each smart contract.

Related:

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow