2

I want use merge staking accounts. How I check but after merge staking accounts I lost some rewards.

  const trx = StakeProgram.merge({
      stakePubkey: stakePubKey, //destination
      sourceStakePubKey: sourceStakePubKey, //source
      authorizedPubkey: walletPublicKey,
    });

I select destination account where activation epoch is smallest and I merge accounts with same state. Maybe I something do wrong or It is normal to lost some rewards after merge?

1 Answer 1

2

You will never lose rewards from merging stake accounts.

If you use the getInflationReward endpoint on the resulting stake account, however, it won't merge the history of the two stake accounts. You will need to query the old stake account for its history as well.

So for example, if I have a stake A with 10 SOL, and another B with 1 SOL, if I merge A into B during epoch 100, so B now has 11 SOL, if I query B's reward history it will show:

  • epoch 100: rewards for 11 SOL
  • epoch 99: rewards for 1 SOL
  • epoch 98: rewards for 1 SOL (minus some small amount for rewards) ... etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.