0

Thorswap integrates 0x as a liquidity provider on Ethereum. A user reports getting much less than anticipated on this transaction:

https://etherscan.io/tx/0x3aa41ad26ec33cf8112126c67eb9bc38386701a688af9ea2ce150ce8f3fd6496

Decoding the calldata received from the 0x API and broadcasted to the chain implies a price of 1713$/Ether, while Ether was much lower. The input token was BUSD, the output asset was Ether.enter image description here

Edit: Ether's price was 1,626.68, so trade should have yielded ~10.1 Ether in line with other providers (1inch, Kyber). However, the user got back 9.63 Ether -> 5.3% slippage. Our API cannot fetch quotes with more than 3% slippage. I believe this is an issue with 0x generated calldata.

What happened? If it is a problem from 0x, can the user be refunded?

3
  • What's your question?
    – Undead8
    Jan 26 at 19:27
  • 1. I don't see it leveraging a minimum out in the swap. 2. Are you sure you know how their api works? From the sound of it they give you the Spot Price, the spot price will return the price it starts to swap at not finish at.
    – johnny 5
    Jan 26 at 20:02
  • Questions are: What happened? How to prevent it? If it is a problem from 0x, can the user be refunded? We got this calldata from the /quote endpoint, not the /price endpoint. We asked for a quote for 16500 BUSD, with a ~1.5% slippage. We compare quotes from 1inch, Kyber, Uniswap and Sushiswap and pick the best one. Ether's price was 1,626.68, so trade should have yielded ~10.1 Ether in line with other providers. However, user got back 9.63 Ether -> 5.3% slippage. Our API cannot fetch quotes with more than 3% slippage. I believe this is an issue with 0x generated calldata. Jan 26 at 20:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.