Skip go main kontent

Last taim wey dem update dis page: 7 Mach 2024

Introdukshon to smart kontracts

Smart kontracts na di buildin blocks wey Ethereum aplikashon layer dey sidon. Dem bi komputa programs weyd em store on di wey follow "if dis den sey" logik, and dey guarantee to do akordin to di rules wey dem don define by im kode, wey nor fit shanj wons dem don kreate am.

Na Nick Szabo give am di name "smart kontract". In 1994, e write abou introdukshon to wetin smart kontracts bi and hau e go dey work(opens in a new tab)and in 1996 e write abou wetin smart kontracts fit do(opens in a new tab).

Szabo don see one digital marketplace wia automatik, processes make transakshons and biznes funshon to dey hapun witout any nid for any middol man wey dem trust. Smart kontracts on Ethereum dey praktis dis vishon.

Make yu watch hau Finematiks dey eksplain smart kontracts:

Trust in konvenshonal kontracts

One of di palava wey big pass wit one tradishinal kontract na di nid for individual wey dem trust to follow thru wit di kontract outkomes.

One eksampol dey hia:

Alice and Bob wan do bicycle race. Make wi say Alice dey yus $10 wey e go yus win di race. Bob dey konfident sey e go win di race and agree to di bet. In di end, Alice dey finish di race well ahead of Bob and na di klear winna. But Bob rifuse to dey pay out on di bet, dey klaim sey Alice suppose don cheat.

Na dis kind silly eksampol we fit yus do ekampol for di palava wey nor smart. Even if dem don meet di kondishons (i.e. yu bi di winna of di race), yu suppose still trust anoda pesin to fulfill di agreement (i.e. payout on di bet).

One digital vending machine

One simpol metafor for one smart kontract na one vending machine, wey dey work di same to one smart kontract - spesifik inputs guarantee preditamine outputs.

  • Make yu select one product
  • Di vending machine dey display di price.
  • Make yu pay di price
  • Di vending machine dey sheck dat yu don pay di koret amount
  • Di vending machine dey give yu yur item

Di vending machine go only give yur product wey yu wont afta yu don meet all di rikwayament. If yu nor selet one product abi out enuf monie, di vending machine nor go give yu yur product.

Na automatik exekushon

Di main benefit of smart kontract bi sey im run big-big kode wen im don meet satain kondishons. Nor nid to dey wait for human to interpret abi negoshiate di rizut. Dis dey rimuv di nid for intamidiaris wey dem trust.

For eksampol, yu fit write one smart kontract dey dey hold funds in escrow for one pikin, dey allow dem witdraw funds afta one spesifik date. If dem dey try witdraw bifor dat date, di smart kontract nor go run. Abi yu fit write one kontract wey dey automatikaly give yu gijita vashon of car titol wen yu pay di dealer.

Outkome wey yu fit predit

Tradishonal kontracts dey big wella bikos dem dey rely on human to interpret and do dem. For eksampol, tw judges fit interpret one kontract for difren ways, wich fit lead to disishon wey nor konsistent and outkomes wey nor dey ekwol. Smart kontracts dey rimuv dis posibility. Insted, smart kontracts dey run koret base on di kondishons wey dem write within di kontract kode. Dis presishin mean sey as di situashon bi, di smart kontract go produs di same rizut.

Rekod wey dey publik

Smart kontracts dey yusful fir audits and to dey track. Sinse Ethereum smart kontract dey for publik blockchain, anyone fit track asset transfer instanata and oda info wey rilate to am. Foe eksampol, yu fit shek to see sey someone don send monie to yur address.

Privacy protekshon

Smart kontract dey also protet yur privacy. Sinse Ethereum na one pseudonymous netwok (yur transakshons dey tie publikly to one unik cryptogrhik address, nor bi yur identity), yu fit protet yur privacy from pipol wey dey obsarve.

Terms wey dey visibol

Las las, like tradishonal kontracts, yu fit shek wetin dey smart kontract bifor yu sign am (abi odawise interact wit am). Smart kontract transparensy make sure sey anyone fit verify am.

Tins wey we fit yus smart kontracts do

Smart kontracts fit do almost anytin wey komputa fit do.

Dem fit pafom komputashons, kreate kurrensy, store data, mint , send komunikashons and even generate graphics. Here bi some popular, real world eksampol:

  • Stabolcoins
  • To dey kreate and dey distribute unik dijital assets
  • One automatik, open kurensy ekshanj
  • Decentralized gaming
  • Insurans policy wey go dey pay out automatikaly(opens in a new tab)
  • One standard wey dey allow pipol kreate kustomized, interopabol kurensis

Further reading

Shey dis artikol dey helep?