The initial assurance payment technology for Flipstarter uses Anyone-Can-Pay transactions. "Flipstarter 500k, 6 independent campaigns" will use that technique.

However we also said that user experience can be improved in the future by using smart contracts. This is the first article where I would like to explore additional techniques that Flipstarter or anyone can use to build voluntary funding solutions. Future articles will cover more sophisticated techniques or techniques that trade some level of trustlessness for better user experience.

Assurance payment : Alternative way to say assurance contract, the general idea that funding is done on an all-or-nothing basis to increase fairness from the funder's perspective.

Coin : Common name for UTXO.

Contract: Short name for smart contracts using Bitcoin Cash p2sh (pay to script hash). More specifically, I will be talking about covenants.

Here is a contract (2020-03 still under review for correctness and safety) that is about as simple as possible for a trustless assurance payment. It allows many independent contracts to be created and then combined in one assurance payment.

contract written in CashScript by @Rosco (creator of CashScript!)

contract written in Spedn by me

All pledges with this contract have three shared requirements (with examples):

Forward amount : total output amount must be 1.0 BCH

Forward target : must pay to eatBCH#106

Expiration: can pay forward before block 700,000; after that can also refund

Each pledge with this contract has two unique requirements (with examples):

Refund amount : output amount must be the same as the funding input.

Refund target: must pay to the funder's address (or whatever they chose when they created the contract)

With those conditions, the three contracts below are unredeemable alone:

But they are redeemable if they cooperate in one transaction. This basically recreates the Anyone-Can-Pay transaction with contracts:

At or after the expiration block, each contract can also be refunded according to the instructions of the original funder:

Same : It accomplishes the same assurance payment.

Better (a lot better) : Users can pay directly to a QR code with any common wallet. However wallets are still not smart enough to understand the parameters of the smart contract and show them to the user. The user has to trust that the address shown by a campaign is doing what they expect.

Better : Pledges are non-revocable until the campaign expires.

Worse : The contract solution requires significant extra implementation complexity due to a lack of infrastructure around creating, funding and redeeming contracts.

Worse: An Anyone-Can-Pay transaction can handle over 500 pledges. Due to the limit on single transaction size (100k Bytes for non-miners) + large smart contract size, a single assurance payment with these contracts can only handle about 100~200 pledges.

The complexity can be handled with time and investment.

The limited number of pledges is an issue because of the effective minimum pledge. For example, for a $100,000 campaign like the current Cash Fusion campaign by bitcoin.com, the effective minimum pledge is about $1,000. Although this reflects reality - that large contributions create the vast majority of the value in a campaign, it is not good for engagement and giving everyone a chance to put skin in the game.

Limited pledges can be solved with two techniques:

More sophisticated contracts, which I will discuss in future articles. Avoiding the minimum problem by using tiers like common crowdfunding sites. Then we get a more reasonable picture.

The three things necessary for Flipstarter to implement this simple p2sh solution are:

Peer review of the contract correctness and security. Infrastructure for creating, funding, tracking redeeming Flipstarter smart contracts. Implementation of fixed tiers instead of allowing people to pledge whatever amount they want between minimum and maximum.

This is one campaign that we could create for Flipstarter itself to fund this development.

Lead image by qimono from Pixabay