Skip to content
This repository was archived by the owner on Jun 17, 2026. It is now read-only.

Fix fees not calculated for first account to provide liquidity on a pair#365

Open
benber86 wants to merge 2 commits into
Uniswap:v2from
benber86:fixlpfees
Open

Fix fees not calculated for first account to provide liquidity on a pair#365
benber86 wants to merge 2 commits into
Uniswap:v2from
benber86:fixlpfees

Conversation

@benber86

@benber86 benber86 commented Mar 9, 2021

Copy link
Copy Markdown

Issue originally raised in #363. The problem does not seem to be about how much an account provides on a pair, but rather if they were the first one to do so. In that case, the calculation of their ownership of the pool when they entered it will return a NaN because it will try to divide by a liquidityTokenTotalSupply that is equal to 0. The ownership NaN at t0 will then affect all subsequent calculations, including the sum of fees, hence why it is eventually not displayed.

@vercel

vercel Bot commented Mar 9, 2021

Copy link
Copy Markdown

@benber86 is attempting to deploy a commit to the Uniswap Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants