Receiver Contracts
Live contracts are deployed and callable on Stacks mainnet today. Templates show what you can build.
STX Flash Loans
Live on MainnetCore: SP20XD46NGAX05ZQZDKFYCCX49A3852BQABNP0VG5.flashstack-stx-core
Strategy Templates
Build your ownThese are reference implementations showing what you can build with flash loans. Deploy your own version and request whitelisting.
Flash-loan-powered vault liquidator — template for lending protocol liquidations.
Borrow STX, deposit as collateral, borrow again — builds leveraged yield positions.
Atomically swap one collateral type for another without closing your position.
Auto-compound yield by flash-loaning to claim rewards and redeploy.
Build Your Own Receiver
Implement stx-flash-receiver-trait — one function, deploy to mainnet, DM us to get whitelisted. Zero collateral. Only pay Stacks gas (~$0.002). If your strategy can't repay, the entire tx reverts automatically.
;; 1. Implement the trait
(impl-trait 'SP3TGRVG7DKGFVRTTVGGS60S59R916FWB4DAB9STZ.stx-flash-receiver-trait.stx-flash-receiver-trait)
;; 2. This is the only function you need
(define-public (execute-stx-flash (amount uint) (core principal))
(let (
(fee (/ (* amount u5) u10000)) ;; 0.05%
(total-owed (+ amount fee))
)
;; ── YOUR STRATEGY HERE ──────────────────────────
;; You have (amount) STX in this contract right now.
;; Arbitrage, liquidate, swap — anything on-chain.
;; ────────────────────────────────────────────────
;; Repay principal + fee before returning
(unwrap! (as-contract (stx-transfer? total-owed tx-sender core)) (err u500))
(ok true)
)
)
;; 3. Deploy + request whitelist at flashstack.vercel.app