Skip to content

Latest commit

 

History

History

docs

Nori Smart Contracts

Nori's core product is the Nori Removal Tonne (NRT). NRTs can be understood as carbon removal credits that are granted to a supplier for the CO2 they have removed from the atmosphere via regenerative agriculture. For each tonne of carbon removed, a supplier is granted 1 NRT. Suppliers then consign their NRTs to Nori's marketplace, effectively listing them for sale at a fixed amount of USDC.

If a supplier is found to have released the sequestered carbon the corresponding Removals will be burned and funds from the insurance reserve used to replace them making the Certificate and buyer whole. Automating the replacement of those burned Removals is on the future roadmap but is not implemented here.

When NRTs are purchased, the buyer is minted a non-transferrable Certificate (NCCR) and the NRTs purchased are transferred to the ownership of the Certificate, ultimately retiring the NRTs.

During the purchase lifecycle, Nori collects a configurable marketplace fee (currently 25%) from each transaction.

Contracts Overview

Marketplace Contracts

An ERC1155 compatible NFT which represents NRTs (carbon removal credits) issued to a supplier.

Each token ID encodes the wallet address of the supplier to which the NRTs were issued in addition to information about the source and location of the carbon removed. See RemovalIdLib for details.

The total supply of each Removal token ID represents the amount of NRTs granted for a specific parcel of land in a specific year.

Lifecycle of a Removal:

  1. Minted to supplier's wallet address.
  2. Transferred to the Market contract to be listed for sale. Often in the scope of the minting transaction.
  3. Sold by the Market and transferred to the Certificate contract with internal bookkeeping mapping ownership of removal token balances to specific certificate tokens.
  4. Possibly burned or partially burned if the carbon is released -- i.e., supplier fails to uphold their contractual obligation to keep the underlying carbon sequestered for the duration of their contract.

An ERC721a compatible NFT representing a carbon removal buyer's proof of purchase.

Every purchase in the market mints a new Certificate token with a unique ID. The Certificate contract is configured as an ERC1155 recipient to receive the purchased Removal tokens.

Every Certificate NFT is non-transferable. It is a fundamental tenet of the Nori market design that removals and their certificates cannot change hands after the purchase transaction.

Each Certificate's has a balance of underlying removals which may fall below the original amount it was minted with if its underlying NRTs were released. Those released NRTs will be replaced by sending additional NRTs to the certificate.

Note Automated replacement of burned NRTs is out of scope in this iteration of the contracts.

The core swap market contract of the Nori platform. Removals are listed for sale by sending them to this contract using the consign function.

Swap mechanism

The swap function is the primary point of interaction with the market for buyers. Calls to the swap function include an amount of NRTs to purchase and a recipient wallet address to which the Certificate is minted. These calls also include a pre-signed authorization to transfer the corresponding amount (including fees) of the supported ERC20 (USDC or BridgedPolygonNORI) following the ERC20Permit pattern. Alternatively, the buyer can pre-approve the Market contract as a spender of the corresponding ERC20 and use the version of swap that does not require permit arguments. Note that this previously public endpoint now requires buyers to have the SWAP_ALLOWLIST_ROLE to comply with sanctions laws and regulations.

The ERC20 tokens transferred from the buyer to this contract are distributed as follows:

  • A configurable market fee percentage to Nori's fee wallet (currently 25%).
  • The balance of the proceeds of the sale are forwarded to the supplier(s) address.
Withdrawal Mechanism

An unsold Removal can be withdrawn from the market (delisted for sale) by the owner as encoded in the Removal ID or by an appropriately permissioned operator address. It may later be re-listed for sale.

Priority Supply Mechanism

The market may be configured with a priority supply threshold. When supply listed for sale drops below this threshold purchases are restricted to addresses having the PRIORITY_ALLOWLIST_ROLE role. This mechanism gives Nori the ability to reserve supply for pre-committed partnerships or other off-chain arrangements.

Support Libraries

A preset contract that enables pausable access control.

Array utility functions for uint256[].

Array utility functions for address[].

An ERC20 token preset contract with ERC2612 permit functionality.

Custom errors shared across multiple contracts.

The schedule logic for multiple cliffs followed by linear unlock used by the LockedNORIV2 contract. The vesting behavior and the unlocking behavior of each grant are each implemented using a schedule from this library.

The logic for encoding and decoding removal IDs, which contain information about the origin of the carbon removal.

The queuing mechanism used by the Market contract to maintain an ordered list of Removal tokens by year listed for sale on behalf of a given supplier.

Deprecated

ERC777PresetPausablePermissioned

An ERC777 token preset contract.

Supported Networks

See contracts.json for a comprehensive list of all contracts deployed to each network.

Upgradeability

Contracts in this repo use the OpenZeppelin Upgrades Plugin to manage upgradeability.

Audits

See here for the latest audit reports.

Contracts for the Future

ERC20 Tokens

The NORI token is Nori's fungible token which functions as a gift card to purchase NRTs. One NRT is worth one $NORI. The marketplace is configurable with respect to which ERC20 token it is willing to accept as payment. The initial launch of the market will be configured to receive USDC, with the intention of switching to receive NORI once that token is launched publicly with sufficient liquidity.

When a supplier's listed NRTs are sold, the supplier gets paid in NORI tokens at a constant rate of 1 NRT per 1 NORI token (an ERC20 compatible token on the Polygon blockchain). This mechanism is designed to enable price discovery for carbon removal.

  • Deployed on: Ethereum mainnet.
  • Initial supply minted at deployment: 500M.
  • Minting is disabled.

NORI on Etherscan

BridgedPolygonNORI is the $NORI token bridged to Polygon PoS.

  • Polygon child chain mapper is the only contract with mint / burn permission (DEPOSITOR_ROLE).
  • Initially deployed with a total supply of zero.

BridgedPolygonNORI on PolygonScan.

Vesting and Lockup

A contract managing investor and employee timed vesting and unlocking contract.

V2 of this contract was updated to support the new ERC20Permit pattern with BridgedPolygonNORI and to remove reliance on the ERC777 tokensReceived callback. A setter was added to allow us to replace the underlying wrapper token contract with the newer ERC20Permit version of BridgedPolygonNORI.

Note Investors and employees have received NORI token grants bound by vesting and lockup terms. These grants are implemented by LockedNORI which does not currently support transfer of locked tokens and allows a maximum of one grant schedule per wallet address.

LockedNORI on PolygonScan