tokenized-carbon-credit-marketplace
tokenized-carbon-credit-marketplace copied to clipboard
Tokenized-Carbon Credit Marketplace☘️ (on Polygon/Matic)
Tokenized-Carbon Credit Marketplace (on Polygon/Matic)
【Introduction of the Tokenized-Carbon Credit Marketplace (on Polygon/Matic)】
- This is a smart contract and dApp that is the Tokenized-Carbon Credit Marketplace which allow to be able to claim, audit, buy/sell carbon credits in a single platform. (for incentivize and accelerating the CO2 emission reduction)
- By that whole process is executed on this platform, it is able to keep
transparency
andtraceability
. - The
Carbon Credit Tokens (CCTs)
are used for representing amount of carbon credits. (The Carbon Credit Tokens is created as ERC20 token) -
Green NFT
is used for aproof of audit
of CO2 reductions for a project - This smart contract is deployed on
Polygon
(previouslyMatic Network
) in order to save cost of transaction and realize faster transactions.
- By that whole process is executed on this platform, it is able to keep
【Workflow】
-
① A project owner (e.g. organizations, corporations, etc...) register themself on this dApp.
-
② A auditor (e.g. the institutions to issue carbon credit) is registered on this dApp.
- Only admin (deployer of smart contracts) can register a auditor.
-
③ A project owner claim CO2 reductions to a auditor.
-
④ Auditor audit (=approve) a claim from a project owner.
- Once a claim is audited, the
Green NFT
and the Carbon Credit Tokens (CCTs) are given (=charged) into a project owner's wallet. - A
Green NFT
represents aproof of audit
of CO2 reductions for a project that is claimed. - Given-Carbon Credit Tokens (CCTs) are same amount with audited-amount of CO2 reductions.
- Once a claim is audited, the
-
⑤ A project owner put a Green NFT (=proof of audit) and the Carbon Credit Tokens (CCTs) on sale.
-
⑥ A buyer can buy the Carbon Credit Tokens (CCTs) based on GreenNFT in the carbon credit marketplace.
- Once buying process is successful, CCTs that are bought by a buyer will be transferred into a buyer's wallet. (※ At that time, a Green NFT is not transferred. A Green NFT is kept in the project owner's wallet as a proof of audit)
- That buyer can sell CCTs bought in the marketplace as secondary sales.
- Price rate of the Carbon Credit Tokens (CCTs) is
1 CCT = 1 MATIC
【Demo Video】
- https://youtu.be/LiMHJL8H2oA
【Versions】
- Versions are following below:
- Solidity (Solc): v0.6.12
- Truffle: v5.1.60
- web3.js: v1.2.9
- openzeppelin-solidity: v3.4.1
- ganache-cli: v6.9.1 (ganache-core: 2.10.2)
- Node.js: v11.15.0
【Setup】
Setup private network by using Ganache-CLI
-
Download Ganache-CLI from link below
https://www.trufflesuite.com/ganache -
Execute Ganache
$ ganache-cli -d
※ -d
option is the option in order to be able to use same address on Ganache-CLI every time.
Setup wallet by using Metamask
-
Add MetaMask to browser (Chrome or FireFox or Opera or Brave)
https://metamask.io/ -
Adjust appropriate newwork below (In case of deploying smart contract on local)
http://127.0.0.1:8545
- Adjust appropriate newwork below (In case of deploying smart contract on Polygon's Mumbai testnet)
https://rpc-mumbai.maticvigil.com/
(More configuration detail is here: https://docs.matic.network/docs/develop/metamask/config-matic/ )
Setup backend
- In case of deploying smart contracts on local
$ npm run migrate:local
- In case of deploying smart contract on
Matic's Mumbai testnet
$ npm run migrate:polygon_testnet
Setup frontend
- NPM modules install
$ cd frontend
$ npm install
- Execute command below in root directory.
$ npm run start
- Access to browser by using link
http://127.0.0.1:3000
【References】
- Polygon (Previously Matic)
-
Mumbai testnet (with Truffle) https://docs.matic.network/docs/develop/truffle
-
Matic Fancet (include for Mumbai testnet) https://faucet.matic.network/
-
Set up MetaMask for Mumbai testnet:
https://docs.matic.network/docs/develop/metamask/config-matic/ -
Workshop https://youtu.be/BT-UZBInh7w?t=697
-
Deposit ETH into Matic https://docs.matic.network/docs/develop/ethereum-matic/plasma/eth
-