# Crypto Governance API > Static checks that compare a caller-supplied DAO proposal with the execution calls the caller supplies. The proposal description is not treated as the approved action list. No network calls are made. Each POST has a fixed USDC price on Base, paid with the x402 exact scheme. The request is validated first, and payment settles only after a successful (2xx) result. Failed calls are not charged. 1. POST JSON matching the requestBody. Invalid input returns 400 with no payment challenge. 2. A valid unpaid call returns 402 with the exact amount and payTo. 3. Pay and retry with payment-signature. Payment settles only if the operation returns 2xx. A 4xx/5xx is not charged. - Product: https://www.brainiac.software/api/crypto-governance - Docs: https://www.brainiac.software/api/crypto-governance/docs - OpenAPI: https://www.brainiac.software/api/crypto-governance/openapi.json - Contact: support@brainiac.software (https://www.brainiac.software/contact) ## Operations ### POST /api/v1/crypto-governance/governance-execution-diff $0.05 USDC. Compare the structured actions in a caller-supplied DAO proposal with the caller-supplied execution calls. Targets, selectors, decoded parameters, and native value are compared. execution_match is exact, partial, mismatch, or indeterminate. risk_level is low, medium, high, or critical. The proposal description is not treated as the approved action list. No chain is queried, and approval or execution is not inferred from chain state. Inputs: proposal, chainId?, orderSensitive?, approvedActions, execution, fieldMapping?, abi? Docs: https://www.brainiac.software/api/crypto-governance/docs#crypto-governance-governance-execution-diff Example request: ```json { "proposal": { "id": "42", "description": "Send 1 USDC to the grants wallet." }, "chainId": 8453, "orderSensitive": false, "approvedActions": [ { "target": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "signature": "transfer(address,uint256)", "calldata": "0xa9059cbb000000000000000000000000111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000f4240", "value": "0", "recipient": "0x1111111111111111111111111111111111111111", "amount": "1000000" }, { "target": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "signature": "approve(address,uint256)", "calldata": "0x095ea7b300000000000000000000000033333333333333333333333333333333333333330000000000000000000000000000000000000000000000000000000000000005", "value": "0", "spender": "0x3333333333333333333333333333333333333333", "amount": "5" } ], "execution": { "transactionHash": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "calls": [ { "target": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "calldata": "0xa9059cbb000000000000000000000000222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000f4240", "value": "0" }, { "target": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "calldata": "0xa9059cbb00000000000000000000000044444444444444444444444444444444444444440000000000000000000000000000000000000000000000000000000000000001", "value": "0" } ] }, "abi": [ { "type": "function", "name": "transfer", "stateMutability": "nonpayable", "inputs": [ { "name": "to", "type": "address" }, { "name": "amount", "type": "uint256" } ], "outputs": [ { "type": "bool" } ] }, { "type": "function", "name": "approve", "stateMutability": "nonpayable", "inputs": [ { "name": "spender", "type": "address" }, { "name": "amount", "type": "uint256" } ], "outputs": [ { "type": "bool" } ] } ] } ``` Example response: ```json { "execution_match": "mismatch", "risk_level": "critical", "approved_actions": [ { "index": 0, "target": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "selector": "0xa9059cbb", "function_name": "transfer", "value": "0", "parameters": [ { "name": "to", "type": "address", "value": "0x1111111111111111111111111111111111111111" }, { "name": "amount", "type": "uint256", "value": "1000000" } ], "decoded": "abi" }, { "index": 1, "target": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "selector": "0x095ea7b3", "function_name": "approve", "value": "0", "parameters": [ { "name": "spender", "type": "address", "value": "0x3333333333333333333333333333333333333333" }, { "name": "amount", "type": "uint256", "value": "5" } ], "decoded": "abi" } ], "executed_actions": [ { "index": 0, "target": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "selector": "0xa9059cbb", "function_name": "transfer", "value": "0", "parameters": [ { "name": "to", "type": "address", "value": "0x2222222222222222222222222222222222222222" }, { "name": "amount", "type": "uint256", "value": "1000000" } ], "decoded": "abi" }, { "index": 1, "target": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "selector": "0xa9059cbb", "function_name": "transfer", "value": "0", "parameters": [ { "name": "to", "type": "address", "value": "0x4444444444444444444444444444444444444444" }, { "name": "amount", "type": "uint256", "value": "1" } ], "decoded": "abi" } ], "unexpected_actions": [ { "index": 1, "target": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "selector": "0xa9059cbb", "function_name": "transfer", "value": "0", "parameters": [ { "name": "to", "type": "address", "value": "0x4444444444444444444444444444444444444444" }, { "name": "amount", "type": "uint256", "value": "1" } ], "decoded": "abi" } ], "missing_actions": [ { "index": 1, "target": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "selector": "0x095ea7b3", "function_name": "approve", "value": "0", "parameters": [ { "name": "spender", "type": "address", "value": "0x3333333333333333333333333333333333333333" }, { "name": "amount", "type": "uint256", "value": "5" } ], "decoded": "abi" } ], "parameter_differences": [ { "action_index": 0, "executed_index": 0, "name": "to", "expected": "0x1111111111111111111111111111111111111111", "actual": "0x2222222222222222222222222222222222222222" } ], "findings": [ { "code": "parameter_difference", "severity": "critical", "action_index": 0, "detail": "Parameter to does not match the approved action." }, { "code": "missing_action", "severity": "high", "action_index": 1, "detail": "An approved action has no executed call with the same target and function." }, { "code": "unexpected_action", "severity": "critical", "action_index": 1, "detail": "An executed call does not match an approved action." } ], "limitations": [ "Only the approved actions and execution records in this request were compared. Proposal approval and execution were not read from a chain.", "The proposal description was not treated as the approved action list.", "Chain ID was not checked against a network, and no transaction is treated as final.", "A function is decoded from the caller ABI, or from the standard ERC-20 transfer, transferFrom, approve, and increaseAllowance selectors when no ABI is supplied.", "Action order was not treated as a difference because orderSensitive was not true.", "The proposal description was not compared. Only the structured actions were compared." ] } ``` ### POST /api/v1/crypto-governance/execution-risk-score $0.04 USDC. Apply caller-supplied transfer and transferFrom calls to the supplied token balances. A transfer that is not in the expected list is unforeseen. The drift index is the share of balances that change. Amounts stay inside the local integer limit. This is not an EVM simulation and no chain is queried. Inputs: sender, calls, balances, expected? Docs: https://www.brainiac.software/api/crypto-governance/docs#crypto-governance-execution-risk-score Example request: ```json { "sender": "0x1111111111111111111111111111111111111111", "balances": [ { "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "account": "0x1111111111111111111111111111111111111111", "amount": 2000000 }, { "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "account": "0x4444444444444444444444444444444444444444", "amount": 500 } ], "expected": [ { "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "to": "0x2222222222222222222222222222222222222222", "amount": 1000000 } ], "calls": [ { "target": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "data": "0xa9059cbb000000000000000000000000222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000f4240" }, { "target": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "data": "0xa9059cbb00000000000000000000000033333333333333333333333333333333333333330000000000000000000000000000000000000000000000000000000000000001" } ] } ``` Example response: ```json { "execution_risk_score": 25, "state_drift_index": 75, "unforeseen_transfers_detected": true } ```