Smart contract

honggarae 22/04/2022 737

Introductiontotheterm

Theterm"Smartcontract"canbetracedbacktoatleast1995andwasproposedbytheprolificcross-fieldlegalscholarNickSzaboof.Hementionedtheconceptofsmartcontractsinseveralarticlespublishedonhiswebsite,whicharedefinedasfollows:

"Asmartcontractisasetofcommitmentsdefinedindigitalform,includingcontractparticipantsThesepromisedagreementscanbeexecutedonit."

Digitalform

Thedigitalformmeansthatthecontracthastobewrittenintocomputer-readablecode.Thisisnecessarybecauseaslongastheparticipantsreachanagreement,therightsandobligationsestablishedbythesmartcontractareexecutedbyacomputerorcomputernetwork.

Furtherexplanation:

(1)Agreement

Whenwilltheparticipantsofthesmartcontractreachanagreement?Theanswerdependsonthespecificsmartcontractimplementation.Generallyspeaking,whenaparticipantcommitstotheexecutionofthecontractbyinstallingthecontractonthecontracthostplatform,thecontractisdiscovered.

(2)Contractexecution

Thetruemeaningof"execution"alsodependsonimplementation.Generallyspeaking,implementationmeansactiveimplementationthroughtechnicalmeans.

(3)Computer-readablecode

Inaddition,thespecific"digitalform"requiredbythecontractisverydependentontheagreementthattheparticipantsagreetouse.

Agreement

Agreementisatechnicalimplementation(technicalimplementation),onthisbasis,contractpromisesarerealized,orcontractpromisesarerecorded.Whichagreementtochoosedependsonmanyfactors,themostimportantfactoristhenatureoftheassetbeingtradedduringtheexecutionofthecontract.

Takethesalescontractasanexampleagain.AssumethattheparticipantsagreetopayforthegoodsinBitcoin.TheprotocolchosenwillobviouslybetheBitcoinprotocol,onwhichsmartcontractsareimplemented.Therefore,the"digitalform"thatthecontractmustuseistheBitcoinscriptinglanguage.Bitcoinscriptinglanguageisanon-Turingcomplete,imperative,stack-basedprogramminglanguage,similartoForth.

Securityissues

Smartcontractsare"computertransactionagreementsthatenforcecontractterms."Allusersontheblockchaincanseesmartcontractsbasedontheblockchain.However,thiswillcauseallvulnerabilities,includingsecurityvulnerabilities,tobevisibleandmaynotbeabletoberepairedquickly.

Suchattacksaredifficulttosolvequickly.Forexample,thevulnerabilityofTheDAOEtherinJune2016causedalossof50millionUSdollars,andthedeveloperstriedtoreachaconsensussolution.TheDAOprogramhasadelaybeforethehackerdeletesthefunds.AhardforkoftheEthereumsoftwarecompletedtheattacker'sfundrecoveryworkbeforethetimelimitexpired.

TheproblemsinEthereumsmartcontractsincludecontractprogrammingSolidity,compilererrors,Ethereumvirtualmachineerrors,attacksontheblockchainnetwork,immutabilityofprogramerrors,andotherundocumentedattacks.

Cases

Casesfordeployingsmartcontractsinclude:

  • EthereumhasimplementedakindofnearTuringonitsblockchainCompletelanguage,thisisanoutstandingsmartcontractframework.Smart contract

  • RootStock(RSK)isasmartcontractplatformconnectedtotheBitcoinblockchainthroughsidechaintechnology.RSKiscompatiblewiththesmartcontractcreatedforEthereum.

Popculture

KarlSchroeder’s2002novel"Permanence"proposesa"righteconomy"inwhichallphysicalobjectshavecontractsNanomarksarerequiredsothatpaymentscanbeimplementedforallusesofproprietaryinformation.Forexample,deep-spacemilitarymissionsmustcontinuouslyprovethebenefitratioofeachshiportheywillstopworking.

See

  • Blockchain

  • Bitcoin

  • Securemulti-partycomputing

  • Consensusmechanism

Latest: Registration error

Next: Socialist Market Economy