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
in our fuzz tests we should prevent allowing two max longs/shorts in row
lets put a check in the interface before calling rust funcs; if bond & share are at certain levels (e.g. close to equal for max long) then we directly return FixedPoint(0) without bothering with the rust func. Similar for max short
we should also catch neg interest in crash reporting and see if it's because max long was too big (calc_max has noise, this results from two max trades in a row)
The text was updated successfully, but these errors were encountered:
we discussed this a bit, and the most robust solution would be to add guardrails to the rust sdk. that may still be something we want to do, but it's a bigger task, since the logic needs to be mirrored in solidity. we have a lot more flexibility in addressing this issue in python, like running a mock trade at the end.
in our fuzz tests we should prevent allowing two max longs/shorts in row
lets put a check in the interface before calling rust funcs; if bond & share are at certain levels (e.g. close to equal for max long) then we directly return FixedPoint(0) without bothering with the rust func. Similar for max short
we should also catch neg interest in crash reporting and see if it's because max long was too big (calc_max has noise, this results from two max trades in a row)
The text was updated successfully, but these errors were encountered: