Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Atomic flash loan protocol for Bitcoin Layer 2 (Stacks blockchain)
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Open flash-liquidity infrastructure for Bitcoin Layer 2
Atomic, uncollateralized flash loans on Stacks (Bitcoin L2). Borrow STX or canonical sBTC with zero collateral, run any on-chain strategy, and repay — all in a single transaction. If repayment fails, the whole transaction reverts. Zero risk to the protocol.
FlashStack is neutral, standalone flash-liquidity any Clarity contract can integrate — no lending market to join. It is also the rail behind DeepStack, a Bitcoin-native market-making agent that rebalances through it:README 전문 보기 ↗Open flash-liquidity infrastructure for Bitcoin Layer 2
Atomic, uncollateralized flash loans on Stacks (Bitcoin L2). Borrow STX or canonical sBTC with zero collateral, run any on-chain strategy, and repay — all in a single transaction. If repayment fails, the whole transaction reverts. Zero risk to the protocol.
FlashStack is neutral, standalone flash-liquidity any Clarity contract can integrate — no lending market to join. It is also the rail behind DeepStack, a Bitcoin-native market-making agent that rebalances through it:
DeepStack volume → FlashStack fees → LP yield → deeper reserves → more DeepStack capacity ↻
The first live DeepStack → FlashStack → Bitflow flash-rebalance ran on mainnet in one atomic transaction.
Flash loan. Call flash-loan(amount, receiver) on a core. The core sends the asset to your receiver, invokes its callback, and requires the reserve to grow by at least the fee before the transaction ends — otherwise everything reverts. Repayment is never trusted; it is measured. This is the Aave live-reserve model, so a malicious receiver can only fail, never drain the pool.
LP pool. Anyone deposits STX or sBTC and receives shares. Every flash-loan fee stays in the pool, so each share appreciates. Withdraw principal + accrued yield anytime. Share value is exposed to lending protocols via a collateral oracle (get-share-price / get-lp-value).
Fee: 0.05% per loan. Assets: STX and canonical sBTC (SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token).
Flash-loan engines & receivers — SP20XD46NGAX05ZQZDKFYCCX49A3852BQABNP0VG5
| Contract | Description |
|---|---|
flashstack-stx-core | STX flash-loan engine (reserve model) |
flashstack-sbtc-core | Canonical sBTC flash-loan engine |
bitflow-arb-receiver-v4 | Bitflow STX/stSTX arbitrage — de-approved (F-10): no contract-caller check. Hardened rewrite: bitflow-arb-receiver-v5, not yet deployed |
velar-sbtc-arb-receiver | Velar wSTX↔sBTC arbitrage — non-functional, de-approved: hardcodes Velar pool u70, which is not an sBTC/STX pool |
zest-v2-liquidation-receiver | Zero-capital Zest liquidator, v0-8-market (5 modes) — not yet deployed |
alex-arb-receiver-v2 | ALEX STX/ALEX arbitrage — de-approved (F-10): no contract-caller check. Approved successor: alex-arb-receiver-v5 |
Hardened LP pools & oracle (v2) — SPR9PQANV6XHSDNRAX2GNKCA5Z1KH61961KE0BYG
| Contract | Description |
|---|---|
flashstack-stx-pool-v2 | STX LP pool — virtual-shares hardened |
flashstack-sbtc-pool-v2 | sBTC LP pool — virtual-shares hardened, built-in oracle |
flashstack-pool-oracle-v2 | STX collateral oracle |
The v2 pools add virtual shares/assets (OpenZeppelin ERC-4626 style) against first-depositor share inflation. The earlier v1 pools are deprecated.
Status: mainnet, not yet professionally audited. Use at your own risk.
contracts/test/, not the canonical sources; see docs/security/CONTRACT_INVENTORY.md §5 (D6).A professional third-party audit is the top priority before opening real LP deposits.
git clone https://github.com/mattglory/Flashstack.git
cd flashstack
npm install
npm test # 254 tests passing
npm run check # clarinet check — type-checks contracts registered in Clarinet.toml
# (script-deployed receivers aren't in the project; see docs/BUILD_A_RECEIVER.md)
cd web && npm install && npm run dev # frontend at http://localhost:3000
Requirements: Node.js 18+, Clarinet 2.0+.
Scripts read wallet mnemonics from the environment only. Never hardcode or commit a mnemonic.
Any Clarity contract implementing the receiver trait can borrow. New to Clarity? Start with the New Developer Walkthrough.
(impl-trait 'SP3TGRVG7DKGFVRTTVGGS60S59R916FWB4DAB9STZ.stx-flash-receiver-trait.stx-flash-receiver-trait)
(define-constant CORE 'SP20XD46NGAX05ZQZDKFYCCX49A3852BQABNP0VG5.flashstack-stx-core)
(define-public (execute-stx-flash (amount uint) (core principal))
(begin
;; Only the real core may call this, and repayment goes to it, never to `core` (F-10)
(asserts! (is-eq contract-caller CORE) (err u403))
(let (
(fee-bp (unwrap! (contract-call? CORE get-fee-basis-points) (err u500)))
(fee (let ((raw (/ (* amount fee-bp) u10000))) (if (> raw u0) raw u1)))
)
;; ...your strategy here — `amount` STX is already in this contract...
(unwrap! (as-contract (stx-transfer? (+ amount fee) tx-sender CORE)) (err u500))
(ok true)
)
)
)
Before asking for approval, run docs/security/RECEIVER_VETTING.md. Deploy to mainnet, then open a GitHub issue with your contract address to get whitelisted. Full templates: BUILD_A_RECEIVER.md · TESTING_GUIDE_STX.md · TESTING_GUIDE_SBTC.md.
| Asset | Type | Tx |
|---|---|---|
| STX | DeepStack flash-rebalance (borrow → Bitflow swap → repay) | 0x1f826abe… |
| STX | Bitflow STX/stSTX round-trip | 0xabd33fc4… |
| sBTC | Canonical sBTC borrowed & repaid atomically | 0x67f0c77d… |
See ROADMAP.md — audit-readiness → audit → deploy v2 → LP deposits, the vault/AUM future, and permissionless-post-audit.
Built by Glory Matthew — @flashstackbtc · GitHub · [email protected]
stx-test-receiver / sbtc-test-receiver | Minimal borrow-and-repay receivers — de-approved (F-10): no contract-caller check. A loan naming either returns (err u306) |