Strategies for dYdX to Enhance User Experience and Prevent Costly Routing Errors

Happy upcoming New Year, folks! Adding some spice to the sleepy vibes around here with a link to a fascinating discussion in Osmosis.

Refund dYdX user funds lost from high price impact out of ProtoRev profits - Proposal Discussion - Osmosis Community Hall

TLDR: A user tried to deposit 626K in dydx v4 but lost 248K because the squid router suggested a route through Osmosis with massive slippage. The ProtoRev module of osmosis snagged arbitrage profits from the unbalanced pool. There’s been a heated debate in the osmosis community whether they should reimburse this user or not.

I’d like us to discuss what dydx could do to prevent new users from facing such issues. Sure, it’s clear there’s a user error here, but for many folks who are Ethereum maxis, using Cosmos is like switching from an old school American muscle car with buttons to a Chinese electric car where you have to turn on indicators by swiping. Overall, there are some significant UX issues that I believe are hindering protocol growth.

Maybe we should consider using funds from the treasury for balancing pools which see most deposits. Let’s brainstorm this right here.

1 Like

From the Osmosis forum:

  • Squid and dYdX will implement the following technical updates to prevent similar issues in the future:
    • dYdX will:
      • Add a check on the dYdX V4 front end where if a deposit will incur >2.5% price impact, the user will be recommended to reduce their amount via the UI.
      • Show the user the quoted toAmount before they are asked to sign a deposit or withdrawal transaction.
      • Choose to route through Squid V2 (CCTP enabled) when Squid V1 returns a quote with high price impact.
    • Squid will:
      • Return a failed route if price impact is larger than 2.5% for a deposit or withdrawals for any dYdX routes.
      • Return a failed route on high price impact or USD value difference between fromAmount and toAmount on all swap quotes.
      • Add an option on the Squid V1 and V2 API to bypass guardrails, for users or developers who would like to trade regardless of price impact.
  • This being said and given the extraordinary measures of this particular case, the parties involved (Squid, dYdX and the user) are making further steps towards reaching a resolution in which we all feel rightly justified.