Search

XLM is now listed on the EQONEX Exchange.

XLM is now listed on the EQONEX Exchange.

Trade Now
Crypto Explained

What Is Solidity?

July 28, 2021

Christina

What Is Solidity?
Solidity is one of the most well-used blockchain programming languages, powering the vast majority of the Ethereum ecosystem of applications and tokens.

Blockchain developers use Solidity to program smart contracts

The same team developed Solidity and Ethereum, and, as such, their history is entwined. Solidity was first proposed in 2014 by Ethereum co-founder Gavin Wood and subsequently developed by a team of Ethereum core developers. 

Solidity is an object-oriented high-level programming language, meaning it’s intended to make it easier for humans to write programs that computers will understand. It was designed to be similar to other programming languages such as Python or C++, so it’s relatively easy for coders who know these languages to extend their skill set to Solidity. It also uses similar syntax to languages Javascript.

[Read now: 5 real-world use cases for NFTs]

The Ethereum developer community has defined standards that govern how Solidity smart contracts are used to build dApps on Ethereum. Commonly called “token standards,” some will be highly familiar, while others are more obscure. Here’s a selection:

  • ERC-20: The standard fungible token
  • ERC-721: The non-fungible token standard
  • ERC-809: Refers to the concept of “rival” goods, items where the consumption by one individual prevents consumption by another. For instance, driving a car is a rival, as two people can’t drive the same car at the same time, but gazing at a sunset is not. This token standard defines a rental standard for rival NFTs, allowing them to rent them to other users. 
  • ERC-864: Enables shared ownership of NFTs
  • ERC-874: Weighted non-fungible tokens allowing a DAO to convey more voting power to particular participants

How Solidity is used in Ethereum

Ethereum’s ability to process instructions coded in Solidity is what differentiates it from a blockchain like Bitcoin. Bitcoin can only process instructions that relate to BTC transactions, whereas Solidity allows the Ethereum Virtual Machine (EVM) to translate a potentially infinite variety of instructions. 

Once a developer has written a smart contract in Solidity, they run it through a compiler, breaking it down into a set of instructions rendered in byte code. The EVM can read the byte code and execute it accordingly. 

The generation of byte code introduces an element of economic balance into the process of developing smart contracts. Generating byte code requires Ethereum gas, which must be paid for by the user.

Ethereum is a Turing-complete machine. In principle, anyone could program a Solidity smart contract to do anything on the platform. However, this capability is limited by the practical requirement to buy enough gas.

There are other languages that compilers can process into byte code, including Serpent, Viper, and Mutan. However, they all serve the same function: To allow human-readable code to be compiled into byte code for execution by the Ethereum Virtual Machine. 

Limitations and issues of Solidity programming

Solidity can program almost any outcome as a general-purpose language and is relatively easy to write and quick to deploy. However, writing secure smart contract code is very difficult. Many black-hat operators in the crypto space actively seek out vulnerabilities in Solidity programming to drain accounts of funds. 

Since the value of the DeFi markets started to rise exponentially, there have been many instances of this happening. Digital asset research firm Messari estimated in April that over $284 million had been lost to DeFi hacks since 2019. 

Many projects now use blockchain security audit firms and independent third parties to scrutinize code for deficiencies. However, it’s not a silver bullet, and issues may slip past an audit undetected. 

The fact that blockchains are immutable only compounds this issue. Once a developer publishes their code to the blockchain, they can’t edit or tweak it. Therefore, it must be thoroughly tested and robust enough against attack when it goes live. 

Immutability explains apps like Uniswap have versioning. When the developers want to make changes and introduce new features, they can’t simply add them to the existing version—they must publish an entirely new version to the blockchain. 

Similarly, they can’t stop people from using the old version. They could remove the user interface and make it more difficult, but the smart contract would continue to exist. 

Solidity is the way forward (for now)

Solidity continues to power the biggest ecosystem in blockchain, Ethereum. Despite its limitations, it boasts an active developer base continually updating the code and maintaining smart contract standards. As such, Solidity will remain among the leading smart contract programming languages for the foreseeable future. 

Related Articles

What Is The Ethereum Arrow Glacier Upgrade?

January 11, 2022

Christina

The Ethereum Arrow Glacier upgrade recently went live and made another change to the network by delaying Ethereum's "difficulty bomb" until June 2022. How will it effect you?

Keep up with crypto through EQONEX!


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

What Is Double-Spend, and How Does Bitcoin Prevent It?

December 30, 2021

Christina

The “double-spend” problem is one of the many pieces of jargon that often seems confusing to anyone unfamiliar with cryptocurrencies because it doesn’t exist in traditional finance. Understanding the double-spend problem and how Bitcoin solves it is key.

Centralized Exchanges (CEXs) vs. Decentralized Exchanges (DEXs)

December 21, 2021

Christina

What is a CEX? What is a DEX? Centralized Exchanges (CEXs) and Decentralized Exchanges (DEXs) are different types of cryptocurrency exchanges. What's the difference? And which is best for you?

Stellar Lumens XLM Is Now Listed on EQONEX

December 15, 2021

EQONEX

We’re pleased to announce that Stellar Lumens XLM has become the latest listing on EQONEX, and users can now spot trade XLM against USDC on our exchange.