Sign up for Sanctum wonderland and earn points for holding compassSOL! Sign up

Liquid Stake with compassSOL for an 9.77% APY from staking, MEV + fees

Enjoy the freedom of liquid staking in Solana Defi while delegating your stake to the high performance Solana Compass validator. Stake or unstake at any time here, or with a Jupiter swap.

Benefit from our high staking returns and over 2 years experience operating a Solana validator, and receive additional yield from priority fees + MEV tips

Earn 6.8% APY staking with Solana Compass

Help decentralize and secure the Solana network delegating your stake to us and earn an impressive 6.8% APY yield on your SOL, while supporting us to create new guides and tools. Learn more

Stake your SOL

  1. Click to connect your wallet
  2. Enter the amount you wish to stake
  3. Kick back and enjoy your returns
  4. Unstake from your wallet or our staking dashboard

Earn 6.8% APY staking with Solana Compass

Help decentralize and secure the Solana network delegating your stake to us and earn an impressive 6.8% APY yield on your SOL, while supporting us to create new guides and tools.

Learn more

Breakpoint 2023: Solang: Running Solidity Natively on Solana

An introduction to Solang, a tool that compiles Solidity code to run natively on the Solana blockchain.

The notes below are AI generated and may not be 100% accurate. Watch the video to be sure!

Summary

During the Breakpoint 2023 conference, Lucas, a representative from Solana Labs, introduced Solang, a novel Solidity compiler designed to facilitate the running of Solidity smart contracts directly on the Solana blockchain. This breakthrough presents a bridge between Ethereum-developed Solidity contracts and the Solana ecosystem, fostering easier portability and reducing the learning curve for Ethereum developers venturing into Solana. Lucas emphasizes the architectural differences between emulating the Ethereum Virtual Machine (EVM) and running code natively on Solana, and he delineates the advantages of native execution such as performance enhancements and direct interaction with Solana's features.

Key Points:

What is Solang?

Solang is a Solidity-to-Solana compiler that enables developers to write smart contracts in Solidity, the programming language widely used on the Ethereum blockchain, and deploy them on Solana without emulation layers. The tool provides developers with an integrated development environment (IDE) file, which is necessary for interacting with smart contracts through TypeScript code. Solang boasts compatibility with the latest Solidity syntax, grants access to Solana-specific features, and is conveniently integrated with the Anchor CLI, a command tool that streamlines the development process on Solana.

Why Is Solang Significant?

Solang is newsworthy because it bridges the gap between two major blockchain platforms: Ethereum and Solana. This compatibility simplifies the transition for developers familiar with Solidity who want to leverage Solana's fast and cost-efficient blockchain. It reduces the need to relearn programming or port entire projects into Rust, which is the primary language used for Solana smart contracts. Furthermore, Solang supports shared libraries and interfaces, allowing codebase reuse across multiple platforms such as Ethereum, Solana, and Polkadot.

How Does Solang Work?

Solidity smart contracts consist of two parts: the bytecode (program account) which executes the code, and the data account which holds the contract's state. Solang compiles Solidity code into Solana bytecode, which is then deployed to a program account. When interacting with the smart contract, such as calling functions or constructing objects, one interacts with both the bytecode and the data account. Solang also integrates leading Solana features like Program Derived Addresses (PDAs) and allows smart contracts to engage directly with native Solana tools such as the SPL token system.

Solang's Readiness and Contributions

Lucas confirms that Solang is production-ready, citing that it has undergone two security audits with all issues addressed, and documentation is readily available. The tool's examples and codebase are open source, allowing for community contributions. Moreover, Solang aims at providing a developer experience on par with that of Rust in the Solana ecosystem. The team actively seeks contributions in the form of tutorials, additional examples, or library enhancements.

Facts + Figures

  • Solang compiles Solidity code to run natively on the Solana blockchain.
  • It is up to date with the latest Solidity syntax.
  • Solang facilitates interactions between Solidity and Solana's native features.
  • The Anchor CLI tool is used to initialize, test, and deploy Solidity projects on Solana.
  • Unlike EVM emulation approaches, Solang runs contracts natively.
  • Solang supports Solidity constructs in Solana such as PDAs and the SPL token system.
  • The tool can interact with other contracts created with Anchor Rust.
  • It is designed to simplify the transition from Ethereum to Solana for developers.
  • Solang has been subjected to two security audits and is considered production-ready.
  • The tool and its related resources are open source, with contributions welcomed.

Top quotes

  • "Solang is a Solidity compiler that allows developers to write Solidity code and run natively on Solana."
  • "You can do almost anything possible on Solidity if you use Solang."
  • "We support basically all Solana features."
  • "Solang is very easy... you need to learn about Solana."
  • "Solang outputs an IDE file for you to call other contracts in Solana."

Questions Answered

What is Solang?

Solang is a tool that compiles Solidity smart contracts so that they can run natively on the Solana blockchain without requiring emulation. This allows developers familiar with Solidity to make use of Solana's capabilities directly.

Why should Ethereum developers care about Solang?

Developers who are well-versed in Solidity can now benefit from the high performance and low cost of Solana without having to rewrite contracts in Rust or learn a new programming paradigm. Solang offers a gentle learning curve and a faster, simpler transition to Solana's growing ecosystem.

What are the benefits of running Solidity natively on Solana with Solang?

Running Solidity natively on Solana using Solang allows developers to utilize the full suite of Solana's features and optimize their smart contracts for performance. It eliminates the overhead associated with EVM emulation and allows direct interaction with core system functions, such as SPL token operations.

How does Solang compare to EVM emulation methods like Neon?

Solang differs from EVM emulation methods like Neon in that it allows Solidity contracts to run directly on Solana's infrastructure, whereas emulation methods recreate an Ethereum-like environment on Solana, which can introduce additional complexity and overhead.

Is Solang ready for production use?

Yes, Solang is ready for production. The project has completed two security audits and resolved identified issues. Documentation and examples are available, and there’s a strong encouragement for community contributions.