top | item 33209980

(no title)

JamJomJim | 3 years ago

Smart contracts are just pieces of code that run on "the blockchain". They can be pretty much anything: currency-like tokens, NFTs, marketplaces like opensea, exchanges like uniswap, etc.

Once they're uploaded to the blockchain, they're there permanently. That's really scary, because it's very difficult to write complicated code without bugs. When smart contracts have bugs, you can have massive hacks where literally billions of dollars are stolen.

Because the consequences are so high, people end up paying developers a ludicrous amount of money to write and deploy (i.e. upload to the blockchain) these contracts. A lot of projects also pay auditors thousands to read/review the smart contract code. This is pretty wasteful, because most contracts end up being the exact same thing: I'm making it up, but probably 80% of the code on ethereum is for NFTs.

This site seems to be aggregating all of the most common contracts and audits so people can reuse code that has already been approved.

discuss

order

tysehr37|3 years ago

This is exactly it. The way to think about it is that smart contracts are effectively server-side code that is specialized to run on blockchains. They use many of the same building blocks and can often be reused. When I want to build Auth in Nodejs, I might use Passport.js, and I often use Express.js. Often I'll use mongoose.js as well. That's effectively what we're providing with cookbook, a way to find and utilize solidity packages created by the community.

jrmg|3 years ago

Thanks - great explanation.

Smart contracts on blockchain scare me, because I just don’t think humans are capable of writing (or auditing!) perfect code.