Skip to main content

RegenerationCreditImpact

RegenerationCreditImpact

This contract is responsible for calculating the system impact and also the impact per token. The community impact backs the Regeneration Credit, it is the foundation of the System.

Manages and calculates Regeneration Credit system impact.

CARBON_PER_TREE

uint256 CARBON_PER_TREE

[g] This constant estimates an average carbon sequestration of 100000g (or 100kg) per tree, palm tree and other plants with over 3cm in diameter and 1 meter high recorded by inspectors. In practice, it is not so simple to make this relationship, as the actual amount of carbon sequestered will vary from species to species, from biome to biome, from soil to soil, from management to management and from each geolocation. However, we need to standardize this value to simplify and allow the decentralized certification system to occur. This result was obtained by estimating that, on average, each tree/plant sequesters 10 kg of carbon per year, living an average of 10 years. With the result expressed in grams [g].

regenerationCredit

contract IRegenerationCredit regenerationCredit

Interface to the RegenerationCredit contract.

inspectionRules

contract IInspectionRules inspectionRules

Interface to the InspectionRules contract.

regeneratorRules

contract IRegeneratorRules regeneratorRules

Interface to the RegeneratorRules contract.

constructor

constructor(address regenerationCreditAddress, address inspectionRulesAddress, address regeneratorRulesAddress) public

Initializes the RegenerationCreditImpact contract with addresses of necessary external contracts.

This constructor links to core system contracts required for impact calculations.

Parameters

NameTypeDescription
regenerationCreditAddressaddressAddress of the RegenerationCredit token contract.
inspectionRulesAddressaddressAddress of the InspectionRules contract.
regeneratorRulesAddressaddressAddress of the RegeneratorRules contract.

totalTreesImpact

function totalTreesImpact() public view returns (uint256)

Calculates the total trees of the system.

This function uses data from inspections and regenerator impact to estimate total trees.

Return Values

NameTypeDescription
[0]uint256uint256 Amount of trees.

totalCarbonImpact

function totalCarbonImpact() public view returns (uint256)

Calculates the total carbon impact of the system.

Converts the total trees impact into estimated grams of carbon sequestered.

Return Values

NameTypeDescription
[0]uint256uint256 Grams of carbon [g].

totalBiodiversityImpact

function totalBiodiversityImpact() public view returns (uint256)

Calculates the total biodiversity impact of the system.

This function uses data from inspections and regenerator impact to estimate total biodiversity species registered.

Return Values

NameTypeDescription
[0]uint256uint256 Total amount of species.

totalAreaImpact

function totalAreaImpact() public view returns (uint256)

Calculates the total area in regeneration proccess of the system.

This directly returns the total regeneration area reported by regenerators.

Return Values

NameTypeDescription
[0]uint256uint256 Area under regeneration [m²].

treesPerToken

function treesPerToken() external view returns (uint256)

Calculates the trees impact per Regeneration Credit. The effectiveSupply is the sum of currently circulating tokens (total supply minus locked) AND all tokens that have ever been burned (certified). This provides an impact metric based on all tokens that have contributed to or represent impact, whether currently in circulation or already consumed.

The result is a fixed-point number with 18 decimals of precision. It can be formatted in a frontend using standard libraries (e.g., ethers.utils.formatUnits(result, 18)).

Return Values

NameTypeDescription
[0]uint256uint256 Trees per token (with 18-decimal precision).

carbonPerToken

function carbonPerToken() external view returns (uint256)

Calculates the carbon impact per Regeneration Credit. The effectiveSupply is the sum of currently circulating tokens (total supply minus locked) AND all tokens that have ever been burned (certified). This provides an impact metric based on all tokens that have contributed to or represent impact, whether currently in circulation or already consumed.

The result is a fixed-point number with 18 decimals of precision. It can be formatted in a frontend using standard libraries (e.g., ethers.utils.formatUnits(result, 18)).

Return Values

NameTypeDescription
[0]uint256uint256 Grams of carbon per token (with 18-decimal precision).

biodiversityPerToken

function biodiversityPerToken() external view returns (uint256)

Calculates the biodiversity impact per Regeneration Credit. The effectiveSupply is the sum of currently circulating tokens (total supply minus locked) AND all tokens that have ever been burned (certified). This provides an impact metric based on all tokens that have contributed to or represent impact, whether currently in circulation or already consumed.

The result is a fixed-point number with 18 decimals of precision. It can be formatted in a frontend using standard libraries (e.g., ethers.utils.formatUnits(result, 18)).

Return Values

NameTypeDescription
[0]uint256uint256 Amount of species per token (with 18-decimal precision).

areaPerToken

function areaPerToken() external view returns (uint256)

Calculates the area impact per Regeneration Credit. The effectiveSupply is the sum of currently circulating tokens (total supply minus locked) AND all tokens that have ever been burned (certified). This provides an impact metric based on all tokens that have contributed to or represent impact, whether currently in circulation or already consumed.

The result is a fixed-point number with 18 decimals of precision. It can be formatted in a frontend using standard libraries (e.g., ethers.utils.formatUnits(result, 18)).

Return Values

NameTypeDescription
[0]uint256uint256 Area [m²] per token (with 18-decimal precision).