Skip to content
Fundamental Concepts

Solidity

Linguagem de programação criada para escrever contratos inteligentes que rodam na Ethereum e em redes compatíveis com a sua máquina virtual.

Key points

  • Solidity is the most widely used programming language for writing smart contracts on Ethereum and on networks compatible with its virtual machine.
  • Code written in Solidity is converted into instructions that the Ethereum virtual machine executes on every node in the network.
  • Because it concentrates so much on-chain development, it is also where many of the flaws exploited in attacks originate, which demands care and auditing.

What is Solidity?

Solidity is a high-level language designed specifically for creating smart contracts. Instead of writing directly the instructions that the virtual machine understands, the developer programs in Solidity, using a more readable syntax, and then compiles that code into the format executable by the network. It is the tool that translates a contract's logic into something the blockchain can run.

How it works

A contract written in Solidity defines data and functions: what the contract stores and what it does when called. Once written, the code goes through a compiler, which turns it into low-level instructions. These instructions are published on the blockchain, and from then on any transaction that calls the contract executes that logic on every node, identically.

Because contracts often control value and are generally immutable once published, writing in Solidity requires extra attention. A subtle error can open the door for funds to be drained, with no way to reverse it. That is why audits, extensive testing, and well-established security patterns are part of serious development.

The ecosystem around Solidity is large, with libraries, tools, and reference contracts that help avoid common mistakes, although they do not eliminate the risk entirely.

Why it matters

Solidity is the gateway to building on-chain applications in the Ethereum-compatible ecosystem, which concentrates a large part of decentralized finance and tokens. For a company evaluating whether to integrate smart contracts, understanding that the service's logic and security live in this code helps gauge the risk of depending on it.

Limitations

The immutability of contracts makes Solidity errors especially costly, since a published flaw cannot simply be fixed. The language also has quirks that lead to mistakes if poorly understood. Mastering Solidity is not enough: you also need to know specific security patterns to avoid the most common pitfalls. That is why serious contracts undergo independent audits before handling significant value.