Clarity theorytheory 0/50 · 0%
Foundations · easy

3. Decidability and Safety

The core safety philosophy of Clarity.

Clarity was built to avoid the common pitfalls of smart contract development. By being non-Turing complete, it eliminates entire classes of bugs like re-entrancy and infinite gas consumption. The source code itself is published on-chain, meaning what you see is what you execute.

clarity
;; No re-entrancy is possible by design
(define-public (secure-transfer (amount uint))
  (stx-transfer? amount tx-sender 'SP3FG...))

Check your understanding

  1. 1. What bug class is impossible by design in Clarity?