web icon indicating copy to clipboard operation
web copied to clipboard

Increase slippage on Thorchain swaps to avoid failures

Open DiggyDiggy2 opened this issue 3 years ago • 2 comments

Overview

From Orion at 9R: The 0.2% slip is too tight of a tolerance for swaps with USDC - example of refunded tx: https://viewblock.io/thorchain/tx/35EBE5089D3090BB0068534CF493091658A25A95B4A5CF998C6DB854F8B79E85

Other integrations use much higher tolerance like 2-5%. We can consider allowing this to be higher, until we have trade settings.

Slip on TC is not static and is dependent on pool depths at the given point in time.

References and additional details

n/a

Acceptance Criteria

Swaps on Thorchain have slightly higher default slippage, to avoid failures

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

DiggyDiggy2 avatar Oct 14 '22 19:10 DiggyDiggy2

@asamere can you let us know an ideal % here for default slippage plz?

0xdef1cafe avatar Oct 17 '22 19:10 0xdef1cafe

We currently use 3% (the 0.2% shown in the UI visual-only): https://github.com/shapeshift/lib/blob/a643be3c74183d0c67100e6f288fc957db0cba45/packages/swapper/src/swappers/utils/constants.ts#L2

I've DMed Adam for a better percentage.

0xApotheosis avatar Oct 24 '22 05:10 0xApotheosis

We currently use 3% (the 0.2% shown in the UI visual-only): https://github.com/shapeshift/lib/blob/a643be3c74183d0c67100e6f288fc957db0cba45/packages/swapper/src/swappers/utils/constants.ts#L2

I've DMed Adam for a better percentage.

It's tough to say a specific percent to offset. if the input asset has a significant outbound fee for refunds I'd reduce the limit on the output asset to the equivalent cost of the refund (no point losing more money to get your funds back vs the trade completing). If the refund is cost is cheap (from rune for sure) you can run a much tighter limit as if it refunds you can just try again. Maybe pairing up for a bit would be a good idea.

asamere avatar Oct 24 '22 17:10 asamere