Crowdfund Withdrawal

A crowdfund in WikiScript: funders may withdraw while withdrawals are allowed; the beneficiary may collect once the goal is met after the deadline. This retells the WITHDRAWAL article of the canonical Lexon crowdfunding contract as a wiki agreement. The original, with its legal English and Solidity twins, is on the Lexon page.

# The agreement

agreement "Crowdfund Withdrawal" of wiki "legalcommons.org". terms: "The Beneficiary" is a party. "A Funder" is any party. "The Fund" is page "Crowdfund Ledger" of this wiki. "The Goal" is an amount. "The Deadline" is a time. "Withdrawals Allowed" is a flag. clause: "Withdrawal by Funders". A Funder may withdraw when Withdrawals Allowed is set and the balance of the Funder is greater than zero. on withdraw: get the balance of the Funder record "fund transfer" in the Fund put zero into the balance of the Funder ghost the Fund end withdraw clause: "Collection by the Beneficiary". The Beneficiary may collect when the raised amount of the Fund is not less than the Goal and the date is after the Deadline. on collect: get the raised amount of the Fund if it is not less than the Goal: record "fund transfer" in the Fund end if ghost the Fund end collect

# Who may do what The permission table is `wikiscript who` over the text above:

PARTY | MODAL | ACTION | WHEN A Funder | may | withdraw | when Withdrawals Allowed is set and the balance of the Funder is greater than zero The Beneficiary | may | collect | when the raised amount of the Fund is not less than the Goal and the date is after the Deadline

# Lineage Lexon compiles this contract one way, into legal English and Solidity. WikiScript instead interprets it over wiki state: the Fund is a ledger page, transfers are recorded facts, and the ghost page shows the resulting ledger for anyone to fork. See Law as Lexon for the jurisprudence.

# Assets

crowdfund-withdrawal