@depthhq/maker-sdk 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node.js +3 -1
- package/package.json +1 -1
package/dist/node.js
CHANGED
|
@@ -708,7 +708,9 @@ class MakerBot {
|
|
|
708
708
|
}
|
|
709
709
|
const prior = this.maker.quote.get(new PublicKey(replacement.prior));
|
|
710
710
|
const previous = await prior.status();
|
|
711
|
-
|
|
711
|
+
const size = this.position.position;
|
|
712
|
+
const exposure = ((size < 0n ? -size : size) * BigInt(market.oraclePriceE8.toString()) + 99999999999n) / 100000000000n;
|
|
713
|
+
if (!terminal.has(previous.status) && ["validated", "waiting", "reserving"].includes(snapshot.status) && market.activeQuoteCount < 4 && exposure + previous.maxCapacity + snapshot.maxCapacity <= this.policy.maxInventoryNotional && BigInt(market.quotedNotional.toString()) + snapshot.maxCapacity <= BigInt(market.config.maxMarketNotional.toString())) {
|
|
712
714
|
await this.quoteWrite(next);
|
|
713
715
|
return this.snapshot("pending", "activating successor quote");
|
|
714
716
|
}
|