Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Add slippage on swap configurations #145

Open
luizstacio opened this issue May 19, 2022 · 0 comments
Open

Add slippage on swap configurations #145

luizstacio opened this issue May 19, 2022 · 0 comments
Labels
feature New features that need to be implemented page:swap priority:high

Comments

@luizstacio
Copy link
Member

We should be able to set a slippage % to the transaction, this enables the user to have better visibility on the swap and avoid issues due to changes in reserves during the swap process.

When swapping with minimum

  • Slippage is calculated over the value to be sent, ex; swap_with_maximum(amount * (1 - slippage), ....)
    • This would result in reducing the minimum amount expected from the swap by calculating
      When swapping with maximum
  • Slippage is calculated over the value to be sent, ex;
    swap_with_maximum(amount, DEADLINE, ....,{
      forward: [forwardAmount.amount * (1 + slippage), from],
      variableOutputs: 1,
    });
  • In this case we would like to show the price before the transaction, it would be done on another issue;
@luizstacio luizstacio added page:swap feature New features that need to be implemented labels May 19, 2022
@luizstacio luizstacio removed the status in SwaySwap May 19, 2022
@luizstacio luizstacio moved this to Todo in SwaySwap May 25, 2022
@luizstacio luizstacio moved this from Todo to In Progress in SwaySwap Jun 10, 2022
@luizstacio luizstacio self-assigned this Jun 10, 2022
@luizstacio luizstacio moved this from In Progress to Todo in SwaySwap Jun 10, 2022
@luizstacio luizstacio removed their assignment Jun 10, 2022
@luizstacio luizstacio removed the status in SwaySwap Jun 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New features that need to be implemented page:swap priority:high
Projects
Status: No status
Development

No branches or pull requests

1 participant