Key responsibility of the integrator
When performing a swap, the integrator must:- store the output amount returned by quote
- compare it with the output amount returned by swap
- detect significant deviations
- explicitly confirm the new amount with the user
- send a new swap request only after user approval
Why amount changes happen
Because of this, the amount returned by swap should always be treated as final and authoritative.
Recommended deviation threshold
Rubic recommends using a ±0.5% deviation threshold. If the new amount exceeds this range compared to the quoted amount, the integrator should pause execution and request user confirmation.Recommended execution flow
Amount comparison example
The following example checks whether the new amount differs from the quoted amount by more than 0.5%.Handling amount change on the client
When an amount change is detected, the integrator should pause execution and notify the user.Example handling logic
User confirmation UI
The integrator may choose any UI approach, as long as the confirmation is explicit.Common UI patterns
- confirmation modal
- inline warning with accept / cancel buttons
- full-screen confirmation step (mobile)
Recommended confirmation content
Important notes
- The API does not signal that the amount change is significant
- The integrator must perform the comparison manually
- Users must explicitly approve any significant change
- A new swap request is required after confirmation
- Silent or automatic acceptance is strongly discouraged