English
Search
⌃K

Delegation Strategy

When you stake your SOL on Marinade, they are delegated to a number of validators. How are these validators chosen? Can you be one of them? Let's review in details Marinade's delegation strategy.

How are validators selected by our algorithm?

Marinade follows the Solana Foundation strategy to spread the stake among the long tail of high-performance, low-commission, non-concentrated validators, in order to increase decentralization and censorship resistance for Solana.
Solana Foundation delegation strategy
As you can see, this translates by delegating SOL to nodes that do not belong to the security group. (i.e. Marinade is not staking to big validators that are already in place, but trying to encourage and support more validators to exist).
In order to be considered by the delegation strategy, your validator must have an average of at least 100 SOL staked over the last 10 epochs.
Once those nodes are excluded, here are the different parameters that are taken into account in the validator score:
  • Performance (APY)
  • Commission
  • Delinquency (a validator that is more than 128 slots behind the tip of the blockchain is flagged as delinquent by the Solana blockchain)
  • Decentralization objectives (Increase Nakamoto Coefficient)
  • Version of the node
In order to avoid being flagged as delinquent, we recommend to not update your node around the time where snapshots are taken, 24 hours and 7 hours before the end of an epoch.
Three different sources of information are used to gather this data:
  1. 1.
    Our own information about current epoch credits to determine if the validator was down for most of the current epoch (which has the same effect as using APY). We still query the StakeView APY data because it is useful, but only for informational purposes.
  2. 2.
    Validators.app for data center concentration (same as the Solana Foundation). The only way for this parameter to lead to zeroing the score would be that 33% of the total stake is reported in the same data-center. Otherwise, this data only partially affects the score.
  3. 3.
    The rest of the data is extracted from Solana itself.
We evaluate all validators. Our formula and the code to compute it are available online and the results are published on-chain.
The ethos is to be totally transparent and open to all validators.
Our target is to balance the best value for our users and value means APY but also SOL market cap. For example, making Solana more decentralized and censorship resistant will help all SOL token holders and can be reflected in SOL price.

Delegation formula

Marinade uses open-source code to compute a “score” awarded to validators based on performance, commission, node version and decentralization objectives.
For example, a validator will get points added for good performance, low delinquency and low commission, but will get all points deducted if it’s already one of the top concentrated validators (measured by stake) in the Solana ecosystem.
According to a change voted by the DAO, a bonus to score will be applied to validators running with a lower commission than 10%. This bonus will be a multiplier that follows this logic:
  • 9% commission - *2 to the score
  • 8% commission - *3 to the score
  • 7% commission - *4 to the score
  • 6% commission and less - *5 to the score
This bonus would not be applied to effective_votes, coming from the Validators gauges. Those changes will therefore not affect the stake received from the gauges. Same goes for the stake coming from the Liquid self-stake product.
Based on their received points, validators are automatically awarded a percentage of the total stake. As users stake and unstake, Marinade bot distributes stake and unstake operations as to match staked percentage with score (i.e. changes in score are slowly applied as users stake and unstake)

Open source calculation

The results of the calculations and a SQLite database with historical data is published each epoch here: https://github.com/marinade-finance/staking-status
You can preview what the staking bot will do, by executing this SQL query on the published database:
select should_have - marinade_staked, A.*
from scores2 A
where epoch = 281
and should_have > marinade_staked
order by score desc
To compute validators metrics, Marinade is using a forked version of the SPL Stake-o-Matic code (from the Solana Program Library), available here: https://github.com/marinade-finance/delegation-strategy. It is very similar to the Stake-o-Matic while adding improvements and allowing to compile the score and apply post-processing computations directly.

Calculation details

Here are the different steps used to calculate score and post-process it to determine staking/unstaking operations:
  1. 1.
    A scoring is performed on all validators, based on the last 10 epochs (if a validator has been active for less than 5 epochs, its score will be zeroed, if a validator has been active for 5 to 10 epochs, the average will be realized on the total amount of epochs spent active). This score is based on the fork of the Stake-o-matic, available in this repository. It takes into account Epoch credits, Commission, Decentralization (by analyzing the Data Center used) and Node Version.
  2. 2.
    The top 430 validators according to this score are selected (and will vary each epoch). All the others validators that do not have stake from Marinade already will get a 0 score. (This number corresponds to the number of validators that Marinade is trying to reach and may be modified as the total TVL of Marinade evolves)
  3. 3.
    All validators are analyzed (to identify the unstakes needed.) For stake operations, the performance for the ongoing epoch will be analyzed for validators with a positive score and some factors then modify the score:
Adjusted credits within the epoch are observed (in relation to all validators on the blockchain):
  • If the credits for the validator are below 80% of the average, an emergency unstake will be performed at the moment where this is observed.
  • If the credits for the validator are below 90% of the average of other validators, the Marinade score is divided by 2. The score due to votes in the gauges is not affected.
Adjusted credits takes into account the commission of a validator and applies it to its credits.
With the integration of Validator gauges, the total score (score) of a validator is now composed of a Marinade score (calculated by this delegation strategy) and a vote score, directly calculated from the votes that the validator receives in the gauges. The last kind of score a validator can obtain is through the Liquid Self-stake product and follow different rules.
APY within the epoch is still observed but for informational purposes. It was kept as a sanity check but the previous dependency was removed, see Changelog.
Delinquency, based on the solana validators command is then taken into account. If your node if 128 slots or more behind the tip of the blockchain, your node will be flagged as delinquent and an emergency unstake will be performed.
4. Those calculations are run twice during the epoch (for backup and accuracy purposes), one time 24 hours before the estimated end of the epoch, and one time 7 hours before. Scores are then uploaded on-chain.
Emergency unstakes are performed as soon as they are identified.

Gauges score

With the implementation of gauges, 20% of Marinade total stake is now controlled by votes on gauges. In order to integrate those votes in the final score of validators, the following operations are performed:
  • We observe how many votes were directed to each validator. For validators that do not comply with Marinade rules (Commission, superminority, etc.), their 'effective vote' value is set to 0.
  • For the other validators, their 'effective vote' is set at the amount of votes they received from gauges
  • We observe how much total score those effective votes represent, and then run a calculation to normalize those votes in order for them to represent 20% of the total score for all validators.
  • The sum of vote scores will then represent 20% of the total score for validators, after doing the sum of the scores from the votes and the score calculated by the delegation strategy.
  • This way, 20% of the total score for all validators represent the votes from the gauges. Score can then be used as the only metric for staking and unstaking operations while taking gauges votes into consideration.
If a validator should receive more than 1.5% of the total standard stake after both Marinade score and vote score are taken into account, its score is reduced to not represent more than 1.5% of the total score of all validators.
The score removed from those validators is going to be redistributed and shared between the rest of the eligible validators. This makes sure that the total sum of score and size of the cap remains the same. Redistribution will start with the better ranked validator that can receive this score and go down the list.
The withdrawn score is distributed according to the rank of validators by score, so that the ranking of validators stays the same after this operation.

Staking/Unstaking operations

Finally, the bot responsible for staking and unstaking operations runs a last set of adjustments on the on-chain scores and analyze them to find a good balance between staking and unstaking operations, depending on the available stake to distribute or to unstake. For example, even in the case of a positive stake delta, meaning that Marinade has to add stake to new validators, some unstake operations may be needed.
Here are the detailed steps of this final computation:
  • Some validators are blacklisted for cheating the system or changing their fees at the last possible time before the end of the epoch. Every epoch, any stake in such a validator will be unstaked immediatly.
  • Partial Unstake has been implemented with a cap of 4% of the total Marinade stake for an epoch. Every epoch, the score of validators is observed and compared to their current stake from Marinade. The most overstaked validator (compared to its score) will see a part of its stake removed (until it reaches its 'ideal stake'), then the second most overstaked validator, etc. until the 4% cap is reached. This cap is shared with the emergency unstakes needed, so in a situation where 1.5% of the total stake has been emergency unstaked this epoch, only 2.5% of the stake can be partially unstaked from overstaked validators. Nonetheless, emergency unstakes have the possibility to go over those 4% cap if those unstakes were needed. In this case, no partial unstake operation could happen for the epoch.
  • A Maximum Stake cap has been implemented and is set at 1.5% of the standard Marinade stake. This cap is common to both the Marinade score and the vote score, but doesn't take into consideration the stake coming from the Liquid Self-stake product.
Note: Having a 0 score for a validator does not mean the automated bot will unstake all from the validator. It only means it will not stake in the next epoch and will unstake if users requests large unstake orders. It is also possible that a validator with 0 score may be affected by a partial unstake operation if its ideal score is going down.
Note: No matter the previous epoch score, delinquent validators are always unstaked.
Note: The selection parameters can be adjusted after each epoch, based on performance results and with the objective to increase token holders value. In order to do that we look for a good balance between maximizing user's APY (direct method) and increasing Solana censorship-resistance (indirect method, increase network value and then SOL price). All changes are public and available in the Changelog and each validator is able to pre-compute its own score.

Who is Marinade delegating to?

Currently, Marinade delegates SOL to more than 450 validators.
You can see the full list of our current validators on our website or Solana Beach.

How are stake accounts handled?

If you already are staking your SOL, you own a stake account linked to a specific validator. You can deposit this stake account on Marinade and receive mSOL in exchange but your validator needs to:
  • Have a commission under 30%.
  • Not be delinquent
If this is not the case, your stake account will not be accepted. You will have to unstake and retrieve your SOL before depositing them directly on Marinade.