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
Sometimes, a batch swap query in a boosted pool returns a slightly different result from the actual swap. It happens because the batch swap of a boosted pool is composed of three steps:
Wrap TokenIn
Trade wrapped TokenIn by wrapped TokenOut
Unwrap TokenOut
In the query mode, the first and third steps (wrap/unwrap) are only previews; we don't execute them, so the rate of the wrapped tokens doesn't change. However, the wrap/unwrap is executed in the actual operation so the total supply and total assets of the wrapped tokens change, and it introduces rounding issues in the order of 1 wei to the token rate. This rounding issue propagates to the boosted pool (2nd step) which uses a fixed 18 decimals rate, so it amplifies the error a bit for 18 decimal tokens.
The text was updated successfully, but these errors were encountered:
Sometimes, a batch swap query in a boosted pool returns a slightly different result from the actual swap. It happens because the batch swap of a boosted pool is composed of three steps:
In the query mode, the first and third steps (wrap/unwrap) are only previews; we don't execute them, so the rate of the wrapped tokens doesn't change. However, the wrap/unwrap is executed in the actual operation so the total supply and total assets of the wrapped tokens change, and it introduces rounding issues in the order of 1 wei to the token rate. This rounding issue propagates to the boosted pool (2nd step) which uses a fixed 18 decimals rate, so it amplifies the error a bit for 18 decimal tokens.
The text was updated successfully, but these errors were encountered: