Smart Contracts

แปลโดย : Claude 3 Opus (Pro)

Smart Contracts

Perhaps more than anyone else, Szabo was very aware that in order to realize May’s vision of crypto-anarchy, private communication was merely a first step.

As a student of Hayek’s work—including the Austrian’s later, more political writings—the Cypherpunk had come to understand that prosperous societies had done so well because they’d adopted certain rules, in the form of laws, that regulated human behavior. Likening it to the layered design of computer protocols, Szabo recognized that the laws that formed the bedrock of society (like constitutional laws) were the most basic, but also the most important rules of all. All other rules are based on this foundation.

Szabo found that two of the fundamental building blocks in the “base layer” of any prosperous society were—indeed—property rights and contract law. Property rights facilitate and incentivize investment, production, and expansion, while contract law enables trade and specialization. He believed that a society that enforces property rights and contract law can ultimately evolve into a modern capitalist society.

But property rights and contract law are in modern capitalist societies enforced by the state, Szabo knew. Ownership, and the change of ownership, is ultimately enforced by courts and police leveraging the state’s monopoly on violence, either implicitly through (the threat of) fines or jail time or explicitly by protecting or returning someone’s property by force.

To create a stateless and nonviolent cyberspace economy, Szabo therefore concluded, crypto-anarchists would have to first lay a new foundation.

The first part of this foundation—property rights—could be realized with public key cryptography, as extensively explained by Tim May; personal data would be secured with math instead of physical force.

But it was not immediately clear how two people could trade this data without counterparty risk. One party in the trade would always have to send their data or otherwise finalize their part of the deal first, at which point their counterparty could disappear and default on its obligation. In cyberspace, there were no courts or police to enforce contract law.

One potential solution was to use arbitration for settling disputes, where an arbitrator would be given the means to transfer the data in question from one of the trading partners to the other (either at its own discretion, or perhaps in cooperation with either one of the trading partners). This would, however, require that both parties trust the arbitrator not to steal, or collude with their counterparty. This trust could, perhaps, be established through reputation over time: an arbitrator’s spotless record of past behavior could in a way serve as a viable alternative to state enforcement—even if it would never be completely risk-free.

But by the mid-1990s, Szabo believed he had a better idea. He envisioned a solution that could not be cheated by either trading party, and required no trusted arbitrator. Szabo proposed smart contracts—digital contracts that would autonomously enforce their own terms, as embedded in computer code.

As a simple example, let’s say Alice wants to buy a secret number from Bob for $10. A smart contract could then be programmed so that as soon as Bob enters the secret number in some agreed-upon spot where Alice can find it (perhaps by adding it to the contract itself, not unlike a digital signature), the contract’s code would recognize and verify this, to then automatically withdraw $10 from Alice’s account and transfer it to Bob. (Szabo used a vending machine as a primitive analogy: the “contract” between a consumer and a vending machine says that if the consumer inserts a coin, the machine—through an automated response—dispenses a can of soda or a candy bar, without any further human involvement.)

Smart contracts could in theory be made arbitrarily complex, and they could in principle embed all kinds of contractual clauses, including liens, bonds, or delineation of property rights. This would even enable whole new business arrangements, Szabo suggested, offering the example of a smart contract for a car loan that would, upon failure to repay the loan, automatically return control of the digital car keys to the bank.

Most properties and features that a smart contract should contain could be implemented by drawing from the ever-growing Cypherpunks toolkit, Szabo believed: “Protocols based on mathematics, called cryptographic protocols, are the basic building blocks that implement the improved tradeoffs between observability, verifiability, privity, and enforceability in smart contracts,” he wrote.

The biggest challenge, however, was to make sure that the contract would be executed automatically, reliably, and unconditionally. Most obviously, this meant that none of the parties to the contract should be responsible for its execution.

As a general starting point, Szabo suspected that the best solution was to be found in the realm of distributed computing, where participating computers had to follow strict protocols to stay in consensus with each other. Although the Byzantine Generals Problem (the coordination problem that Adam Back learned about in university) indeed hadn’t been solved completely—some risks remained if there were too many unreliable participants—he believed that robust enough protocols had been designed for most scenarios.

“The terms of contractual relationships can often be formalized and standardized, and then performed via network-based protocols,” Szabo explained on the Cypherpunks mailing list. “These protocols, along with economic incentives, protect the performance of the contract from both fraud by the principals and attack from third parties.”

That said, most smart contracts would presumably also require a form of money: at least one of the parties involved usually has to make a payment as their part of the deal. Furthermore, this had to be a type of currency that could be transferred across the internet, and that could be sent autonomously by a computer program . . . ideally anonymously.

Smart contracts required electronic cash.

สัญญาอัจฉริยะ

บางที Szabo อาจตระหนักมากกว่าใครๆ ว่าในการทำให้วิสัยทัศน์เรื่องอนาธิปไตยเข้ารหัสลับของ May เป็นจริง การสื่อสารแบบส่วนตัวเป็นเพียงก้าวแรกเท่านั้น

ในฐานะผู้ศึกษาผลงานของ Hayek รวมถึงงานเขียนทางการเมืองในช่วงหลังของนักคิดชาวออสเตรีย Cypherpunk ผู้นี้เข้าใจว่าสังคมที่เจริญรุ่งเรืองนั้นทำได้ดีเพราะพวกเขายอมรับกฎเกณฑ์บางอย่าง ในรูปแบบของกฎหมาย ซึ่งควบคุมพฤติกรรมของมนุษย์ เปรียบได้กับการออกแบบโพรโทคอลคอมพิวเตอร์แบบเป็นชั้นๆ Szabo ตระหนักว่ากฎหมายที่เป็นรากฐานของสังคม (เช่น กฎหมายรัฐธรรมนูญ) นั้นเป็นกฎพื้นฐานที่สุด แต่ก็เป็นกฎที่สำคัญที่สุด กฎอื่นๆ ทั้งหมดตั้งอยู่บนรากฐานนี้

Szabo พบว่าสองในองค์ประกอบพื้นฐานใน "ชั้นฐาน" ของสังคมที่เจริญรุ่งเรืองใดๆ คือสิทธิในทรัพย์สินและกฎหมายสัญญา สิทธิในทรัพย์สินอำนวยความสะดวกและสร้างแรงจูงใจในการลงทุน การผลิต และการขยายตัว ในขณะที่กฎหมายสัญญาทำให้การค้าและการแบ่งงานกันทำเป็นไปได้ เขาเชื่อว่าสังคมที่บังคับใช้สิทธิในทรัพย์สินและกฎหมายสัญญาสามารถวิวัฒนาการไปสู่สังคมทุนนิยมสมัยใหม่ได้ในที่สุด

แต่ Szabo รู้ว่าในสังคมทุนนิยมสมัยใหม่ สิทธิในทรัพย์สินและกฎหมายสัญญาถูกบังคับใช้โดยรัฐ ความเป็นเจ้าของและการเปลี่ยนแปลงความเป็นเจ้าของ ถูกบังคับใช้โดยศาลและตำรวจซึ่งใช้ประโยชน์จากการผูกขาดความรุนแรงของรัฐ ทั้งโดยนัยผ่านการปรับหรือจำคุก (การขู่เข็ญ) หรือโดยชัดแจ้งโดยการปกป้องหรือคืนทรัพย์สินของบางคนด้วยกำลัง

ดังนั้น เพื่อสร้างเศรษฐกิจไซเบอร์สเปซที่ไร้รัฐและไร้ความรุนแรง Szabo จึงสรุปว่า นักอนาธิปไตยพันธุ์ลับจะต้องวางรากฐานใหม่ก่อน

ส่วนแรกของรากฐานนี้ นั่นคือสิทธิในทรัพย์สิน สามารถทำให้เป็นจริงได้ด้วยการเข้ารหัสลับกุญแจสาธารณะ ตามที่ Tim May ได้อธิบายไว้อย่างละเอียด ข้อมูลส่วนบุคคลจะได้รับการป้องกันด้วยคณิตศาสตร์แทนกำลังกายภาพ

แต่ยังไม่มีความชัดเจนในทันทีว่าผู้คนสองคนจะแลกเปลี่ยนข้อมูลนี้โดยไม่มีความเสี่ยงจากคู่สัญญาได้อย่างไร ฝ่ายหนึ่งในการซื้อขายจะต้องส่งข้อมูลของตนหรือปิดส่วนของตนในข้อตกลงก่อนเสมอ ซึ่ง ณ จุดนั้นคู่สัญญาของพวกเขาสามารถหายตัวไปและผิดสัญญาได้ ในไซเบอร์สเปซ ไม่มีศาลหรือตำรวจที่จะบังคับใช้กฎหมายสัญญา

หนึ่งในวิธีแก้ปัญหาที่เป็นไปได้คือการใช้อนุญาโตตุลาการเพื่อยุติข้อพิพาท โดยผู้ตัดสินจะได้รับเครื่องมือที่จะโอนข้อมูลที่เป็นปัญหาจากหุ้นส่วนการค้ารายหนึ่งไปยังอีกฝ่าย (ไม่ว่าจะตามดุลยพินิจของตนเองหรืออาจเป็นความร่วมมือกับคู่ค้าฝ่ายใดฝ่ายหนึ่ง) อย่างไรก็ตาม สิ่งนี้จะต้องอาศัยให้ทั้งสองฝ่ายเชื่อใจว่าผู้ตัดสินจะไม่ขโมยหรือสมรู้ร่วมคิดกับคู่สัญญาของพวกเขา ความไว้วางใจนี้อาจสร้างขึ้นได้ผ่านชื่อเสียงเมื่อเวลาผ่านไป: ประวัติพฤติกรรมในอดีตที่ไร้ที่ติของผู้ตัดสินอาจถือเป็นทางเลือกที่เป็นไปได้แทนการบังคับใช้โดยรัฐในทางหนึ่ง แม้ว่าจะไม่มีวันที่จะปราศจากความเสี่ยงอย่างสิ้นเชิงก็ตาม

แต่ในช่วงกลางทศวรรษ 1990 Szabo เชื่อว่าเขามีไอเดียที่ดีกว่า เขาวิสัยทัศน์ถึงโซลูชันที่คู่ค้าทั้งสองฝ่ายไม่สามารถโกงได้ และไม่จำเป็นต้องมีผู้ตัดสินที่ไว้วางใจ Szabo เสนอสัญญาอัจฉริยะ (smart contracts) ซึ่งเป็นสัญญาดิจิทัลที่จะบังคับใช้ข้อกำหนดของตนเองโดยอัตโนมัติ ตามที่ฝังอยู่ในรหัสคอมพิวเตอร์

ยกตัวอย่างง่ายๆ สมมติว่า Alice ต้องการซื้อตัวเลขลับจาก Bob ในราคา 10 ดอลลาร์ สัญญาอัจฉริยะสามารถเขียนโปรแกรมได้ว่า ทันทีที่ Bob ป้อนตัวเลขลับในจุดที่ตกลงกันไว้ซึ่ง Alice สามารถหาได้ (อาจโดยการเพิ่มลงในสัญญาเอง ไม่ต่างจากลายเซ็นดิจิทัล) รหัสของสัญญาจะรับรู้และตรวจสอบสิ่งนี้ แล้วถอนเงิน 10 ดอลลาร์จากบัญชีของ Alice โดยอัตโนมัติและโอนเข้าบัญชีของ Bob (Szabo ใช้เครื่องขายของอัตโนมัติเป็นการเปรียบเทียบแบบดั้งเดิม: "สัญญา" ระหว่างผู้บริโภคกับเครื่องขายของอัตโนมัติระบุว่า หากผู้บริโภคใส่เหรียญเข้าไป เครื่องจะจ่ายกระป๋องน้ำอัดลมหรือลูกอมออกมาโดยอัตโนมัติ โดยไม่ต้องมีการเกี่ยวข้องของมนุษย์อีก)

ในทางทฤษฎี สัญญาอัจฉริยะสามารถทำให้ซับซ้อนได้ตามต้องการ และโดยหลักการแล้ว สามารถรวมข้อกำหนดในสัญญาได้ทุกประเภท รวมถึงสิทธิยึดหน่วง พันธบัตร หรือการกำหนดสิทธิในทรัพย์สิน ซึ่ง Szabo แนะนำว่า สิ่งนี้จะช่วยให้เกิดข้อตกลงทางธุรกิจใหม่ๆ ได้ด้วย โดยยกตัวอย่างสัญญาอัจฉริยะสำหรับเงินกู้ซื้อรถที่จะคืนการควบคุมกุญแจรถดิจิทัลให้กับธนาคารโดยอัตโนมัติ หากไม่ชำระเงินกู้

Szabo เชื่อว่าคุณสมบัติและคุณลักษณะส่วนใหญ่ที่สัญญาอัจฉริยะควรมี สามารถดำเนินการได้โดยการดึงจากชุดเครื่องมือ Cypherpunks ที่เติบโตอย่างต่อเนื่อง: "โพรโทคอลที่อิงกับคณิตศาสตร์ที่เรียกว่าโพรโทคอลเข้ารหัสลับ เป็นส่วนประกอบพื้นฐานที่ใช้ในการปรับปรุงการแลกเปลี่ยนระหว่างความสามารถในการสังเกต การตรวจสอบ ความเป็นส่วนตัว และความสามารถในการบังคับใช้ในสัญญาอัจฉริยะ" เขาเขียน

อย่างไรก็ตาม ความท้าทายที่ใหญ่ที่สุดคือการตรวจสอบให้แน่ใจว่าสัญญาจะถูกปฏิบัติตามโดยอัตโนมัติ เชื่อถือได้ และไม่มีเงื่อนไข ซึ่งชัดเจนที่สุดว่า นี่หมายความว่าไม่ควรมีฝ่ายใดในสัญญาเป็นผู้รับผิดชอบในการปฏิบัติตามสัญญา

เป็นจุดเริ่มต้นทั่วไป Szabo สงสัยว่าวิธีแก้ปัญหาที่ดีที่สุดอยู่ในขอบเขตของคอมพิวเตอร์แบบกระจาย ซึ่งคอมพิวเตอร์ที่เข้าร่วมต้องปฏิบัติตามโพรโทคอลที่เข้มงวดเพื่อคงความสอดคล้องกันไว้ แม้ว่าปัญหาของนายพลไบแซนไทน์ (ปัญหาการประสานงานที่ Adam Back เรียนรู้ในมหาวิทยาลัย) ยังไม่ได้รับการแก้ไขอย่างสมบูรณ์ ความเสี่ยงบางอย่างยังคงอยู่หากมีผู้เข้าร่วมที่ไม่น่าเชื่อถือมากเกินไป แต่เขาเชื่อว่าโพรโทคอลที่แข็งแกร่งเพียงพอได้รับการออกแบบมาสำหรับสถานการณ์ส่วนใหญ่แล้ว

"ข้อกำหนดของความสัมพันธ์ตามสัญญามักจะสามารถทำให้เป็นทางการและทำให้เป็นมาตรฐานได้ และจากนั้นก็ดำเนินการผ่านโพรโทคอลบนเครือข่าย" Szabo อธิบายในเมลลิ่งลิสต์ Cypherpunks "โพรโทคอลเหล่านี้ ควบคู่ไปกับแรงจูงใจทางเศรษฐกิจ ปกป้องการปฏิบัติตามสัญญาจากทั้งการฉ้อโกงโดยลูกค้าหลักและการโจมตีจากบุคคลที่สาม"

อย่างไรก็ตาม สัญญาอัจฉริยะส่วนใหญ่น่าจะต้องใช้รูปแบบของเงินด้วย: อย่างน้อยหนึ่งในคู่สัญญาที่เกี่ยวข้องมักจะต้องชำระเงินเป็นส่วนหนึ่งของข้อตกลง นอกจากนี้ ต้องเป็นสกุลเงินประเภทที่สามารถโอนผ่านอินเทอร์เน็ตและสามารถส่งได้โดยอัตโนมัติโดยโปรแกรมคอมพิวเตอร์ . . . อย่างเป็นนิรนาม

สัญญาอัจฉริยะต้องการเงินสดอิเล็กทรอนิกส์

Last updated