Solana describes itself as a “fast, secure, and censorship resistant blockchain providing the open infrastructure required for global adoption”. In short Solana is blockchain infrastructure that can allegedly scale to meet the needs of Decentralized Finance (DeFi). It accomplishes this primarily by using a Proof of History consensus mechanism rather than the widely used Proof of Stake or Work mechanisms. Developers use Rust and Cuda when developing dApps and smart contracts on the platform. Solana also offers numerous staking opportunities for its holders and has a robust ecosystem of staking and forming opportunities. As of 7/23/21 the price of Solana is $28.82 and has increased in value 2928.7% YTD. Solana’s roots are tied to several notable developers and entrepreneurs including Sam Bankman-Fried and Alameda Research.
Origin of Solana Labs
The story of Solana Labs begins with Anatoly Yakovenko. Anatoly is the founder and current CEO of Solana Labs and has enjoyed a long career in software development before founding Solana. Anatoly’s time spent at Qualcomm (2003 – 2016) were some of the most formative years for Solana. Anatoly would bring the years of research and practice of distributed systems research to the idea of blockchain.
Anatoly would also meet Solana’s Principal Engineer at Qualcomm, Greg Fitzgerald. Greg and Anatoly would develop a protocol initially called Loom. The name represented the weaving of the world’s transactions into a single blockchain. This would change due to confusion and the name Solana was chosen as an acknowledgement of their time conceiving Solana while at Qualcomm in San Diego and surfing at the nearby Solana Beach. As time passed the Solana network was able to raise 25 million USD in funding from investors such as Multicoin Capital, Foundation Capital and Distributed Global.
Sam Bankman-Fried, the ex-Jane Street Capital quant trader who founded Alameda Research, and FTX most recently created the Solana based DEX Project Serum. Sam discovered Solana while trying to design DeFi products for Alameda. He found Ethereum to be lacking in scalability/throughput and too expensive for the products to work in a way that was efficient. Harnessing the power of Solana, Sam was able to utilize the throughput of Solana to establish Project Serum and offer new decentralized innovations for customers that had not been previously possible (e.g. an order book).
Origin of Solana Blockchain Protocol
Cryptocurrencies utilize consensus mechanisms to exist and or work without middleman facilitators from traditional financial scenarios. Up until this point the two most widely used consensus mechanisms were Proof of Work (BTC/ETH) and Proof of Stake (ADA/DOT/ETH 2.0). Specifically, Proof of Work utilizes the user’s computer power in order to verify transactions by solving mathematical equations whereas Proof of Stake requires the user offer their cryptocurrency holdings as collateral in order to have the right to verify transactions. Both of these methods have been effective at creating consensus for transactions on a small scale but for cryptocurrency to be adopted by the entire world for transactions there is the issue of scalability.
Proof of History
The majority of Anatoly Yakavenko’s time spent at Qualcomm was spent in system optimization. Anatoly wanted to bring the lessons he had learned from telecommunications and apply it to blockchain technologies. Anatoly points out “One of the most difficult problems in distributed systems is agreement on time…this problem is even harder in adversarial systems like blockchain. Nodes in the network can’t trust an external source of time or any timestamp that appears in a message.” Yakavenko solves this with Proof of History; “the Proof of History is a high frequency Verifiable Delay Function. A Verifiable Delay Function requires a specific number of sequential steps to evaluate, yet produces a unique output that can be efficiently and publicly verified. Our specific implementation uses a sequential pre-image resistant hash that runs over itself continuously with the previous output used as the next input. Periodically the count and the current output are recorded.”
“Proof of History is a sequence of computation that can provide a way to cryptographically verify passage of time between two events. It uses a cryptographically secure function written so that output cannot be predicted from the input, and must be completely executed to generate the output In short, The Proof of History presented here is designed to create a ledger with verifiable passage of time, i.e. duration between events and message ordering. It is anticipated that every node in the network will be able to rely on the recorded passage of time in the ledger without trust.”
Key innovations that separate Solana from the rest
Solana then relies on seven other innovations in order to make the network operate with such high throughput. These innovations are Tower BFT, Turbine, Gulf Stream, Sealevel, Pipelining, Cloudbreak and Archivers. Each of these innovations layers upon itself to create the robust network that is Solana.
Tower BFT is a derivation of PBFT (Practical Byzantine Fault Tolerance), but with one fundamental difference. Proof of History (PoH) provides a global source of time before consensus. “Our implementation of PBFT uses the PoH as the network clock of time, and the exponentially-increasing time-outs that replicas use in PBFT can be computed and enforced in the PoH itself.”
Turbine (Turbine Propagation) is Solana Labs solution to the problem of propagating lots of data to many different validators quickly. “Our solution to this problem, Turbine, borrows heavily from BitTorrent — although a few major technical details differentiate the two. Turbine is optimized for streaming, and transmits data using UDP only, and implements a random path per packet through the network as leaders (block producers) stream their data.”
Gulfstream is Solana’s mempool management solution for a high performance adversarial network. A mempool is usually the total number of unconfirmed transfers and these transfers will generally lead to bottlenecks in transaction processing. Gulfstream solves these performance issues by moving transaction caching and forwarding to the edge network. It requires a structure for validators and the solution is not possible without a non-deterministic leader. “By now, it’s become markedly clear that a blockchain network is only as functional as its mempool is minimal.”
Smart Contracts
Sealevel is Solana’s parallel smart contracts runtime. In many blockchain states only one smart contract can modify the blockchain at a time. Solana claims “they’ve built runtime that can process tens of thousands of contracts in parallel, using as many cores as are available to the Validator.” The reason why Solana is able to process transactions in parallel is that Solana transactions describe all the states a transaction will read or write while executing…what’s more is that we can take advantage of how CPU and GPU hardware are designed by utilizing CUDA infrastructure. “When a CUDA program on the host CPU invokes a kernel grid, the blocks of the grid are enumerated and distributed to multiprocessors with available execution capacity.”
Transactions
Cloudbreak is Solana’s horizontally scaled architecture. It works to scale TPS (transaction per second) at an extremely high rate of 185,000. Solana accomplishes this by doing a few different things differently than other protocols. First they utilize SSD’s rather than RAM to store the global state. “The next option is using SSDs. While SSDs reduce the cost per byte by a factor of 30x or more, they are 1000x slower than RAM.” Modern SSDs support 32 concurrent threads, therefore support 370,000 reads per second, or roughly 185,000 transactions per second.
In order to manage all these transactions Solana does two things first. “First, we leverage memory-mapped files. A memory-mapped file is a file whose bytes are mapped into the virtual address space of a process. Once a file has been mapped, it behaves like any other memory. The kernel may keep some or none of the memory cached in the RAM, but the amount of physical memory is limited by the size of the disk and not the RAM.” Secondly, Solana makes sure that these transactions and actions occur in a sequential way by breaking up data structure as follows:
Data Storage
Archivers is Solana’s distributed ledger store for petabytes of blockchain data storage. It solves the issue of storage of which Solana claims it creates 4 Petabytes worth on a yearly basis. “At full capacity, the Solana network will generate 1gb/s * 365 days = 4 petabytes of data every year. If every node in the network is required to store all that data, it would limit network membership to a centralized few…at a high level, the Solana Replicator network functions as follows: Archivers must signal to the network that they have X bytes of space available for storing data. On some frequency, the network divides the ledger history into pieces to target some replication rate (currently we’re expecting a target rate around 100x) and fault tolerance (achieved with erasure coding) based on the number of Replicator identities and total available storage of Archivers.”
High Performance
The key to the speed of validation is “We improve on this approach by randomly sampling the encrypted blocks at a faster pace than the speed of encryption, and record the hash of those samples into the PoH ledger. Thus the blocks stay in the exact same order for every PoRep and verification can stream the data and verify all the proofs in a single batch.” This approach is building upon Filecoin’s Proof of Replication consensus mechanism and making it more secure by implementing a two factor authentication type model for the data sent over the Solana network by verifying the Validator has the entirety of the encrypted data present for verification of every proof of every identity. The space required to validate becomes (Number of CBC keys)*(data size).
Pipelining is an appropriate process when there’s a massive stream of input data that needs to be processed by a sequence of steps and there’s different hardware responsible for each. Solana puts this process on steroids by delegating different parts of the pipelining to different stages. “On the Solana network, the pipeline mechanism — Transaction Processing Unit — progresses through Data Fetching at the kernel level, Signature Verification at the GPU level, Banking at the CPU level, and Writing at the kernel space.” Solana’s implementation of Tower BFT, alongside innovations like Proof of History, Proof of Replication, and Gulf Stream combine to create the most performant blockchain in the world.
Developing with Solana
There are two main ways to develop a Solana program: a vanilla Solana program using the Solana tooling or using Anchor which is a framework for writing Solana programs. Solana has brought a ton of innovation to blockchain but as a developer there are still some trade offs to consider. Solana utilizes the Rust programming language to develop dApps. The files in Solana have a lifetime, based on how many lamports (fractional native token) have been paid as “rent”. This differs from the typical Linux environment. It’s also important to note that lamports are just a program in which the data is represented in an account, and each token account has one owner.
The token denomination is just represented by a public key. Testing the contract is done through a mocha test framework, run with anchor test, and will handle deploying the contract and interacting with it through a solana-test-validator which is included in the Solana installation. Solana labs also offers developers many different opportunities to receive grants for developing different projects on the Solana blockchain.
Running a node on Solana
Running a node is a multistep process that requires attention to detail and a lot of computing power. In order to be considered to participate in the consensus a “vote account” is required which has a “rent-exempt” reserve. There is no strict minimum amount of SOL needed to run a validator on Solana. “Accounts on Solana may have an owner controlled state (account data) that’s separate from the account’s balance. Since validators on the network need to maintain a working copy of this state in memory, the network charges a time-and-space based fee for this resource consumption, also known as Rent.”
Validators and Rewards
Rewards on the Solana Blockchain are paid out as “commission”. Commission is the percent of network rewards earned by a validator that are deposited into the validator’s vote account. The remainder of the rewards are distributed to all of the stake accounts delegated to that vote account, proportional to the active stake weight of each stake account. For example, if a vote account has a commission of 10%, for all rewards earned by that validator in a given epoch, 10% of these rewards will be deposited into the vote account in the first block of the following epoch. The remaining 90% will be deposited into delegated stake accounts as immediately active stake.
Solana offers validators a chance to stake their validator. “Rewards are paid automatically on epoch boundaries. The rewards lamports earned are split between your stake account and the vote account according to the commission rate set in the vote account. Rewards can only be earned while the validator is up and running. Further, once staked, the validator becomes an important part of the network. In order to safely remove a validator from the network, first deactivate its stake.
At the end of each slot, a validator is expected to send a vote transaction. These vote transactions are paid for by lamports from a validator’s identity account. Keep in mind that when staking your validator with Solana “Participants are entering into a service agreement with Solana with discretionary compensation associated with the services. They are not considered to be a full-time employee of the company and therefore Solana is collecting W-9 and W-8 BEN forms in order to support tax reporting obligations, if applicable. Solana recommends participants consult with a tax accountant to understand any potential tax implications.”
Staking Solana
Solana offers stakers many opportunities to stake their Sol Tokens. “In order to stake tokens on Solana, you first will need to transfer some SOL into a wallet that supports staking, then follow the steps or instructions provided by the wallet to create a stake account and delegate your stake.” It is also important to note that there is a separate stake account which is used to send and receive Sol tokens to other addresses. One thing to keep in mind is “if a validator is slashed, all token holders who have delegated stake to that validator will lose a portion of their delegation. While this means an immediate loss for the token holder, it also is a loss of future rewards for the validator due to their reduced total delegation.”
Right now, for regular consensus, after a safety violation, the network will halt. Fundamentally, our goal for slashing is to slash 100% in cases where the node is maliciously trying to violate safety rules and 0% during routine operation. How we aim to achieve that is to first implement slashing proofs without any automatic slashing whatsoever. Solana’s ledger validation design is based on a rotating, stake-weighted selected leader broadcasting transactions in a PoH data structure to validating nodes. These nodes, upon receiving the leader’s broadcast, have the opportunity to vote on the current state and PoH height by signing a transaction into the PoH stream. Solana implements a proof of stake reward/security scheme for validator nodes in the cluster.
How Solana fees are calculated
Being the most performant blockchain requires many dynamic solutions that work in tandem with each other. Solana has applied this methodology to their fee structure. Solana boasts that by using a “Deterministic Transaction Fee” structure it is able to avoid the problems encountered with Ethereum’s “gas” non-determinism. “Transactions currently include a fee field that indicates the maximum fee field a slot leader is permitted to charge to process a transaction. The cluster, on the other hand, agrees on a minimum fee. If the network is congested, the slot leader may prioritize the transactions offering higher fees.” The client uses the JSON RPC API to query the cluster for the current fee parameters. Those parameters are tagged with a blockhash and remain valid until that blockhash is old enough to be rejected by the slot leader.
Distribution of Solana Tokens
Conclusion
Solana Labs has meticulously created a blockchain protocol that can provide real world value not only for the dApps that are developed on it but for DeFi and the crypto ecosystem as a whole. In order for Decentralized Finance to capture market share from Traditional Finance it must offer consumers, institutions and developers a real world implementation of financial products and services that can handle the throughput of the entire global economy. Solana is currently the only blockchain protocol that can provide developers a platform to develop financial products that provide real world solutions to scalability, security, censorship resistance and of course decentralization. Solana has a bright future as the bridge for the liquidity in Traditional Finance to the new ideas and world of Decentralized Finance.