{
  "tool_id": "art-608-erc2981-royalty-calculator",
  "tool_version": "1.0.0",
  "display_name": "ERC-2981 Royalty Calculator",
  "mcp_name": "calculate_erc2981_royalty",
  "mandate_type": "payment_policy",
  "wave": 99,
  "gpu": false,
  "url": "https://ainumbers.co/chaingraph/art-608-erc2981-royalty-calculator.html",
  "description": "Recomputes an ERC-2981 royalty amount as floor(sale_price * royalty_fraction_bps / 10000) -- the same integer-division convention the OpenZeppelin reference ERC2981 implementation uses -- from a caller-declared sale_price and royalty_fraction_bps, using BigInt arithmetic throughout so a sale_price beyond Number.MAX_SAFE_INTEGER never loses precision. Flags a bps value above 10000 (100%) as out of range (the value the reference implementation reverts on) while still reporting the raw recompute, and compares against an optional claimed_royalty_amount. Zero network calls: this tool never queries a contract's actual royaltyInfo() return value -- sale_price, royalty_fraction_bps, and receiver are all caller-declared. Cross-links 528-nft-metadata-validator and 521-cant-be-evil-nft-license-picker for adjacent NFT-standard surfaces (metadata shape, license terms) this tool does not cover. ERC-2981 royalty payment is a voluntary off-chain convention: this tool makes no claim that any marketplace will actually pay the computed amount.",
  "input_schema_ref": "chaingraph/art-608-erc2981-royalty-calculator.html#manifest",
  "consumes": [],
  "feeds": [],
  "status": "live",
  "conformance_fixtures": true,
  "compute_capability": "server",
  "compute_images": [{"system":"sha256-source","image_id":"sha256:c573de67d9322a020f559748f9321e33213cedf75800b73729610cbe6cec2a94","valid_from":"2026-08-11"},{"system":"risc0","image_id":"sha256:a1a0bc89b5b1febaeda3519f6dbade0fa5ac16beeb143c4e1b01689573567bc6","valid_from":"2026-08-12"}],
  "export_capability": [
    "json"
  ],
  "compute_proof": {
    "type": "ZkVmReceipt",
    "system": "risc0",
    "receiptFormat": "groth16-bn254",
    "imageId": "sha256:a1a0bc89b5b1febaeda3519f6dbade0fa5ac16beeb143c4e1b01689573567bc6",
    "seal": "IYBbgj+BwVEy5j9vR5Lg0aKmSAgidbGrKbr6NPw4FisgHi0f1Y1ZeTPsP/mOycJhYiDVhLCyEfTJZdlvo07sMRfmBl//LV8GK6L4dJILOERSySKXBTLkNdB+VW/dr3tsIXoLzt0nw9kCxAJ1cJdEhe65M6lg/DceA2aOgnKZ/QogCnyD+ZLsNa0zdbgg0GvN2qEt9gT8ty/D290dQZOiMiKgifhXpRwBYrg4udVVAuzqPMvZbmNu8k7B0L0Xzf8ICVAzIT5VSTc9znveZWxZU1hWjRJYR0lDZo7QK/PGx0MR/hqU1RZB76+YRL60AY9Fpyf5Sl46ZYZ3kyoJ+QBzrw==",
    "journal": {
      "chaingraph_version": "0.4.0",
      "kernel_digest": "sha256:c573de67d9322a020f559748f9321e33213cedf75800b73729610cbe6cec2a94",
      "output": {
        "claimed_royalty_amount": null,
        "computed_royalty_amount": null,
        "effective_royalty_pct": null,
        "findings": [
          {
            "check": "input_validation",
            "detail": "sale_price is required; royalty_fraction_bps is required",
            "verdict": "INDETERMINATE"
          }
        ],
        "not_proven": [
          {
            "detail": "This tool never calls a contract's royaltyInfo(tokenId, salePrice). sale_price and royalty_fraction_bps are caller-declared, not read from chain state.",
            "item": "On-chain royaltyInfo() response"
          },
          {
            "detail": "ERC-2981 is a voluntary signalling standard. A computed royalty amount is what the formula yields, not a guarantee any marketplace will pay it.",
            "item": "Marketplace enforcement"
          },
          {
            "detail": "Many ERC-2981 implementations allow a per-token royalty that overrides a contract default. This tool has no way to know which one governs a given tokenId -- royalty_fraction_bps is exactly what the caller declares.",
            "item": "Per-token royalty override correctness"
          }
        ],
        "overall_determination": "INDETERMINATE",
        "receiver": null,
        "related_tools": [
          {
            "relation": "Validates the token metadata JSON this royalty figure would accompany.",
            "tool_id": "528-nft-metadata-validator"
          },
          {
            "relation": "Picks the license terms a royalty-bearing NFT is minted under.",
            "tool_id": "521-cant-be-evil-nft-license-picker"
          }
        ],
        "royalty_fraction_bps": null,
        "sale_price": null,
        "scope_note": "Recomputes an ERC-2981 royalty amount as floor(sale_price * royalty_fraction_bps / 10000), the same integer-division convention the OpenZeppelin reference ERC2981 implementation uses. Zero network calls -- this tool never queries a contract's actual royaltyInfo() return value; sale_price, royalty_fraction_bps, and receiver are all caller-declared. ERC-2981 royalty payment is a voluntary off-chain convention: most marketplaces are not required to honor it, and this tool makes no claim that any marketplace will actually pay the computed amount."
      }
    }
  }
}
