I don't have anywhere near Vern's experience or intellect, but I would do what I can with what I've got. I'd write up a normal, public-funded, FP performance-based contract, with strict quality levels equating to your success outcome. Deductions up to 100% of the contract value could be written in for specific undesirable outcomes (AQL). I have done that before, though normally using deductions that are not so large as to leave contractors with absolutely nothing, for fairness' sake.
The contractor can still get private funding, and the funder can get paid first, by their going to a private party, such as a bank, and putting in an Assignment of Claims -- the contract, its payments, and maybe other things, as collateral.
The result might not be equitable if the required outcomes aren't met, so Legal would need to be up to speed. Still affected by apparent authority, constructive changes, terminations, and so forth.
I can imagine several other ways this could be done, too. The overall price would be lower, I expect, if the contractor's reward/risk wasn't all or nothing. I suppose one way do to this, other than avoiding a 100% AQL deduction, would be to consider an initial period an unpaid trial run/demo, and paid option periods as potential rewards, even a period as a Requirements contract.