You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When bridging assets over Connext, there's a high chance the user doesn't receive the exact amount they inputted. This is due to the slippage, as Connext uses a stableswap AMM internally.
Here's what happens in the background when a user wants to bridge USDC:
User USDC -> srcChain AMM (USDC/nextUSDC) -> bridge nextUSDC -> destChain AMM (nextUSDC/USDC) -> User USDC
The slippage occurs when we swap from USDC to nextUSDC.
How does this affect us?
While designing the smart contracts and the UI, we assumed that the user would get the exact amount on the destination chain. Now we have to consider the slippage. We need to explicitly inform the user about the slippage and allow them to control it.
Btw, the slippage shouldn't surprise any DeFi user, as this is a common situation, mostly when performing swaps.
Todo
[SC] on xReceive, amounts in DEPOSIT and PAYBACK actions will be different than the actual received amount that makes calls to the vault fail @daigarocota : Refer to ConnextRouter bridging slippage #253
[Design] Adapt borrow and manage position forms to include control of the slippage and ideally the price impact @Markoyw
[SDK] Include methods for calculating the slippage and the price impact @brozorec
Do not allow near liquidation deposit-and-borrow operation.
If the user has a higher slippage tolerance and borrows close to the liquidation threshold (inputs near max LTV borrowing position), this may result in a situation of immediate liquidation. We should avoid such possibilities at least from "ordinary-front-end" user interactions.
A possible solution could be that we display a warning pop-up before submitting the tx.
Context
When bridging assets over Connext, there's a high chance the user doesn't receive the exact amount they inputted. This is due to the slippage, as Connext uses a stableswap AMM internally.
Here's what happens in the background when a user wants to bridge USDC:
User USDC -> srcChain AMM (USDC/nextUSDC) -> bridge nextUSDC -> destChain AMM (nextUSDC/USDC) -> User USDC
The slippage occurs when we swap from USDC to nextUSDC.
How does this affect us?
While designing the smart contracts and the UI, we assumed that the user would get the exact amount on the destination chain. Now we have to consider the slippage. We need to explicitly inform the user about the slippage and allow them to control it.
Btw, the slippage shouldn't surprise any DeFi user, as this is a common situation, mostly when performing swaps.
Todo
xReceive
, amounts inDEPOSIT
andPAYBACK
actions will be different than the actual received amount that makes calls to the vault fail @daigarocota : Refer to ConnextRouter bridging slippage #253Explanations
More info on slippage and price impact in AMMs:
https://academy.shrimpy.io/post/what-is-slippage-how-to-avoid-slippage-on-defi-exchanges
The text was updated successfully, but these errors were encountered: