How Does the Cost of Creating a Specification Compare to the Cost of the Code Itself?
The cost of creating a formal, mathematically rigorous specification can often be comparable to, or even exceed, the cost of writing the smart contract code itself. This is because specification writing requires specialized knowledge in formal methods and logic, which is a highly skilled and time-intensive effort.
The specification must be flawless and cover all edge cases, as any error in the spec will lead to an incorrect proof. This high upfront cost is why formal verification is reserved for the highest-value contracts.