What are Solana's Programs?
Programs on Solana are equivalent to Smart Contracts on other blockchains, which serve as the foundation of on-chain activities, from DeFi to NFTs, gaming, and beyond.
Smart Contracts on other chains usually contain almost everything, while programs on Solana are conceptually fragmented. Below is an illustration of how programs are constructed:
Unlike most other blockchains, Solana completely separates code from data.
To explain the concept of programs on Solana, users should understand that programs are fundamentally made up of 2 accounts: the first one is the Program Account which can sometimes be referred to as an Executable Account - in the sense that it ONLY contains programming code. The other one is Data Account (also known as a Non-Executable Storage program whose owner is Program Account) which stores all the data. When a program needs to hold data, it creates an account to store it, and if the program is called, it can pull needed data from the Data Account.
All data that programs interact with are passed in as references via instructions—rather than stored directly inside the program's logic. Solana’s account model allows programs to operate across multiple accounts without the need for additional deployments.
By default, all user-deployed Solana programs are owned by BPF Loader (which transfers ownership to programs) and executed by Solana Runtime called Sealevel.
Solana comes equipped with a number of Programs that serve as the foundation for blockchain activities, these include Native Programs and Solana Program Library (SPL) programs.
-
Native Programs: based functionality for validator operations. Most notable to remember here is the System Program, which administers new accounts and transfers SOLs between parties
-
SPL Programs: support a number of on-chain activities, including lending, swapping, and other composable actions.
How Program Accounts are Displayed on Solscan
Here is how a Program account (Solend's program) is shown on Solscan, where:
- Executable Data is actually the Solend program itself
- Upgrade Authority is the address with the authority to upgrade the program.
- The program’s owner is BPF Upgradable Loader.
- Lastly, most popular programs on Solana have been labelled with a public name by Solscan.
Conclusion
And there it is, you have read all the most fundamental things about a program on Solana. We hope that throughout this article, our users can better understand the concept of Solana’s programs and how they work. Our aim is to bypass all the technical jargon and try our best to simplify the knowledge for you.
Stay tuned for the next articles which will explain the transaction flows and how Solscan users can read transactions using our explorer.