Posts

How to calculate LP value in $ when you stake?

avatar of @sodomlv
25
@sodomlv
·
·
0 views
·
1 min read

I had this question when I started staking. I found out a lot of complicated formulas to calculate. I did try all of them. But I only found 1 easy formula to calculate $ value of LP and it’s correct for me.

How to calculate it? The 1st simple rule when you stake a LP is the amount in $ of token A must be equal to token B. A = amount of token A, PA is the price of token A when you stake B = amount of token B, PB is the price of token A when you stake That means A PA = B PB And your initial LP value = 2 A PA ($) when you stake.

X = A B, X is never changed no matter what the price of A/B. PA’ = today price of token A PB’ = today price of token B Y = PB’/PA’ B’ = today amount of token A = squareroot of (X/Y) A’ = X/B’ Today LP value = 2 A’ PA’ ($), because A’ PA’ is always equal to B’ * PB’

I staked and unstaked my MDX-USDT then verified the amount in BSC scan, it's totally correct. The variation is very minor because I didn't put all the digits when calculation.

I also created here the calculation sheet for your reference. Use this link: https://docs.google.com/spreadsheets/d/12EbVWgWrQ7ZbTBy8AnW5TLfu2rJv5dNWRabeebZyD-4/edit?usp=sharing

Make a copy for yourself and then enter your numbers in the highlighted fields.

Have a fun staking!

Posted Using LeoFinance Beta