Arb Bot

Bitflow Arbitrage Bot

Flash loan STX → buy stSTX on Bitflow → sell back → repay → keep profit. One click, one transaction.

How this bot works

When stSTX trades above its fair value on Bitflow (happens after stacking reward cycles), there's a spread to capture:

  1. Flash borrow STX from FlashStack (no collateral)
  2. Buy stSTX on Bitflow stableswap
  3. Sell stSTX back to STX (at a higher rate)
  4. Repay FlashStack + 0.05% fee
  5. Keep the spread as pure profit

If the arb isn't profitable, the transaction reverts automatically — you pay nothing except Stacks gas (~$0.002).

Max 5000 STX per loan · Flash loan fee: 0.0050 STX

Connect your wallet to execute. Checking price doesn't require a wallet.

When are opportunities most likely?

Stacking cycles — stSTX accumulates yield every ~2 weeks. Right after a cycle ends, stSTX briefly trades above 1 STX until arbitrageurs equalise it. That's your window.

Run the monitor bot — the script below checks every 30 seconds and auto-executes when profitable:

EXECUTE=true DEPLOYER_MNEMONIC="..." \
  LOAN_STX=50 \
  node scripts/monitor-opportunities.mjs