fix(mm): give the inventory halt headroom for a cNGN rally - #66
Merged
Merged
Conversation
#65 set MM_MAX_NET_INVENTORY to 650, sized against the funding valued at today's rate. Inventory counts USDC only, so the worst case -- every cNGN rung fills and the whole balance becomes USDC -- is denominated in cNGN and moves with the price: 300 USDC + 441k cNGN 639 @1368 656 @1300 670 @1250 685 @1200 So the intended funding would have halted the bot on roughly a 5% cNGN strengthening, cancelling the whole ladder. 800 holds down to ~1150. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I got wrong in #65
MM_MAX_NET_INVENTORY = 650was sized against the planned funding valued at today's rate. That's the wrong frame:risk.Evaluatemeasures inventory in the base asset only (USDC), so the worst case — every cNGN rung fills and the whole cNGN balance becomes USDC — is denominated in cNGN and moves with the price.Against a cap of 650, the intended funding halts on roughly a 5% cNGN strengthening — well inside normal movement for this pair. A halt isn't a soft cap: it cancels the entire ladder and the book goes dark until someone notices.
Change
MM_MAX_NET_INVENTORY650 → 800, which holds the full funding down to about ₦1,150.Nothing else moves.
MM_ORDER_SIZE(40) andMM_MAX_NOTIONAL_PER_SIDE(450,000) are unchanged — they govern quoted depth, and the funding they were sized for is unchanged.Plan
Env-only, no image change, no
desired_count, no other resources.🤖 Generated with Claude Code