Skip to main content
Loading…
AS Albert Schaper
  • 01Home
    • Profile & Career
    • Expertise
    • Overview
    • Results
    • Technical Depth
  • 04Projects
  • 05Contact
  • 06Insights
  • 07Tools
AS

Albert Schaper

01Home
Profile & CareerExpertise
OverviewResultsTechnical Depth
04Projects05Contact06Insights07Tools

AI · Finance · Entrepreneur

Home/Knowledge Atlas/Chapter 8: Smart Contracts
Knowledge Atlas · Chapter 8/10

Smart Contracts: Programmable Money

Bitcoin Script, Miniscript, BitVM and DLCs on one side, the EVM and account abstraction on the other: what is programmable where — and what deliberately is not.

By Albert Schaper AI Expert & Entrepreneur
15 October 2026 Updated 29 October 2026 CryptoSmart Contracts
Auf Deutsch lesen LinkedIn X
Contents
  • The idea in one paragraph
  • Bitcoin Script: deliberately limited
  • Miniscript: readable spending policy
  • BitVM and DLCs: compute outside, dispute on-chain
  • Account abstraction: accounts with logic
  • Risks: code is attackable
  • Practice and limits
  • Sources

Ethereum was built for programmable contracts, Bitcoin deliberately not — yet remarkably much maps onto Bitcoin: from multisig vaults through Lightning channels to bets on real-world events. This chapter explains Bitcoin's script language and its disciplined extensions — and on the other side, how account abstraction makes Ethereum accounts programmable.

The idea in one paragraph

A smart contract locks money to conditions instead of people: “spendable if …”. On Bitcoin, a small stack language phrases these conditions directly in the transaction; complex logic moves into layers above (Miniscript, BitVM, DLCs) that stay invisible in the normal case. On Ethereum, accounts themselves carry logic — account abstraction turns them into configurable smart accounts. Common denominator: trust in code instead of counterparties — which makes audits and understanding all the more important.

Bitcoin Script: deliberately limited

Bitcoin Script is a simple stack language without loops — not a flaw but design: every execution terminates predictably at bounded cost. The building blocks:

  • Opcodes: Signature checks, hash comparisons and time conditions via CLTV/CSV, among others. Available instructions depend on the script version; ordinary Script does not support loops or direct access to external data.
  • Standard types: P2PKH and P2WPKH use public-key hashes; P2SH and P2WSH use script hashes. Taproot uses an output key that may also commit to script paths (see Chapter 6).
  • UTXO logic: Each output carries its own script; on spending, script plus unlocking data run deterministically (see UTXO model). No global state, no side effects.

What works: multisig, escrow with deadline, payment channels. What does not: loops, random numbers, access to external data — that needs oracle constructions like DLCs.

Miniscript: readable spending policy

Miniscript represents a subset of Bitcoin Script in a structured form. It supports composition, analysis and signing of spending conditions, such as combinations of signatures and timelocks. Software can analyze satisfaction paths and resource requirements. Whether a design correctly expresses the intended recovery or inheritance policy still requires review; wallet support also matters.

BitVM and DLCs: compute outside, dispute on-chain

Two approaches bring arbitrary complex logic to Bitcoin without changing the base layer:

  • BitVM: Arbitrary computations run off-chain between parties; only a dispute mechanism lands on-chain: cheaters lose the challenge game against an honest verifier. In principle this enables Turing-complete contracts on Bitcoin — at the price of interactive, capital-binding protocols (research and construction status).
  • DLCs (Discreet Log Contracts): Two parties bet on an external event (price, election, weather): an oracle signs the outcome, the contract pays out automatically — without the oracle ever touching money or learning the bet's content. Ideal for hedging and prediction markets with minimal trust.

Account abstraction: accounts with logic

Ethereum distinguishes externally owned accounts controlled through keys from contract accounts controlled by code. ERC-4337 provides infrastructure for smart-account operations; EIP-7702 allows EOAs to delegate execution. These are different mechanisms with overlapping uses:

  • ERC-4337: Bundlers collect UserOperations and submit them to an EntryPoint contract, without changing consensus rules. Paymasters can sponsor fees. Token payments and session-key limits require suitable wallet or paymaster implementations; the standard does not automatically provide them.
  • EIP-7702: Ordinary Ethereum accounts can delegate code execution to an implementation. The delegation persists until changed or cleared; it does not expire at the end of a transaction.
  • Consequences for keys: Social recovery (trusted people instead of seed paper), spending limits, biometrics plus hardware — but also: more code, more attack surface, dependence on bundler infrastructure.

Risks: code is attackable

Programmability multiplies attack surface. The patterns repeat:

  • Reentrancy and logic bugs (EVM): contracts calling foreign code before completing their own state change — still a top cause despite known patterns.
  • Admin keys and upgrades: Many DeFi contracts change via proxy — then you trust the key holders, not the code (see the L2BEAT logic in Chapter 7).
  • Oracle dependence: DLCs and DeFi stand and fall with oracle integrity — decentralized oracle networks spread but don't eliminate residual risk.
  • BitVM complexity: Challenge games need online presence and locked capital — similar responsiveness requirements to Lightning, but with protocol-specific assumptions.

Practice and limits

What you can touch today: sign and verify messages with the message verifier (EIP-191 for signed messages; contract-wallet signatures may require ERC-1271), read contract data with the ABI decoder, verify addresses per network with the address validator. What to skip: feeding significant amounts to unaudited contracts, ignoring admin keys, confusing “audited” with “safe”. Terms live in the glossary, fee logic in the ether article.

Sources

  • ERC-1271: Contract signature validation
  • Bitcoin Script (reference): en.bitcoin.it/wiki/Script
  • Miniscript (language reference): bitcoin.sipa.be/miniscript
  • BitVM (whitepaper and implementation): bitvm.org
  • ERC-4337 (account abstraction): eips.ethereum.org/EIPS/eip-4337
  • EIP-7702 (EOAs with code delegation): eips.ethereum.org/EIPS/eip-7702

Continue in the atlas: back to the overview — or on to Chapter 9: Regulation, back to Chapter 7: Layer 2. Also: Bitcoin & Web3 Basics and the reading-list atlas. More numbers and formats: cheat sheet.

Previous chapter Chapter 7 Layer 2: Scaling Beyond the Base Next chapter Chapter 9 Regulation: MiCA, Travel Rule, Taxes
More Insights
  • Crypto

    Bitcoin & Web3 Basics: The Beginner's Learning Path

    Nine articles, one learning path: how wallets come to exist, how transactions actually work, and what matters for your own security — with progress tracker and tools.

  • Crypto

    UTXO vs. Account Model

    UTXO and account model explained: recompute Bitcoin change, understand fees in sat/vB, and tell Ethereum apart from Solana.

  • Crypto

    Why Ether Has 18 Decimals

    Understand Wei, Gwei and gas: compute EIP-1559 with an example, separate fee caps from consumption, and handle token decimals correctly.

Albert Schaper
About the author

AI expert and entrepreneur with a finance background and a focus on execution. I support companies as a partner and partly with own capital, mainly on strategy, financing and sales, and advise teams on putting AI to work. LinkedIn

← Atlas overview
AS

AI · Finance · Entrepreneur

Navigation

HomeAboutExpertiseProjectsContactInsightsTools

Projects

Best-AI.orgBitAutorGeld 2.0Pharmaceutical company

Tools

ETH Unit ConverterAddress ValidatorQR Code GeneratorSeed Phrase ValidatorWallet Generator

© Albert Schaper. All rights reserved.

Privacy / Imprint