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
CurveMeta and SaddleMeta contracts work by meta-pool trading underlying assets through base-pool. To do that, the meta-pool holds base-pool LP tokens and withdraws underlying assets if the trader swaps into them. In meta-query methods (eg. get_dy_underlying, calculateSwapUnderlying) fee for withdrawing underlying assets is approximated and this causes a slight discrepancy between query amount-out and actual amount-out after the swap. This error varies, and adapters need to account for it by showing a slightly worse price than traders would actually get.
Ideally, we would want the adapter query to return the amount-out that the user actually receives and to do that adapter-query should mimic the logic of the base-pool withdraw method.
Adapter error accounting can be seen here for CurveMeta and here for SaddleMeta.
Requirements
For SaddleMeta and all CurveMeta adapters query returns amount-out that equals the amount user receives after swapping
All affected tests are updated
The text was updated successfully, but these errors were encountered:
About
CurveMeta and SaddleMeta contracts work by meta-pool trading underlying assets through base-pool. To do that, the meta-pool holds base-pool LP tokens and withdraws underlying assets if the trader swaps into them. In meta-query methods (eg.
get_dy_underlying
,calculateSwapUnderlying
) fee for withdrawing underlying assets is approximated and this causes a slight discrepancy between query amount-out and actual amount-out after the swap. This error varies, and adapters need to account for it by showing a slightly worse price than traders would actually get.Ideally, we would want the adapter query to return the amount-out that the user actually receives and to do that adapter-query should mimic the logic of the base-pool withdraw method.
Adapter error accounting can be seen here for CurveMeta and here for SaddleMeta.
Requirements
The text was updated successfully, but these errors were encountered: