When step 4 of a 6-step DeFi operation fails, orch8 rolls back steps 1–3 automatically. Retry, compensate, park assets, resume after downtime — all from a single Rust binary with a declarative workflow definition.
Position migration
Without Orch8
Stuck
Wallet holds unexpected SOL. Manual recovery required.
With Orch8
Safe
Funds parked in money-market. Zero manual intervention.
The problem
On-chain programs execute once. If they fail, your funds are stuck mid-flow. Off-chain orchestration is the only way to build reliable multi-step operations on Solana.
Solana's transaction inclusion during peak load is a coin flip. Your 6-step liquidity provision becomes 3 steps done and 3 steps orphaned — with funds stuck between protocols.
Your RPC provider drops the connection during a swap confirmation. Is the transaction pending? Confirmed? Failed? You don't know — and your code doesn't either.
Too low: transaction dropped. Too high: wasted SOL. Dynamic fee estimation requires retry logic that adapts to network conditions in real-time.
Step 1 swapped USDC→SOL. Step 2 swapped USDC→mSOL. Step 3 failed to provide liquidity. Now you hold two tokens doing nothing. No automatic recovery.
Unstaking takes epochs. Governance votes take days. Bridge finality takes hours. Your orchestration must survive restarts across these timescales.
Clockwork shut down. Cron jobs can't track state. Retry loops lose context on restart. There's no Temporal for Solana — until now.
Interactive use cases
Most teams demo the happy path. This page demos the ugly part: what happens after Solana says no.
Enter a SOL/mSOL strategy across Jupiter, Orca, and Marinade without leaving idle capital when pool conditions move mid-flow.
GateCheck APY + depth
Check APY + depth
Swap USDC to SOL
Swap USDC to mSOL
Provide Orca liquidity
Reverse swaps
RollbackStake LP token
Read pool depth, price impact, and minimum APY before any transaction is submitted.
Without Orch8
No pre-check. Swaps execute blindly even when the pool is too shallow or APY has dropped below target.
Outcome
Liquidity provision fails after two swaps, leaving the wallet holding split tokens instead of the intended LP position.
With Orch8
Read pool depth, price impact, and minimum APY before any transaction is submitted.
Outcome
Retries the pool step, then runs compensation handlers in reverse order when slippage or liquidity gates fail.
How it works
Describe each step, its retry policy, compensation handler (for rollback), and rate limits. The engine handles crash recovery, deduplication, and state persistence automatically.
{
"id": "yield_farm_entry",
"blocks": [
{
"type": "step",
"handler": "check_pool_conditions",
"retry": { "max_attempts": 3, "backoff": "2s" }
},
{
"type": "step",
"handler": "swap_usdc_to_sol",
"retry": { "max_attempts": 5, "backoff": "3s" },
"compensation": "reverse_swap_sol_to_usdc",
"rate_limit_key": "rpc:helius",
"rate_limit": { "max": 50, "window_seconds": 1 }
},
{
"type": "step",
"handler": "swap_usdc_to_msol",
"compensation": "reverse_swap_msol_to_usdc"
},
{
"type": "step",
"handler": "provide_liquidity_orca",
"retry": { "max_attempts": 10, "backoff": "5s" },
"compensation": "withdraw_liquidity_orca"
},
{
"type": "step",
"handler": "stake_lp_token"
}
]
}Handlers are plain HTTP endpoints. Use any Solana SDK — web3.js, Anchor, or Solana-py. Orch8 tracks committed outputs; handlers must use stable transaction identities and reconcile unknown chain outcomes before replay.
// TypeScript handler — Jupiter swap with priority fees
app.post('/workers/swap_usdc_to_sol', async (req, res) => {
const { context } = req.body;
const { amount, slippage } = context.data;
// Get Jupiter quote
const quote = await jupiter.getQuote({
inputMint: USDC_MINT,
outputMint: SOL_MINT,
amount,
slippageBps: slippage,
});
// Build transaction with priority fee
const { transaction } = await jupiter.getSwapTransaction({
quoteResponse: quote,
userPublicKey: wallet.publicKey,
prioritizationFeeLamports: 'auto',
});
// Sign and send
const signature = await connection.sendTransaction(
transaction, { skipPreflight: true }
);
// Confirm with timeout
await connection.confirmTransaction(signature, 'confirmed');
// Persist this receipt; reconcile chain state if the outcome is unknown.
res.json({
signature,
amount_out: quote.outAmount,
status: 'confirmed'
});
});Trigger from webhooks, on-chain events (Helius webhooks), cron schedules, or manual API calls. Reusing an idempotency key deduplicates accepted instance-creation requests; retry ambiguous submissions with the same key.
POST /sequences/yield_farm_entry/instances
{
"context": {
"data": {
"amount": 1000000000,
"slippage": 50,
"pool": "7XawhbbxtsRcQA8KTkHT9f9nc6d69UwqCDh6U5EEbEmX",
"min_apy": 12.5
}
},
"idempotency_key": "yield-farm-entry-2026-05-10-pool-7Xaw"
}Architecture
Orch8 is a strict separation of concerns: the engine owns workflow state, retries, compensation, and crash recovery. Your handlers own the Solana-specific logic — signing transactions, calling Jupiter, reading on-chain accounts. Neither side knows about the other's internals.
Your application
Triggers operations via REST API or webhooks. Receives completion callbacks.
Orch8 engine
Rust binary. Persists step state, manages retries, runs compensation, enforces rate limits and circuit breakers. Survives crashes via snapshot recovery.
Your handlers (HTTP workers)
Plain HTTP endpoints in any language. Each handler performs one Solana action — swap, stake, transfer, check balance. Orch8 calls them, never the reverse.
Solana RPC + protocols
Jupiter, Orca, Marinade, Drift, Metaplex, or any on-chain program. Your handlers use whichever SDK you prefer — web3.js, Anchor, solana-py.
Why Orch8 for Solana
Not a generic workflow engine bolted onto Solana. Built to handle the specific ways Solana operations fail — transaction drops, RPC timeouts, partial execution, and epoch-spanning flows.
Automatic compensation on failure
// When provide_liquidity fails after 10 retries:
Engine executes compensation in reverse order:
✗ provide_liquidity_orca — FAILED (slippage exceeded)
← reverse_swap_msol_to_usdc — executing...
← reverse_swap_sol_to_usdc — executing...
Result: All funds returned to USDC.
Sequence marked as "compensated".
Alert fired to EngineListener.
Ready to retry when conditions improve.What happens on failure at step 4
Solana ecosystem
Orch8 doesn't wrap protocols — your handlers call them directly using whichever SDK you prefer. The engine provides the reliability layer: retries, compensation, rate limiting, and crash recovery around your existing Solana code.
Swap aggregation with priority fee escalation and slippage retries
Concentrated liquidity provision with capacity-aware retry logic
Liquid staking operations spanning epoch boundaries
Perpetual position management with multi-step entry and exit
NFT minting, batch uploads, and collection launches with integrity gates
LP provision and farm entry with automatic rollback on slippage failure
Orch8's Solana integration was developed and submitted as part of the Solana Frontier Hackathon on Colosseum — demonstrating recoverable multi-step DeFi operations with real devnet transaction proofs. The full source and demo are open source.
Comparison
Clockwork is gone. Cron jobs lose state. Temporal needs a cluster. Custom retry loops don't rollback. Orch8 is the middle ground — powerful enough for multi-step sagas, simple enough to run as a single binary.
| Dimension | Clockwork | Cron jobs | Custom code | Temporal | Orch8 |
|---|---|---|---|---|---|
| Status | Shut down | Active | Active | Active | Active |
| Multi-step state tracking | No | No | Manual | Yes | Yes |
| Compensation / rollback | No | No | Manual | Manual | Built-in |
| Solana-specific features | Yes (on-chain) | No | Manual | No | Yes |
| Crash recovery | N/A | No | No | Replay | Snapshot |
| Operational complexity | N/A | Low | High | Very High | Low |
| Circuit breaker | No | No | Manual | No | Built-in |
| Rate limiting per RPC | No | No | Manual | No | Built-in |
| Priority fee escalation | No | No | Manual | Manual | Configurable |
| Handler language | Rust (on-chain) | Any | Any | SDK-specific | Any (HTTP) |
Proof
The deterministic demo runs locally with no network dependency. The devnet proof submits a real SOL transfer that you can verify on Solana Explorer.
Demo terminal output
Recoverable Position Migration Demo
====================================
Unprotected migration
Initial: wallet=0, protocolA=100, protocolB=0, moneyMarket=0, usdc=0
ok withdraw_collateral: withdrawn
ok claim_rewards: rewards_claimed
ok swap_rewards: swapped
fail deposit_protocol_b: protocol_b_capacity_full
Stopped with assets idle: wallet=100, protocolA=0, usdc=5
Recoverable migration
Initial: wallet=0, protocolA=100, protocolB=0, moneyMarket=0, usdc=0
ok withdraw_collateral: withdrawn
ok claim_rewards: rewards_claimed
ok swap_rewards: swapped
fail deposit_protocol_b: protocol_b_capacity_full
recovery deposit_protocol_b: park_assets
ok park_assets: parked_assets
Recovered: wallet=0, moneyMarket=100, usdc=5
Validated generated workflows against local orch8 engineDevnet transaction proof
Real SOL transfer on Solana devnet — confirmed on-chain, verifiable via Explorer.
View on Solana Explorer →What's proven vs mocked
Real
Mocked for demo
Try it yourself
The full demo runs locally in under 30 seconds. No Solana validator, no RPC keys, no configuration. One command shows both the unprotected failure and the recoverable flow.
git clone https://github.com/orch8-io/orch8-solana.git
cd orch8-solana
npm install
npm run demo:frontierRequires Node.js 18+. Runs on Linux and macOS. Full docs →
FAQ
Clone the repo. Run one command. See an unprotected DeFi migration fail, then the same migration recover automatically. The full source, generated workflows, and devnet proof are in the repository.
Self-host free. No feature gates. No vendor lock-in. Quickstart → · Docs →