2.1 KiB
Create a Smart Contract Using Escrow
A smart contract is a blockchain-based program that encodes the conditions and fulfillment of an agreement between two or more parties and automatically fulfills the terms of the agreement once conditions are met.
A smart contract can help you exchange anything of value in a transparent, traceable, tamper-resistant, and irreversible way.
The benefit of encoding a smart contract into a blockchain is that it enables the contract to be securely performed without third-parties. Instead, the contract is supervised by the distributed, decentralized network of computers that run the blockchain. Smart contracts also eliminate the need to engage a third-party, such as central authority, legal system, or external enforcement mechanism, which can result in lower costs.
You can use the XRP Ledger escrow feature to build publicly-provable smart contracts. Here’s a roadmap to the high-level tasks you'll need to use an escrow as a smart contract. TODO: what is a real-life example of an escrow we want to model this use case on? Who is our target audience - anyone using the XRP Ledger?
{% set n = cycler(* range(1,99)) %}
{{n.next()}}
Meet prerequisites for creating an Escrow-Based Smart Contract
{{n.next()}}
Generate a condition and a fulfillment
In the context of using an escrow as a smart contract, the condition is XXXXXX and the fulfillment is XXXXXX.
{{n.next()}}
Calculate release or cancel time
In the context of using an escrow as a smart contract, the condition is XXXXXX and the fulfillment is XXXXXX.