Automatic Staking Yield Maximizing (ASYM) for SOL
Bot to swap to the LSTs with highest APYs minimizing the price impact of swaps.
(TLDR at bottom !!)
How Staking Secures the Network:
Staking plays a crucial role in securing the Solana network. By staking, users delegate their SOL to validators, who then process transactions and maintain the network's stability. This process decentralizes power and enhances the network's security while stakers earn rewards in return for helping the network function smoothly. Without staking, users miss out on these rewards and contribute less to the network’s resilience. Unlike ETH where the staked ETH gets slashed when the validator misbehaves, in SOL only the rewards are slashed,
Inflation of SOL, Current Staking Yield, and Future Changes
Solana’s inflation model is another factor driving staking. Currently, the staking yield ranges between 5% and 7%, fueled by inflation that is gradually decreasing. Over time, Solana's inflation will shrink to a target of around 1.5%, meaning that staking rewards will also decrease. By not staking, SOL holders miss the chance to earn rewards, effectively losing value as the total supply of SOL increases through inflation.
Enter Sanctum:
Sanctum is one of the innovative Liquid Staking Token (LST) solutions that make staking easier and more accessible. With Sanctum, you can create an LST for your community without becoming a validator. You simply choose an existing validator, and launch your LST, allowing instant liquidity and staking rewards. Sanctum also simplifies staking by enabling easy swaps between LSTs, enhancing liquidity and making the process user-friendly for both new and experienced participants.
Image credit :- @JamesleyHanley
Understanding APY Variations in Solana Liquid Staking Tokens:
In the Solana ecosystem, Liquid Staking Tokens (LSTs) can have varying APYs due to factors like MEV (Maximal Extractable Value) rewards, commission rates, and additional SOL distribution. LSTs that pass on MEV rewards or have lower commissions can offer higher yields. Some LSTs may distribute extra SOL to attract new TVL or bootstrap their validator, resulting in temporarily high APYs, which can sometimes reach around 25%, where native staking gives only around 6-7%. These variations reflect the different operational strategies and market positioning of each LST.
Can we always swap to LST with highest APY?
You can swap to LSTs with the highest APY, but there’s a catch. Sanctum’s router minimizes slippage by using a single liquidity pool for all LSTs, known as the Infinity Pool (INF). This pool provides thick liquidity for established LSTs with high total stake, but newer LSTs, which might offer higher APY, may not benefit from the same liquidity depth, so there is a price impact. Consequently, while aiming for higher APY, you need to balance the potential extra rewards against the price impact losses that can occur with less liquid LSTs.
In the above swap, quoted price has 0.3618% price impact, where haSOL yields 10 % and eonSOL yields 15%, is it worth it for extra 5% ? (which might even be same for all epochs? )
Understanding LST Price Stability and Swap Price Impact
The price of each LST relative to SOL remains constant and is calculated as the total SOL in the staking account divided by the total LST tokens minted, regardless of supply or demand. So the price of LSTs is same during epoch which lasts approximately 2 days for SOL, and only changes once the epoch is completed, and its increased due to addition of staking rewards and MEV. This fixed price allows for precise calculation of swap price impact by comparing the quoted price with the true price derived from this calculation. Knowing the true price of each LST relative to SOL enables us to determine the true price of each LST relative to other LSTs.
Automating APY Optimization and Swap Impact Analysis
Using Sanctum's APIs, we can access real-time data such as APYs, the exact SOL value of each LST, and price quotes. This allows us to calculate the exact percentage increase in APY and any potential capital loss due to a swap. I developed a bot in python that leverages this information by checking the APYs of all LSTs in Sanctum, retrieving price quotes for LSTs with higher APYs than the one you currently hold, and determining whether the capital loss from the swap price impact can be recovered within the next epoch.
What am I cooki’n?
I’m planning to build a Telegram bot that will notify users when swapping to a different LST offers a better yield or when staying with the current LST is more beneficial. Currently, the highest-yielding LST, eonSOL, is offering around 15% APY (it used to be 27% when it launched), which is higher than many other LSTs and native staking yield. So, it's advantageous to swap to it before the next epoch if the LST you own is giving around 7 - 8%.
Beyond this, I plan to analyze data from stakewiz.com and train models to predict the reward percentages for the next epoch across all LSTs. This prediction is possible because some LSTs distribute mercenary SOL or extract more MEV in certain epochs (at time of activity spikes in SOL), either randomly or periodically, to maintain a higher APY and attract more TVL compared to their competitors. By forecasting rewards, we can gain a significant advantage—if we predict a high-reward epoch, we can swap into that LST before the epoch ends when prices are lower and demand is minimal, ensuring a win-win situation with both a higher yield and minimal price impact.
TL;DR:
Staking APY secures the Solana network by incentivizing users to delegate SOL to validators, with current yields driven by inflation (5-7%). Sanctum simplifies staking with its Liquid Staking Token (LST) solutions, enabling easy swaps between LSTs and liquidity through its Infinity Pool. LST APYs vary due to MEV rewards, commission rates, and extra reward SOL distribution, with some reaching up to 25%. A bot I built analyzes real-time APY and swap price impact (~ 0.5%), helping decide if a swap to a higher APY LST is worth it. Future plans include developing a Telegram bot for yield notifications every new epoch and using ML models to predict LST rewards by analyzing patterns in MEV extraction and mercenary SOL activity, allowing for better swaps before an epoch ends.




