210 похожих чатов

Please give me a little help. The formula for the

LP tokens in a pool is SQR(Token A * Token B), correct?

If I recalculate one of my pools in this way, I should have about 3000 more LP tokens than are shown. So a difference of about 3%.

What am I missing here? Or is this the current state of the IL in the pool?

6 ответов

16 просмотров

there are differences in the datatypes, i think you have calculated with a very high amount of decimals, the code has not so many decimals, that could cause this issue

the sqrt only applies for the initial tokens. after that, the tokens are calculated in relation to the existing liquidity. due to slipage (you provide a different relation than the current one in the pool) the real liquidity will diverge from the sqrt formula. thats why the chain saves the current reserve for A and B and the total amount of liquidity tokens. this way you can calculate your share of the reserve.

SilverBack-Feistritzer Автор вопроса
kuegi
the sqrt only applies for the initial tokens. afte...

Thank you very much! Is there a separate formula to calculate this reserve? Or is it simply the difference? Sorry for the maybe stupid question. I'm trying to understand the whole thing in a language that is not my mother tongue 😉 (maybe I'll be allowed to join the German DeFiChain group again sometime).

SilverBack Feistritzer
Thank you very much! Is there a separate formula t...

the current reserve you get from the chain reserveA, reserveB and the totalLPTokens is in totalLiquidity. your share of assetA is <yourTokens>/totalLiquidity * reserveA

SilverBack-Feistritzer Автор вопроса
Bernd Mack
there are differences in the datatypes, i think yo...

Thank you! But it wasn't the decimal places, I left them out. But I think Kuegi has given me a clue to the explanation.

SilverBack-Feistritzer Автор вопроса
kuegi
the current reserve you get from the chain reserve...

Oh, thank you, I was on the wrong track! That's right, that's the calculation approach. Embarrassing for me, sorry.

Похожие вопросы

Обсуждают сегодня

For all those that keep asking why no pump? why this ? and why that...? Please close ur ewt chart and open 2 others - TOTAL (total mc) and BTC.D (btc dominance). Maybe BTC a...
Inn3r_G
19
"Since pnut can flip FTM easily, I'm swapping my FTM to pnut and hoping for a easy x5-x10" Perfect recipe for disaster. NFA but chances are, you'll end up as exit liquidity ...
C. A.
7
AMD status update? No longer in the plan but something might be around the corner later on Chinese partner? No longer in the plan. This market does not seem to be the top ...
Ben
6
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
@marycamacho @NATHANLENAE @popachubby It was said that HOT will be used for hosting payments. But HOT is ERC20 based. So slow and high paying. The ERC network does not seem ve...
Aragorn
17
[kilv3r] Hey everyone! You probably saw the AMA today, and are aware that CyberVerse has made it into the finalists list to be integrated on Ronin blockchain, that would be th...
DiscordBridge
3
Welcome Mary Clark to the Pirate Chain chat Matey ☠️ PIRATE CHAIN is a cryptocurrency for private anonymous transactions. Official website https://piratechain.com ⚠️ Beware...
Rose
1
Another way to think about it is like this: let's say we sell $100m of FXB2029 and another $100m of FXB2055 and we buy $200m of ETH with it. Do you think that ETH price will b...
Sam Kazemian ¤⛓️¤
20
Is alice project is only a game or studio as well?
Hana
15
Bitcoin will probably halt around here somewhere to let alts push a bit?
Neo Smitty
16
Карта сайта