RageTrade / core

Perpetuals on Uniswap V3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do we want final amount in remove liq with fees included or not ?

opened this issue · comments

please check above comment

Originally posted by @scdev157 in #23 (comment)

Since Uniswap's burn would also include the fees in it

  • rename basePrincipal to baseChange. The change is from perspective of Uniswap pool, positive if pool gets token, negative if tokens removed from pool.
  • we need to exclude the vtoken fees using Uniswap's fee checkpoint. also add the corresponding fee from our extended tick variable (in our contract).

cc: @AnonFinDev

I think this was discussed in standup call with findev as well. If still issues pls reopen.