Skip to content

Commit c0b61b5

Browse files
0xbigzharsh4786
authored andcommitted
sdk: safer-calculate-spread-reserve-math (drift-labs#1681)
1 parent aeae70c commit c0b61b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/src/math/amm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ export function calculateSpreadReserves(
922922
quoteAssetReserve: amm.quoteAssetReserve,
923923
};
924924
}
925-
let spreadFraction = new BN(spread / 2);
925+
let spreadFraction = new BN(spread).div(new BN(2));
926926

927927
// make non-zero
928928
if (spreadFraction.eq(ZERO)) {

0 commit comments

Comments
 (0)