Skip to content

Use min_amount_out rather than min_exchange_rate  #32

@gitmalong

Description

@gitmalong

Scenario:
Token A decimals: 6
Token B decimals: 0
Exchange Rate: 1 -> 6 A * 1 = 6 B
Program internally expects a min_amount_out of 6 A * 1 + (6*0.04) = 6.24
Therefore I have to adjust the exchange rate to 6 B / 1,04 = 5,77
As the exchange rate must have B decimals I would need to round it down to 5! That makes the minimum amount out my exchange rate guarantees thrift far away from the original expected min_amount_out.

So instead of setting the threshold via an Exchange rate I suggest to set a min_amount_out threshold.

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