From there you can write contracts that do things similar to their paper, real-world counterparts. Say you wanted to set up a one-year rental contract. The landlord would create the contract and you, the tenant, would transfer your security deposit into it. The contract would have logic something like this whenever it is activated:
if rent money was just deposited
transfer the money to the landlord
mark last month as paid
else if payment is more than 30 days overdue
transfer security deposit to landlord
end contract
else if one year has elapsed since contract started
transfer security deposit to tenant
end contract
This contract will keep track of whether a tenant is up-to-date on their rent payments. As long as the contract survives, the tenant is allowed to stay in the unit.The idea is that instead of a contract being enforced by the good will of the participants, or a court if that fails, it's enforced by the logic programmed into the contract itself.