avoid negative slip rollup
If RollupSwapSlip
returns a negative value, CalcAnchor
will panic trying to convert it to a uint64
. This patch adds checks in both functions to default to 0 in such rare cases.
h/t @ursa9r for finding this
If RollupSwapSlip
returns a negative value, CalcAnchor
will panic trying to convert it to a uint64
. This patch adds checks in both functions to default to 0 in such rare cases.
h/t @ursa9r for finding this