Incentivising Performance
function submitProof(uint256 farmId, uint256 performanceScore) external nonReentrant {
require(registeredVerifiers[msg.sender], "Not a registered verifier");
require(farmApprovedVerifiers[farmId][msg.sender], "Verifier not approved for this farm");
require(performanceScore > 0, "Invalid performance score");
emit ProofSubmitted(msg.sender, farmId, performanceScore);
uint256 totalIncentives = performanceScore; // Simplified incentive calculation.
dxpToken.emitTokens();
emit IncentivesDistributed(totalIncentives);
}Last updated