☀️Solana program architecture
Last updated
Last updated
Solana is built as a program that derives new accounts for its supported tokens.
Each account's layout can be read at Solana account structure.
The program supports the following instructions:
Using Solend, the program deposits the user's given amount as liquidity
The program determines the collateral account from Solend
The program stores the collateral in the obligation account for the token
Using the SPL token, user tokens are minted proportionate to the amount deposited
Contract burns the user's SPL tokens
Refreshes the Solend reserve
Calculates the Solend collateral amount in the obligation account
Withdraws from Solend to the user's token account