From 8cc2e874d4c4c1d95de448d1c28f2f706ffb4b16 Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Fri, 26 Jul 2024 18:32:41 +0500 Subject: [PATCH 1/6] docs: adding smart contract entry to glossary --- main/glossary/index.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/main/glossary/index.md b/main/glossary/index.md index d024a74c0..d2e564d1d 100644 --- a/main/glossary/index.md +++ b/main/glossary/index.md @@ -602,6 +602,27 @@ Secure ECMAScript has been renamed to [Hardened JavaScript](#hardened-javascript An imaginary currency Agoric documentation uses in examples. +## Smart Contract + +A smart contract is a self-executing contract with the terms of the agreement directly written into lines of code. These contracts are stored and executed on a blockchain network. Smart contracts automatically enforce and execute the terms of a contract when predefined conditions are met, eliminating the need for intermediaries and reducing the risk of human error or manipulation. Like user accounts on a chain, smart contracts can "own" or hold digital assets themselves. + +Key Characteristics: + +- Automated Execution: Smart contracts automatically execute actions when the conditions specified in the code are satisfied. +- Transparency: The contract's code is usually transparent and accessible to all participants on the blockchain. +- Immutability: Once deployed on the blockchain, the contract code cannot be altered, ensuring that the terms remain consistent and tamper-proof. +- Trustless Transactions: Smart contracts operate in a decentralized manner, reducing the need for trust between parties as the contract enforces the terms. + +Applications: + +- Finance: Automating transactions, loan agreements, and insurance claims. +- Supply Chain: Tracking goods and verifying authenticity. +- Real Estate: Simplifying property transfers and rental agreements. +- Voting Systems: Ensuring secure and transparent voting processes. + +In the context of the Agoric blockchain, smart contracts are written using JavaScript and leverage Agoric's secure environment to build and deploy reliable decentralized applications. + + ## Terms Contract instances have associated terms, gotten via [`E(zoe).getTerms(instance)`](/reference/zoe-api/zoe#e-zoe-getterms-instance), From 8bd82bf6a6cc88dc392aad21e4a41b81e830ae36 Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Sat, 27 Jul 2024 08:46:47 +0500 Subject: [PATCH 2/6] docs: updated smart contracts in glossary --- main/glossary/index.md | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/main/glossary/index.md b/main/glossary/index.md index d2e564d1d..4d491e77a 100644 --- a/main/glossary/index.md +++ b/main/glossary/index.md @@ -604,24 +604,11 @@ An imaginary currency Agoric documentation uses in examples. ## Smart Contract -A smart contract is a self-executing contract with the terms of the agreement directly written into lines of code. These contracts are stored and executed on a blockchain network. Smart contracts automatically enforce and execute the terms of a contract when predefined conditions are met, eliminating the need for intermediaries and reducing the risk of human error or manipulation. Like user accounts on a chain, smart contracts can "own" or hold digital assets themselves. +A smart contract is a contract-​like arrangement expressed in code, where the behavior of the program enforces the terms of the contract. Smart contracts are able to solve some of the fundamental social problems that have traditionally been solved by legal contracts. For example, commerce often involves an exchange of one thing for another. However, the party that transfers their assets first leaves themselves vulnerable to the other party’s opportunism: the second party can simply walk away from the exchange with both parties’ assets. -Key Characteristics: - -- Automated Execution: Smart contracts automatically execute actions when the conditions specified in the code are satisfied. -- Transparency: The contract's code is usually transparent and accessible to all participants on the blockchain. -- Immutability: Once deployed on the blockchain, the contract code cannot be altered, ensuring that the terms remain consistent and tamper-proof. -- Trustless Transactions: Smart contracts operate in a decentralized manner, reducing the need for trust between parties as the contract enforces the terms. - -Applications: - -- Finance: Automating transactions, loan agreements, and insurance claims. -- Supply Chain: Tracking goods and verifying authenticity. -- Real Estate: Simplifying property transfers and rental agreements. -- Voting Systems: Ensuring secure and transparent voting processes. - -In the context of the Agoric blockchain, smart contracts are written using JavaScript and leverage Agoric's secure environment to build and deploy reliable decentralized applications. +Smart contracts solve this problem of opportunism during an exchange by providing an [escrow mechanism](#escrow) for the assets from both parties, only dispersing the assets after both parties have contributed. There is no need for a human intermediary to perform the escrow; the smart contract itself holds the assets. Because the behavior of the smart contract is fully described by its code, and that code runs on a decentralized blockchain with high integrity execution, the parties can be assured that the code describes exactly what will happen. As such, smart contracts hold the promise of being a market-​based solution for the opportunism problem that does not rely on State intervention. +In the context of the Agoric blockchain, smart contracts are written using JavaScript and leverage Agoric's [secure environment](#offer-safety) to build and deploy reliable decentralized applications. ## Terms From d15dfdc74a4269850a09c4e8f06d62f36665229e Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Sun, 28 Jul 2024 11:41:36 +0500 Subject: [PATCH 3/6] fix: line width in smart contract glossary entry --- main/glossary/index.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/main/glossary/index.md b/main/glossary/index.md index 4d491e77a..e0ad08fd4 100644 --- a/main/glossary/index.md +++ b/main/glossary/index.md @@ -604,11 +604,24 @@ An imaginary currency Agoric documentation uses in examples. ## Smart Contract -A smart contract is a contract-​like arrangement expressed in code, where the behavior of the program enforces the terms of the contract. Smart contracts are able to solve some of the fundamental social problems that have traditionally been solved by legal contracts. For example, commerce often involves an exchange of one thing for another. However, the party that transfers their assets first leaves themselves vulnerable to the other party’s opportunism: the second party can simply walk away from the exchange with both parties’ assets. - -Smart contracts solve this problem of opportunism during an exchange by providing an [escrow mechanism](#escrow) for the assets from both parties, only dispersing the assets after both parties have contributed. There is no need for a human intermediary to perform the escrow; the smart contract itself holds the assets. Because the behavior of the smart contract is fully described by its code, and that code runs on a decentralized blockchain with high integrity execution, the parties can be assured that the code describes exactly what will happen. As such, smart contracts hold the promise of being a market-​based solution for the opportunism problem that does not rely on State intervention. - -In the context of the Agoric blockchain, smart contracts are written using JavaScript and leverage Agoric's [secure environment](#offer-safety) to build and deploy reliable decentralized applications. +A smart contract is a contract-​like arrangement expressed in code, where the behavior of the +program enforces the terms of the contract. Smart contracts are able to solve some of the +fundamental social problems that have traditionally been solved by legal contracts. For example, +commerce often involves an exchange of one thing for another. However, the party that transfers +their assets first leaves themselves vulnerable to the other party’s opportunism: the second party +can simply walk away from the exchange with both parties’ assets. + +Smart contracts solve this problem of opportunism during an exchange by providing an +[escrow mechanism](#escrow) for the assets from both parties, only dispersing the assets after both +parties have contributed. There is no need for a human intermediary to perform the escrow; the smart +contract itself holds the assets. Because the behavior of the smart contract is fully described by +its code, and that code runs on a decentralized blockchain with high integrity execution, the +parties can be assured that the code describes exactly what will happen. As such, smart contracts +hold the promise of being a market-​based solution for the opportunism problem that does not rely on +State intervention. + +In the context of the Agoric blockchain, smart contracts are written using JavaScript and leverage +Agoric's [secure environment](#offer-safety) to build and deploy reliable decentralized applications. ## Terms From 302d8c9935535d2f8e932d2db09d75a170506b48 Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Mon, 29 Jul 2024 08:28:18 +0500 Subject: [PATCH 4/6] fix: heading # fix in gloassary --- main/glossary/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/glossary/index.md b/main/glossary/index.md index e0ad08fd4..93558ebec 100644 --- a/main/glossary/index.md +++ b/main/glossary/index.md @@ -645,7 +645,7 @@ For more information, see the [Vat section in the Distributed JS Programming doc The concept of a vat is metaphorically inspired by the philosophical experiment known as “Brain in a Vat.” This thought experiment, explored in philosophy, posits a scenario in which a brain is sustained in a vat and connected to a computer that simulates reality, raising questions about knowledge, reality, and perception. Similarly, in the context of distributed systems, a vat isolates and encapsulates its contents, maintaining strict boundaries on synchronous and asynchronous communication, much like the hypothetical brain’s isolated and controlled environment. For more details, see the Wikipedia page on [Brain in a Vat](https://en.wikipedia.org/wiki/Brain_in_a_vat). -# Vow +## Vow Vows are objects that represent promises that can be stored durably. Native promises are not compatible with Agoric's durable stores, which means that on the Agoric platform, such promises disconnect their clients when their creator vat is upgraded. From 8bc8644b3d8f1d680d00964bf142258e64c4119c Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Mon, 29 Jul 2024 11:57:01 +0500 Subject: [PATCH 5/6] fix: typo in glossary --- main/glossary/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/glossary/index.md b/main/glossary/index.md index 93558ebec..3f25dddd0 100644 --- a/main/glossary/index.md +++ b/main/glossary/index.md @@ -587,7 +587,7 @@ the [UserSeat documentation](/reference/zoe-api/user-seat). ## Semi-fungible A semi-fungible asset is one that has distinct forms which are not interchangeable -with each other, but in which instances of a single form may interchangeable with +with each other, but in which instances of a single form may be interchangeable with other instances of the same form. As a variation on the [non-fungible](#non-fungible) theater ticket example, tickets might specify only a section, where the holder may sit in any seat of that section. From 6b8d28218cc7cfd389aadfff28210edd6263729b Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir <53943791+amessbee@users.noreply.github.com> Date: Mon, 29 Jul 2024 19:45:22 +0500 Subject: [PATCH 6/6] Update main/glossary/index.md Co-authored-by: Dan Connolly --- main/glossary/index.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/main/glossary/index.md b/main/glossary/index.md index 3f25dddd0..49b90de02 100644 --- a/main/glossary/index.md +++ b/main/glossary/index.md @@ -605,20 +605,7 @@ An imaginary currency Agoric documentation uses in examples. ## Smart Contract A smart contract is a contract-​like arrangement expressed in code, where the behavior of the -program enforces the terms of the contract. Smart contracts are able to solve some of the -fundamental social problems that have traditionally been solved by legal contracts. For example, -commerce often involves an exchange of one thing for another. However, the party that transfers -their assets first leaves themselves vulnerable to the other party’s opportunism: the second party -can simply walk away from the exchange with both parties’ assets. - -Smart contracts solve this problem of opportunism during an exchange by providing an -[escrow mechanism](#escrow) for the assets from both parties, only dispersing the assets after both -parties have contributed. There is no need for a human intermediary to perform the escrow; the smart -contract itself holds the assets. Because the behavior of the smart contract is fully described by -its code, and that code runs on a decentralized blockchain with high integrity execution, the -parties can be assured that the code describes exactly what will happen. As such, smart contracts -hold the promise of being a market-​based solution for the opportunism problem that does not rely on -State intervention. +program enforces the terms of the contract. In the context of the Agoric blockchain, smart contracts are written using JavaScript and leverage Agoric's [secure environment](#offer-safety) to build and deploy reliable decentralized applications.