Snapshot for the Stocklana hackathon (Solana Foundation, September 2026). This repository is a read-only excerpt of FireStrategy's on-chain program, published so judges can review how it works. It is not our production source: development continues in our private repository, and this excerpt leaves out venue adapters, tests and build files. Do not deploy it or use it in production. The live program is the one running on Solana mainnet (program ID below).
FireStrategy is a Solana program (Rust, on the quasar-lang framework over Pinocchio) that runs an on-chain carry trade. Collateral (SPYx, xBTC) is deposited on a lending market (Kamino), stablecoins are borrowed against it, and the borrow is deployed into frUSD, which rebalances its stablecoins between yield strategies. Keepers monitor the positions and run permissionless cranks for LTV protection, fees and arbitrage of each Fire token against its pool.
Program FireVibn2xphQvUoZ6LKQBcLmmozu9cejkty6rCuG1g8 (Solana mainnet). Try the product at firestrat.xyz. Tokens:
- frSPY
frSPYzwLrrBWjCexXNZqqxr3pNxn7se3RTouzLWahC8: SPYx carry - frBTC
frBTCQspM1z1gLiRaUzscQTo4psiavcSDnHdxyEoo2Y: xBTC carry - frUSD
frUSDXvuDBLTNsnYVqpdEHZsJ8GPnWuKTC7NCcQ2jcD: stablecoin yield leg
- Enter. Collateral goes to Kamino. The program borrows to the LTV band target only if live yield minus projected borrow APR clears a gate, and buys frUSD in the same transaction. Shares are minted from the measured change in value.
- Monitor. Bucketed stable yield is compared with Kamino's time-weighted borrow index. Sustained negative carry requests an unwind.
- Protect. Anyone can deleverage past the band, or re-lever below it when the gate clears.
- Harvest. Surplus over debt vests for 30 days, then compounds into collateral.
- Rebalance. frUSD is built to move its stablecoins to the best-paying strategy. Today the integrated venues are Exponent (PT-ONyc, fixed yield on OnRe's ONyc) and Hylo (eHYUSD), with more to come. The backend switch moves frUSD's backing between them through USDC, leg by leg, each leg oracle-floored; it is not yet deployed on mainnet. The router, still in development, ranks venues by realised yield.
- Fees. Holders keep 90% of growth up to a goal line (8%/yr carries, 20%/yr frUSD). The protocol takes the rest, above a high-water mark.
- Arbitrage. Mint-and-sell or buy-and-burn against each pool, without lowering NAV per share.
- Entry with a yield gate:
src/instructions/carry_complete_user.rs - LTV protection anyone can crank:
src/instructions/protect_carry_strategy.rs - Monitoring and the negative-carry unwind:
src/instructions/mark_carry_unwind.rs,src/runtime/carry_rate_track.rs - frUSD rebalancing between backends:
src/instructions/frusd_backend_switch.rs - Fees:
src/instructions/yield_fee.rs - Arbitrage without lowering NAV per share:
src/instructions/frspy_arbitrage_surplus.rs
lib.rsdispatch table,error.rs- Carry:
carry_strategy_state,carry_*_receipt,carry_ops*,*_carry_strategy,switch_carry_market,carry_complete_user,*_carry_leveraged,carry_share_accounting,carry_user_common - Cranks:
deploy_carry_stable,expand_carry_*,protect_carry_strategy,redeem_carry_stable,mark_carry_unwind,*_carry_yield,carry_surplus,carry_transaction_policy,claim_*_reward - frBTC:
*frbtc*. frUSD:*frusd*,stable_entry_policy,settle_matured_pt_onyc - Fees:
yield_fee,settle_*_performance_fee. Arbitrage:*arbitrage*. Shared:shared,experimental_accounts runtime/: oracle valuation and LTV math, yield monitoring, SPYx admission, token helpers
The venue adapters (how we enter and exit each venue) and their legs (the modules marked private in each mod.rs), tests, build files, and the keeper and monitoring services are private. The excerpt does not compile. The carry-markets and treasury-arbitrage features are in the mainnet build; experimental-frusd-router and unreleased are not.
Admin keys exist: admins configure strategies and the backend switch, and the program is upgradeable.
Source-available for review only. See LICENSE.