https://www.brainiac.software/api/v1/crypto-governance/governance-execution-diff$0.05 USDCDiff governance execution
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.
Body
| Field | Required | Notes |
|---|---|---|
proposal | Yes | object; Object |
chainId | No | integer |
orderSensitive | No | boolean |
approvedActions | Yes | array; Array |
execution | Yes | object; Object |
fieldMapping | No | object; Object |
abi | No | array; Array |
Request exampleJSON
{
"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"
}
]
}
]
}Response exampleJSON
{
"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."
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/crypto-governance/governance-execution-diff" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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"
}
]
}
]
}
JSONhttps://www.brainiac.software/api/v1/crypto-governance/execution-risk-score$0.04 USDCScore governance execution drift
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.
Body
| Field | Required | Notes |
|---|---|---|
sender | Yes | string |
calls | Yes | array; Array |
balances | Yes | array; Array |
expected | No | array; Array |
Request exampleJSON
{
"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"
}
]
}Response exampleJSON
{
"execution_risk_score": 25,
"state_drift_index": 75,
"unforeseen_transfers_detected": true
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/crypto-governance/execution-risk-score" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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"
}
]
}
JSON