mirror of
				https://github.com/XRPLF/xrpl-dev-portal.git
				synced 2025-11-04 11:55:50 +00:00 
			
		
		
		
	add illustrations
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								docs/img/uc-smart-contract.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/img/uc-smart-contract.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 126 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/img/uc-the-oracle.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/img/uc-the-oracle.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 166 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/img/uc-yescrow-holding-lock-and-key.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/img/uc-yescrow-holding-lock-and-key.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 90 KiB  | 
@@ -10,10 +10,11 @@ labels:
 | 
			
		||||
 | 
			
		||||
A smart contract is a blockchain-based program that handles the conditions and executes the fulfillment of an agreement between two parties. Broken into its simplest components, a smart contract _does_ something if _something else_ happens.
 | 
			
		||||
 | 
			
		||||
The benefit of encoding a smart contract into a blockchain is that it enables contracts to be securely carried out without traditional third-parties, like financial or legal institutions. Instead, the contract is supervised by the distributed, decentralized network of computers that run the blockchain.
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
This enables you to transact with anybody without having to trust they'll uphold their end of a deal; the conditions of the smart contract will force them to.
 | 
			
		||||
The benefit of encoding a smart contract into a blockchain is that it enables contracts to be securely carried out without traditional third parties like financial or legal institutions. Instead, the contract is supervised by the distributed, decentralized network of computers that run the blockchain.
 | 
			
		||||
 | 
			
		||||
This enables you to transact with anybody without having to trust they'll uphold their end of a deal: the conditions of the smart contract force them to comply.
 | 
			
		||||
 | 
			
		||||
## Conditionally Held Escrow
 | 
			
		||||
 | 
			
		||||
@@ -22,7 +23,12 @@ Smart contracts on the XRP Ledger work through conditionally held escrows.
 | 
			
		||||
 | 
			
		||||
### Create the Escrow
 | 
			
		||||
 | 
			
		||||
A conditionally held escrow is similar to a normal escrow: you set aside funds with an escrow to guarantee funds are available to a recipient. The difference is that a conditionally held escrow on the ledger has a `Condition` attached to it, which serves as a lock on the funds. The ledger won't release those funds until an `EscrowFinish` transaction is submitted with the corresponding `Fulfillment` field. The `Condition` and `Fulfillment` fields can be viewed as a lock and key on an escrow.
 | 
			
		||||
A conditionally held escrow is similar to a normal escrow: you set aside funds with an escrow to guarantee funds are available to a recipient. The difference is that a conditionally held escrow on the ledger has a `Condition` attached to it, which serves as a lock on the funds. The ledger won't release those funds until an `EscrowFinish` transaction is submitted with the corresponding `Fulfillment` field. 
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The `Condition` and `Fulfillment` fields can be viewed as a lock and key on an escrow.
 | 
			
		||||
 | 
			
		||||
See: [`EscrowCreate`](../../references/protocol/transactions/types/escrowcreate.md).
 | 
			
		||||
 | 
			
		||||
@@ -31,6 +37,8 @@ See: [`EscrowCreate`](../../references/protocol/transactions/types/escrowcreate.
 | 
			
		||||
 | 
			
		||||
An oracle is a neutral third-party agent that can verify real-world events to either fulfill or invalidate a smart contract. Oracles are vital to making conditional escrows work by generating the condition and fulfillment, and keeping the fulfillment secret until the terms of the contract are met.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
In the context of smart contracts, an oracle will most likely be software that can read real-world data. The oracle would be programmed with the terms of the contract between parties and generate the condition and fulfillment hex values.
 | 
			
		||||
 | 
			
		||||
The oracle gives the condition hex value to the escrow creator, enabling them to set up the escrow initially.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user