Where it started
Wedesak began as a weekend test harness: a flash-loan contract whose tests were written in the same language as the contract, using cheatcodes to bend the chain into whatever state a test needed. The loan was the excuse; the real finding was how much easier atomic logic is to trust when the test reads like the code.
Solana made the idea sharper. There are no callbacks, so the loan has to be two top-level instructions, and the borrow has to see the repay before it lends. That check is a few dozen lines — and in September 2025 a lender-side bug in exactly this kind of check left more than $160M in deposits exposed before it was patched. We built Wedesak around getting that one check right, and around a kit that lets you prove it in your own tests.
What we hold ourselves to
- One borrow, one repay, both top-level. Nested borrows are rejected; the repay is located and matched before funds move.
- A fee arbitrage can absorb. Atomic arbitrage lives on a few basis points of edge, so the fee is 1 bp and nothing on reverts.
- Depositors get the fee. All of it, per reserve.
- Tests before trust. Every entry point ships with kit tests for its revert paths, published with the program.
Who it is for
Searchers running arbitrage and liquidations, protocols that want collateral swaps and refinancing without asking users to unwind, and anyone writing a Solanaprogram that needs capital for exactly as long as one transaction lasts. Start in the composer or read the docs.
