Using the example of the Stader-Kelp strategy, let us see how the calculation looks like:
N: total number of users in a batch
F: total fee in terms of ETH
F=(baseGasLimit+N∗marginalGasPerUser)∗gasPrice E: total ETH staked into Stader
E=(ETHuser 1+ETHuser 2+ETHuser 3+....)−F R: total rsETH received for a batch from Kelp
rsETH distribution per user:
rsETHuser x=E(ETHuser x−NF)∗R