Contracts
Contracts leverage BSV scripting capabilities to define and enforce constraints among parties. This automation can make legal processes more efficient but it's not a replacement.
Contracts on the BSV Blockchain start with a simple but powerful concept: a token is a piece of value, stored as an unspent transaction output (UTXO) in Bitcoin. By attaching conditions—often written as a locking script—to these tokens, people can start modeling agreements directly on-chain. Below is a broad overview of how that works, why it matters, and how it fits with traditional legal ideas.
UTXOs as Tokens
BSV treats each unspent transaction output (UTXO) like a discrete token. Each token is a slice of value that can be locked and unlocked according to a script. When a UTXO is locked, it effectively contains rules dictating how the value can be spent in the future. These rules can be as simple as "only unlocked by a matching signature" or as elaborate as multi-party Smart Contracts with sophisticated conditions.
Contracts in Terms of UTXOs
Think of a UTXO as the token-with-rules:
- The token: the actual bits of value (satoshis) you’re controlling.
- The rules (locking script): code that states who can spend this token and under what circumstances.
When people talk about “Smart Contracts,” they’re talking about these rules as code—sometimes written in a higher-level language like sCrypt, which then compiles down into “byte code” (Bitcoin script) placed in the UTXO.
Two Types of On-Chain Contracts
-
Multilateral Contracts:
These are agreements among specific parties. Each party has some role—perhaps providing different inputs or signatures. For example, imagine two businesses that create a contract output together: the locking script enforces payment conditions, timelines, or other constraints the businesses need to abide by. To spend or “move” that output, they must satisfy the script’s rules. -
Unilateral Contracts (Bounties or Puzzles):
Sometimes an offer is open to anyone who fulfills certain conditions. A puzzle on the blockchain might say, “Whoever can supply the secret number can claim the funds in this UTXO,” or a more practical scenario might be a bug bounty. The script enforces the payoff automatically: if you meet the condition, the network recognizes your right to claim the tokens.
How Contracts Are “Enforced” by the Network
Enforcement is straightforward:
- You propose a locking script with your UTXO (the “offer”).
- Another party (or any party, in the case of a unilateral contract) attempts to satisfy the conditions (the “acceptance”).
- Some form of “consideration” is involved—usually in the form of satoshis or other digital assets under control.
- With “intention to be bound,” you’ve effectively signaled that you want this locking script to matter—so the network sees the final resolution as legitimate.
The blockchain’s miners validate that each spending of a UTXO meets the script’s rules. If the transaction meets the script requirements, it is accepted onto the chain. If not, the attempted spend is invalid.
Legal Aspects: Not a Replacement, But a Supplement
Legally speaking, a contract often requires:
- Offer
- Acceptance
- Consideration
- Intention to be bound
Placing logic on the blockchain doesn’t let you ignore real-world laws or processes. Actual legal disputes can still arise, and no technology automatically overrides that. Instead, a blockchain contract helps carry out an agreement’s terms when all parties willingly follow the chain’s rules. It’s like a self-checking tool: if you meet the script, it moves forward. If you don’t, it cannot.
In practice, blockchain-based scripts can power everything from simple payment restrictions to complex multiparty deals. But they don’t invalidate the fact that human beings must still behave lawfully, can still raise lawsuits if fraud or duress occurs, and so forth. The chain just enables a transparent, automated mechanism for finalizing the deals that participants have broadly agreed upon.
sCrypt and Other High-Level Tools
On BSV, writing these locking scripts directly in raw Bitcoin script can be cumbersome. That’s why tools like sCrypt exist, offering a “smart contract language” that compiles down to the lower-level script. So you can reason about your contract logic in something that looks like TypeScript or JavaScript-like syntax, then let the compiler produce the final script for the blockchain.
For example, you might specify:
- Which participants can spend the UTXO.
- How much time must elapse.
- Conditions under which the contract should “refund” the value, or pay a bounty.
Your sCrypt code becomes the actual puzzle (locking script) in the UTXO, controlling if and how that UTXO is spent.
Tying It All Together
- Every BSV output is a token: With some quantity of satoshis (the “value”).
- Scripts govern the conditions: A locking script sits on each token, specifying how the next transaction spends it.
- Contracts are formed: Bilateral/multilateral (between named participants) or unilateral (open bounties). The code enforces mechanical terms.
- Higher-level languages help us: sCrypt (and others on top of the BSV protocol) allow more advanced rules.
- Real-world laws still apply: The blockchain doesn’t replace courts or legal disputes; it simply provides an automated path if all participants abide by the coded terms.
This synergy—of well-defined UTXOs, code-based rules, and real-world contractual elements—enables strong, automated enforcement. But it also remains anchored in everyday legal frameworks, ensuring that while the technology can streamline and self-execute, it doesn’t exist in a legal vacuum.
In short, BSV makes the idea of on-chain contracts tangible. The tokens (UTXOs) carry value; the scripts tie value to the contract logic; if your logic is met by the right party, the network “settles” that contract automatically. Meanwhile, there’s no discarding the real-world context. Blockchain is an innovative layer of enforcement, not a replacement for the law.
