A protocontract to protect coins from being pilfered upon zombification. Wonder
if it could have other uses too.
{
1. The name of this contract is the Vault. Any player CAN become a party to the
contract by announcement. A party CAN leave the contract by announcement if the
contract would still have 2 or more players left. A party CAN amend or
terminate the contract only if all other parties consent.
2. A coin account is a integer switch with default value 0. Every player has a
coin account and the Vault itself has a coin account.
3. Any player CAN make a deposit by announcement by transferring a positive
integer number of coins to the Vault. When a player makes a deposit, eir
account is once increased by the number of coins e transferred to the Vault.
4. Any player acting on behalf of emself CAN cause the contract to transfer to
em a number of coins by announcement that specifies a positive integer number
of coins that is equal to or less than eir account. This is called making a
withdrawal. A master CANNOT make a withdrawal on behalf of eir zombie.
5. When a player successfully makes a withdrawal, eir account is immediately
reduced by the specified number of coins and the Vault transfers that number of
coins to the payee.