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: A Fireside Chat on Solana Security with Anatoly Yakovenko and Thomas Lambertz

Anatoly Yakovenko and Thomas Lambertz discuss security in Solana, challenges and solutions for smart contract verification, and much more.

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

Summary

In an insightful conversation, Anatoly Yakovenko, the co-founder of Solana, and Thomas Lambertz, co-founder of Neodyme, delve deep into the nuances of blockchain security, particularly within the Solana ecosystem. They explore the Rust programming language's role in enhancing security, the importance of proper input validation in smart contracts, developments in runtime verification, and conceptualizing dual implementation of smart contracts to prevent single points of failure. Additionally, they touch upon the forthcoming challenges posed by transfer hook implementation in token transactions and the role of wallets in improving security for end users. The discussion provides a keen insight into the ongoing efforts and future roadmap to bolster security on Solana.

Key Points:

The Strength of the Rust Programming Language for Solana Security

Anatoly Yakovenko highlights the significance of the Rust type system in writing secure code for Solana. With features such as traits and a rich type system, Rust can help avoid a variety of bugs. However, under time constraints, developers sometimes ship suboptimal code. Both Yakovenko and Lambertz express enthusiasm for Rust, emphasizing how it propels the safety of the Solana ecosystem. They assert the importance of using available tools like Connie or Prousti to verify parts of smart contracts, even if full logic verification isn't feasible.

Verification and Validation in Smart Contracts

Both speakers espouse the importance of verification in programming. With Solana's complex program model, they suggest starting with individual parts of smart contracts and ensuring proper input validation. They complement the anchor framework for enforcing checks at the start of the code execution process. This focus on input validation helps prevent numerous security issues and contributes to well-structured code.

Concerns with Runtime and Transfer Hooks

Discussion turned to the implementation of runtime V2 and transfer hooks, potentially posing new security concerns. Runtime V2 introduces a typed bytecode which simplifies linking of programs by validating account types during the linking time. Though this can act as a single point of failure if bugs exist, it allows intense audit scrutiny due to its small, focused size. Transfer hooks bring complexity to token transactions by adding fees and additional checks needed for secure operation within economic activity pools. Extreme care must be taken with implementation to prevent vulnerabilities.

Theoretical Duplication of Smart Contracts

Yakovenko moots the possibility of creating redundant smart contract implementations to avoid single points of failure—a concept existing on the layer-one protocol level. Lambertz points out current limitations and suggests that a new language or framework would be needed for this. They agree that while this could help with contract clarity and verification, there are practical challenges to overcome before such redundancy could be realized.

Secure Use of Wallets and User Behavior

Lastly, they touch upon the responsibility wallet developers have in securing user transactions through simulations and guard instructions. They argue that while such features are useful, correct usage often falls to the end user, who may overlook security prompts due to ease of use or out of ignorance. They emphasize the importance of user education, the use of cold and hot wallets, and recommend users exercise due diligence before engaging with smart contracts.

Facts + Figures

  • The Rust type system is deemed a critical aspect of security for programming on Solana.
  • Verification tools like Connie and Prousti can help partially verify Solana smart contracts, a practice which is encouraged yet not widely adopted.
  • Input validation is a significant part of security work within Solana smart contracts, largely facilitated by the anchor framework.
  • Security concerns exist around runtime V2 and token transactions with transfer hooks, calling for meticulous auditing.
  • Conceptual ideas such as dual implementations of smart contracts were discussed to decrease the risk of a single point of failure.
  • Wallets could enhance security by verifying the predicted outcomes of transactions, but user behavior remains a weak point.
  • Educating users on security practices and checking developer credibility are essential steps for a safer Solana ecosystem.

Top quotes

  1. "Delete all the code and then you won't have any bugs."
  2. "Most of the security work in a Solana smart contract is just input validation."
  3. "If there's a bug there it's catastrophic."
  4. "How do we enable smart contract writers to build stuff that's verifiable and secure?"
  5. "Everyone kind of operates on some level of trust."
  6. "You don't have to be staked to actually detect a double-signature or quorum attack."
  7. "I think users just don't want to be doing that kind of work."
  8. "You should kind of see like I think the phantom folks have done a pretty good job adding security features like simulation."
  9. "Mental models are really important for users."
  10. "An anonymity of the developers of smart contracts—like, that's a scary thing, right?"

Questions Answered

What is Anatoly Yakovenko's favorite thing about security in Solana right now?

The robustness of the Rust type system is Anatoly Yakovenko’s favorite aspect of security in Solana. He appreciates the ability to write secure and bug-resistant code using Rust’s advanced features like traits and a thorough type system.

What are the primary security challenges for Solana in the near future?

The integration of runtime V2 and the complexities introduced by transfer hooks in token transactions are primary security challenges. These advancements may offer significant benefits but also require diligent security checks and considerations to prevent vulnerabilities.

Why does the current Solana smart contract model make verification difficult?

Solana’s program model is quite complex, making full-smart contract verification difficult. This complexity motivates focus on partial verification and strong input validation, which can go a long way in ensuring secure contracts.

How could wallets improve transaction security?

Wallets could potentially add guard instructions toward the end of transactions to verify expected outcomes such as token balances, although this measure isn't fully compatible with all protocols. Education and improved user interfaces may encourage safer practices.

What does Yakovenko suggest to users for secure handling of their crypto?

Yakovenko advises users to use a cold wallet for holding funds and to only perform basic transfers between the cold and hot wallets. The hot wallet can be used for daily, less trusted operations. He emphasizes that security is as much about human behavior as it is about technology.