Drawbacks of a DAO:
A decentralized autonomous organization (DAO) is a group of smart contracts that are concerned with a group of people making decisions.
A major benefit of a DAO is transparency. Decisions are made publicly.
In a DAO, smart contracts are used to enforce both voting processes and treasury management.
Once a DAO is formed, requires a certain amount of votes to change anything.
DAOs utilize governance tokens issued to members to determine voting rights.
Benefits of a DAO:
An NFT burn function allows a user to permanently destroy an NFT.
Ethereum uses the ERC-721 token standard for NFT creation. This standard is represented by the ERC-721 class in OpenZepplin.
It is not possible to create an NFT directly on the Bitcoin blockchain.
NFTs are popular on the Solana blockchain because of its use of the Metaplex framework.
In blockchain, a token is considered fungible if every token is worth as much as every other token; i.e., there is only one denomination.
An NFT is comprised of:
An NFT token name is the representation of what the NFT collection is called.
An NFT token ID is an integer that uniquely identifies an NFT.
An NFT token URI is a set of data that defines a token’s traits.
An NFT mint function allows a user to create an NFT.
An NFT transfer function allows a user to transfer ownership of an NFT.
Non-Fungible Tokens (NFTs) can be thought of as records of ownership represented on the blockchain.
These records of ownership are cryptographically verified and permanently stored on the blockchain.
In gaming, smart contracts are in the form of NFTs. Gamers can purchase digital items in which they exchange money for a record of ownership of some digital item.
Smart contracts are immutable. This means they cannot be changed.
Smart contracts should be used for any piece of functionality that needs to be trustless. In other words, smart contracts should be used when we don’t want to trust a singular, central intermediary with a task.
This could be due to fears of corruption or other reasons.
A few common use cases of smart contracts are:
Decentralized Finance (DeFi) aims to use blockchain to replace a central bank with code. However, because there is no central entity to govern a DeFi blockchain, this technique is vulnerable to security issues.
Smart contracts have applications in the legal world. It is possible to encode legal documents as smart contracts.
In real estate, smart contracts can be used to store data such as the building agreement, the mortgage process, the title, the municipal record keeping, and inspections. These would be stored in the form of an NFT.
One of the pitfalls of smart contracts is a security issue known as reentrancy. Reentrancy occurs when external contract calls are allowed to make calls to the caller contract before execution finishes.
This can result in calls being allowed that should not have been allowed because the calls slipped in before a relevant execution finished.
A security issue that smart contracts face is access control. This is because all smart contracts code is publicly accessible and callable.
The three main languages used to build smart contracts are:
Solidity is a language used to write smart contracts that is object-oriented and Turing complete. The syntax is similar to JavaScript.
Clarity is a language used to write smart contracts that is decidable and Turing incomplete. It doesn’t allow looping.