Skip to content

Diff to the kyber swap contract swapMath in estimateIncrementalLiquidity function #8

Description

@WagZol

Error:

In the kyber swap elastic contract at the 'estimateIncrementalLiquidity' function, if the isToken0 = false then the 'b' variable will be equal to feeInFeeUnit is subtracted from C.FEE_UNITS, multiplied by liquidity, but in the sdk implementation multiplication is missing

Proof:

Part of original SwapMath.lib of Kyber swap elastic pool contract:
Screenshot_2023-03-22_16-03-44

Implementation of the 'estimateIncrementalLiquidity' of the SDK:

let b = JSBI.subtract(BPS, fee)

@viet-nv could you please check it?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions