Skip to content

Latest commit

 

History

History
169 lines (91 loc) · 10.5 KB

README.md

File metadata and controls

169 lines (91 loc) · 10.5 KB

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. 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 rate of 1 NRT per 1 NORI token (an ERC20 compatible token on the Polygon blockchain).

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

Furthermore, when NRTs are sold, a percentage of the supplier's proceeds of each swap is held in an insurance reserve and released linearly over the supplier's ten-year contract with Nori. RestrictedNORI implements this restriction and scheduled release mechanism within a transferable ERC1155 compatible token contract2.

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 15%) from each transaction3.

Contracts Overview

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.

  • 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.

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 supported ERC20 tokens (USDC or BridgedPolygonNORI) to spend and a recipient wallet address to which the Certificate is minted. These calls also include a pre-signed authorization to transfer the corresponding amount of the supported ERC20 following the ERC20Permit pattern.

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 15%).
  • If the supported ERC20 is NORI, a configurable percentage of the sale proceeds due to the supplier(s) are forwarded to the RestrictedNORI contract to be withheld for insurance purposes and released over the life of their NRT agreement(s). (Configured on each Removal).
  • 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 ALLOWLIST_ROLE role. This mechanism gives Nori the ability to reserve supply for pre-committed partnerships or other off-chain arrangements.

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

A contract managing supplier insurance holdbacks.

Operates similarly to LockedNORI by acting as a wrapper token that governs the scheduled release of the underlying BridgedPolygonNori asset. Implemented as an ERC1155, each token ID has its own schedule parameters that control the linear release of the underlying assets over the duration of the schedule. It is possible to create more than one schedule per owner address and also to transfer full or partial restricted balances between addresses.

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.

The schedule logic used in RestrictedNORI.

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

  • Macro audited AccessPresetPausable, ArrayLib, BridgedPolygonNORI, Certificate, ERC20Preset, Errors, LockedNORI, LockedNORILib, Market, NORI, Removal, RemovalIdLib, RemovalsByYearLib, RestrictedNORI, and RestrictedNORILib in December of 2022.

  • Omniscia audited NORI, BridgedPolygonNORI and LockedNORI in March of 2022.

Footnotes

  1. Initially, suppliers will be paid in USDC at a price set by Nori instead of at a rate of 1 NORI per 1 NRT.

  2. Initially, RestrictedNORI is non-transferrable.

  3. This mechanism will be enabled once the marketplace is configured to receive NORI as payment instead of USDC.