Smart Contracts

Smart Contract Audit Badge

GITHUB LINK: CarbonPath Smart Contract

SECURITY AUDIT: Hacken Smart Contract Review & Report

Contract Types

  1. CarbonPathAdmin

  • a contract that handles different interactions with CarbonPathToken (CPCO2) and CarbonPathNFT and serves as an admin for both contracts. Users can buy CPC02 tokens and retire them for a certain well.

  1. CarbonPathNFT

  • ERC721 token that bounds to a well. Contains the geolocation of a well and additional metadata.

  1. CarbonPathToken

  • ERC20 mintable and burnable token that represents locked carbon emission.

Priviledged Roles

  1. Default Admin

  • CarbonPathAdmin: can grant and revoke minter role, set receiver of CP fee, non-profit address, buffer pool address, seller address.

  • CarbonPathToken: can grant and revoke minter role

  1. Minter

  • CarbonPathAdmin: can mint new tokens, update token URI and metadata

  • CarbonPathToken: can mint, burn tokens

  1. Owner (CarbonPathNFT Only)

  • CarbonPathNFT: can set admin address

  1. Admin (CarbonPathNFT Only)

  • CarbonPathNFT: can set metadata and URI for a specific token, mint new tokens, and increase the amount of retired CPCO2 tokens

Functions

  1. Mint

  • Mints a new well. This also attaches the geoJSON, metadata and well files to the minted well.

  • During minting, CPCO2 Tokens are airdropped to the following recipients:
    • cpFeeAddress will receive advancedAmount * cpFeePercentage of CPCO2 Tokens.

    • operatorAddress will receive advancedAmount * (100% - cpFeePercentage) of CPCO2 Tokens.

    • bufferPoolAddress will receive bufferPoolAmount * 95% of CPCO2 Tokens.

    • nonProfitAddress will receive bufferPoolAmount * 5% of CPCO2 Tokens.

  • NOTE: CarbonPath may update the metadata and well files even after the well is minted

  1. Buy

  • Buy CPCO2 Tokens from the contract

  • Current Exchange Rate is 1 CPCO2 = 30 cUSD

  1. Retire

  • Retire a CPCO2 token permanently locking the CO2.

  • It will automatically update the retire info for the chosen well.

  1. Sell

  • NOTE: FOR CARBONPATH WALLETS ONLY

  • Transfer CPCO2 tokens to the contract for selling. All tokens owned by the contract are considered sellable.

  1. Withdraw

  • NOTE: FOR CARBONPATH WALLETS ONLY

  • Withdraw stored CPCO2 Tokens from the contract and remove them as sellable