Smart Contracts under Control
Archetype is a general purpose language to develop Smart Contracts on the Tezos blockchain, with exclusive features to ease development, tests and formal verification.
Control with Smart Designs
Explicit Execution Conditions
Execution conditions for the contract to execute are easy to read and check.
State Machine Design
Design the contract as a state machine, with guard conditions on transitions.
Example:
archetype pay_with_penalty(holder : address, cost : tez, deadline : date)
entry pay () {
const penalty = now > deadline ? 7% * (now - deadline) / 1d : 0;
transfer ((1 + penalty) * cost) to holder
}