Skip to content

V1 - Mismatch between minimum received in webapp and SDK #46

@BrelKsiba

Description

@BrelKsiba

I noticed a mismatch of minimum price between the webapp and the SDK.

Here the results of the quote from SDK:

Here a print of the quote:
SwapQuote(swap_type='fixed-input', amount_in=ALGO('700'), amount_out=Planets('30848.706199'), swap_fees=ALGO('2.1'), slippage=0.005, price_impact=0.00644)

Here the print of amount expected with slippage: print(quote2.amount_out_with_slippage);
Planets('30694.462669')

This is different from what I see in the webapp (since many days)
image

As you can see the amount_out is correct. However, the amount_out_with_slippage seems to be not correct.

I noticed also that sometimes, even the amount_out does not match.
Here I changed th amount_in to 500 ALGO. I am getting the following:
SDK:
SwapQuote(swap_type='fixed-input', amount_in=ALGO('500'), amount_out=Planets('23341.505158'), swap_fees=ALGO('1.5'), slippage=0.005, price_impact=0.00553)

webapp:
image

The amount_out in this case is not the same.

This code was working months agso and I was getting exact results between the webapp and the SDK.

Best regards,
HHA

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions