Skip to content

Feature/hk stx bitflow receiver v1#23

Open
unixwhisperer wants to merge 4 commits into
mattglory:mainfrom
unixwhisperer:feature/hk-stx-bitflow-receiver-v1
Open

Feature/hk stx bitflow receiver v1#23
unixwhisperer wants to merge 4 commits into
mattglory:mainfrom
unixwhisperer:feature/hk-stx-bitflow-receiver-v1

Conversation

@unixwhisperer
Copy link
Copy Markdown
Contributor

Description

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🧪 Test addition or improvement
  • 🔧 Refactoring (no functional changes)
  • 🎨 Style/formatting changes
  • ⚡ Performance improvement

Related Issues

Fixes #
Related to #

Changes Made

Testing Performed

Manual Testing

  • Tested locally with clarinet check
  • Tested in clarinet console
  • Tested specific edge cases

Automated Testing

  • All existing tests pass
  • Added new tests for changes
  • Tests cover edge cases

Test Commands Run

# List the commands you ran to test
clarinet check
clarinet console3

Test Results

# Paste test output here

Checklist

Code Quality

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Documentation

  • I have updated the documentation accordingly
  • I have updated the README.md (if needed)
  • I have added/updated code comments
  • I have updated the CHANGELOG.md

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested edge cases
  • I have tested error conditions

Security & Safety

  • My changes don't introduce security vulnerabilities
  • I haven't committed any secrets or sensitive data
  • I've considered the impact on existing users
  • I've followed Clarity best practices

Screenshots (if applicable)

Additional Context

Deployment Considerations

  • Requires contract deployment
  • Requires data migration
  • Requires configuration changes
  • Backward compatible

unixwhisperer and others added 2 commits June 6, 2026 00:04
External-wallet flash-loan receiver that borrows STX from the live
flashstack-stx-core, runs a real STX->stSTX->STX round-trip on the Bitflow
stableswap, and repays principal+fee atomically. No protocol modifications.

Combines hk-stx-real-receiver-v2 (contract-caller gate + absolute mainnet
principals for external deploy) with the bitflow-arb-receiver-v4 round-trip.
min-out=u1 on both legs; the repay-assert + core reserve check are the safety
gates (objective is execution, not profit). Fee looked up dynamically.

- contracts/hk-stx-bitflow-receiver-v1.clar  receiver (clarinet check: 0/0)
- scripts/deploy-hk-bitflow-receiver.mjs      mainnet deploy (DRY_RUN aware)
- scripts/execute-bitflow-flash-loan.mjs      flash-loan executor + preflight
- .gitignore: ignore mbegu/mbegu2 (mainnet seed-phrase files)

Deployed to mainnet: SP3NZYZA88ENNF0FCR57KBGPFY5RAXWHXXVSB6FBW.hk-stx-bitflow-receiver-v1
deploy tx 7e5b3ec55357d119470aa79fe7d5e32c07922b7b7f2c975281cb8456f7dea567

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

@unixwhisperer is attempting to deploy a commit to the matt glory's projects Team on Vercel.

A member of the Team first needs to authorize it.

unixwhisperer and others added 2 commits June 6, 2026 01:20
…ting whitelist)

Zero-context-loss project-state export: deployment info
(SP3NZYZA88...hk-stx-bitflow-receiver-v1, tx 7e5b3ec5...), validation evidence,
risk register, blocker (Matt whitelist), next actions, recovery prompt.
Mirrors the Obsidian vault handoff and the Beads flashstack-session-resume-state memory.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Milestone 1 (Bitflow STX receiver) executed on mainnet (ok true,
tx 865df576…639737). Post-M1 deliverables for Matt requests mattglory#3 and mattglory#2:

- docs-feedback-report.md: external-developer documentation review (mattglory#3),
  every finding verified against contract source / live mainnet reads
- sbtc-architecture-review.md: sBTC flash-loan architecture research (mattglory#2
  precursor); STX-vs-sBTC core comparison, funding/risk analysis
- project-docs/session-handoffs/hk-sbtc-real-receiver-v1-Design.md:
  sBTC receiver design proposal + ADR-S1…S7 (design only, no implementation)
- project-docs/session-handoffs/Milestone-1-Completion-Report.md
- scripts/seed-bitflow-receiver.mjs: receiver seed helper used in M1
- Update session handoff with M1 completion + post-M1 continuation
Copy link
Copy Markdown
Owner

@mattglory mattglory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Hillary — contract and docs review both approved. Two requests before merge: (1) please remove the .beads/ directory — it's your personal tooling and doesn't belong in the main repo. (2) The session handoff files under project-docs/session-handoffs/ are your internal working docs — happy to keep if you want them on record, but flag if you'd prefer they stay off main. Once cleaned up this is ready to merge. The docs-feedback-report findings are exactly what the protocol needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants