Conversation
added 2 commits
April 13, 2026 17:01
- New FundingManager class: reads SOL/USDC/USDT balances, computes SOL reserve excess/deficit, available trading capital, trading gate - Integrated into Scanner.scanPools() to call checkAndRebalance() on each tick (currently snapshot-only, no swap logic yet) - 17 tests covering balance reads, reserve logic, trading gate, error handling, USDT-as-base-asset variant - Lint clean (0 errors, 19 pre-existing warnings) - 126/126 tests pass (17 files)
- checkAndRebalance: full swap logic with one-swap-per-tick policy - Case 1: SOL excess above target → swap to base asset (highest priority) - Case 2: non-base stable normalization (USDT→USDC) - attemptSwap: Jupiter quote → cost gate (slippage+fee BPS) → execute → post-swap snapshot - executeJupiterSwap: POST /swap → VersionedTransaction deserialize/sign/send - Cooldown only advanced on success (failed swaps retry next tick) - Cost gate: reject swaps exceeding maxRebalanceCostBps - checkAndRebalance signature: PublicKey → Keypair (needed for tx signing) - Scanner.ts: minimal integration update for Keypair - 28 tests (17 step-1 + 11 step-2), all passing - Lint: 0 errors, 19 pre-existing warnings
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🚅 Deployed to the arbimind-pr-290 environment in ArbiMind 3 services not affected by this PR
|
Bug-Hunty
approved these changes
Apr 13, 2026
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.
No description provided.