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
Increasing the length of the long term swaps causes most tests to fail. For example, setting blockInterval to 500 causes the received values to differ from the expected by as much as 30%.
I believe this to be a result of sellingRate being casted to an integer value. uint256 sellingRate = amount / (orderExpiry - currentBlock);
In cases where amount is close to the number of blocks the order is selling over, this results in a drastic effect.
For example, selling 10,000 tokens over 5,000 blocks results in a sellingRate of 1.977, which is cast to 1, resulting in the user only receiving around half as many tokens as expected.
The text was updated successfully, but these errors were encountered:
Increasing the length of the long term swaps causes most tests to fail. For example, setting blockInterval to 500 causes the received values to differ from the expected by as much as 30%.
I believe this to be a result of sellingRate being casted to an integer value.
uint256 sellingRate = amount / (orderExpiry - currentBlock);
In cases where amount is close to the number of blocks the order is selling over, this results in a drastic effect.
For example, selling 10,000 tokens over 5,000 blocks results in a sellingRate of 1.977, which is cast to 1, resulting in the user only receiving around half as many tokens as expected.
The text was updated successfully, but these errors were encountered: