Logic
The logic module contains general program logic that is not more directly associated with process, state or token functionality.
#
Functions#
check_rent_exemptThis function checks the balance of account in lamports, along with the data length to determine if the account is rent exempt.
#
get_reserve_available_amountThis function gets the amount of lamports in reserve. The rent is subtracted from the total amount.
Note: this function will fail if the reserve's balance minus rent is < 0.
#
calc_total_lamportsCalculates the sum of lamports available in the reserve (after rent us discounted) and the stake pool
#
token_mint_toCreates and issues a spl_token MintTo
instructioni from the Solana SPL token library program.
#
deserialize_lidoThis function first checks the the lido account is indeed the owner and then deserializes the lido data into the Lido
struct.