https://www.brainiac.software/api/v1/crypto-operations/bridge-partial-failure-audit$0.05 USDCAudit bridge partial failure
Compare caller-supplied source and destination records for a cross-chain bridge. Operations are matched only by message identifier, or by the log field named in fieldMapping. Amounts are scaled with the supplied decimals, fee, and optional conversion rate. consistency_status is consistent, inconsistent, incomplete, or indeterminate. risk_level is low, medium, high, or critical. A missing record is incomplete evidence, not proof that the bridge failed. No chain is queried, and no transaction is treated as final.
Body
| Field | Required | Notes |
|---|---|---|
source | Yes | object; Object |
destination | Yes | object; Object |
fieldMapping | No | object; Object |
fee | No | object; Object |
conversion | No | object; Object |
expectedStatus | No | string; One of: settled, pending, failed |
Request exampleJSON
{
"source": {
"chainId": 1,
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"transactions": [
{
"hash": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"receipt": {
"status": "success",
"logs": [
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"data": "0x"
}
]
}
}
],
"operations": [
{
"messageId": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"nonce": "7",
"recipient": "0x1111111111111111111111111111111111111111",
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000",
"decimals": 6,
"status": "completed",
"transactionHash": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
},
{
"messageId": "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"amount": "500000",
"decimals": 6,
"status": "sent"
}
]
},
"destination": {
"chainId": 8453,
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"transactions": [
{
"hash": "0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
"receipt": {
"status": "success"
}
},
{
"hash": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"receipt": {
"status": "success"
}
},
{
"hash": "0x1111111111111111111111111111111111111111111111111111111111111111",
"receipt": {
"status": "success"
}
}
],
"operations": [
{
"messageId": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"nonce": "7",
"recipient": "0x2222222222222222222222222222222222222222",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "900000",
"decimals": 6,
"status": "completed",
"transactionHash": "0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
},
{
"messageId": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"nonce": "7",
"recipient": "0x2222222222222222222222222222222222222222",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "900000",
"decimals": 6,
"status": "completed",
"transactionHash": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
},
{
"messageId": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"token": "0x4444444444444444444444444444444444444444",
"amount": "1",
"decimals": 6,
"status": "completed",
"transactionHash": "0x1111111111111111111111111111111111111111111111111111111111111111"
}
]
},
"fee": {
"amount": "0",
"decimals": 6
},
"expectedStatus": "settled"
}Response exampleJSON
{
"consistency_status": "inconsistent",
"risk_level": "critical",
"matched_operations": [
{
"message_id": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"source": {
"chain_id": 1,
"count": 1,
"transaction_hash": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"status": "completed",
"token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"amount": "1000000",
"decimals": 6,
"recipient": "0x1111111111111111111111111111111111111111",
"nonce": "7"
},
"destination": {
"chain_id": 8453,
"count": 2,
"status": "completed",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amount": "900000",
"decimals": 6,
"recipient": "0x2222222222222222222222222222222222222222",
"nonce": "7"
}
}
],
"missing_records": [
{
"side": "destination",
"message_id": "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"detail": "No destination operation with this message identifier was supplied. The absent destination record does not prove that the bridge failed."
},
{
"side": "source",
"message_id": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"detail": "A destination operation uses this message identifier, and no source operation with that identifier was supplied. The absent source record does not prove that a source transaction failed."
}
],
"amount_mismatches": [
{
"message_id": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"expected_destination_amount": "1000000",
"actual_destination_amount": "900000",
"source_amount": "1000000",
"fee_amount": "0",
"detail": "The destination amount does not equal the source amount minus the declared fee after decimal scaling. No conversion rate was supplied, so the rate used was 1/1."
}
],
"duplicate_operations": [
{
"side": "destination",
"message_id": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"count": 2,
"transaction_hashes": [
"0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
]
}
],
"findings": [
{
"code": "token_mismatch",
"severity": "high",
"detail": "An operation token on chain 8453 does not match the token declared for that side."
},
{
"code": "duplicate_destination",
"severity": "critical",
"message_id": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"detail": "More than one destination operation uses this message identifier."
},
{
"code": "recipient_mismatch",
"severity": "high",
"message_id": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"detail": "The source and destination recipients differ."
},
{
"code": "amount_mismatch",
"severity": "critical",
"message_id": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"detail": "The source and destination amounts do not agree after decimals, the declared fee, and the conversion rate."
},
{
"code": "missing_destination_record",
"severity": "medium",
"message_id": "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"detail": "The source operation has no matching destination operation in this request."
},
{
"code": "expected_settlement_not_shown",
"severity": "medium",
"message_id": "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"detail": "The expected status is settled, and a supplied status is still pending or sent."
},
{
"code": "destination_without_source",
"severity": "high",
"message_id": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"detail": "The destination records contain an execution whose message identifier does not appear on the source side of this request."
}
],
"limitations": [
"Only the records in this request were compared. No chain was queried, and no transaction is treated as final.",
"A missing source or destination record is incomplete evidence. It does not prove that the bridge failed.",
"Chain IDs are labels from the request. They were not checked against a network.",
"Token addresses on different chains are not assumed to be the same asset. A token is compared only with the token declared for that same side.",
"Bridge event formats are not inferred. Event logs become operations only through fieldMapping.",
"Chain 1 has more than one operation, so the side-level token, amount, and decimals were not copied onto each operation.",
"Chain 8453 has more than one operation, so the side-level token, amount, and decimals were not copied onto each operation.",
"1 event log on chain 1 was not turned into operations. A log is used only when fieldMapping names its message-identifier field."
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/crypto-operations/bridge-partial-failure-audit" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"source": {
"chainId": 1,
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"transactions": [
{
"hash": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"receipt": {
"status": "success",
"logs": [
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"data": "0x"
}
]
}
}
],
"operations": [
{
"messageId": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"nonce": "7",
"recipient": "0x1111111111111111111111111111111111111111",
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000",
"decimals": 6,
"status": "completed",
"transactionHash": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
},
{
"messageId": "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"amount": "500000",
"decimals": 6,
"status": "sent"
}
]
},
"destination": {
"chainId": 8453,
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"transactions": [
{
"hash": "0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
"receipt": {
"status": "success"
}
},
{
"hash": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"receipt": {
"status": "success"
}
},
{
"hash": "0x1111111111111111111111111111111111111111111111111111111111111111",
"receipt": {
"status": "success"
}
}
],
"operations": [
{
"messageId": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"nonce": "7",
"recipient": "0x2222222222222222222222222222222222222222",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "900000",
"decimals": 6,
"status": "completed",
"transactionHash": "0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
},
{
"messageId": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"nonce": "7",
"recipient": "0x2222222222222222222222222222222222222222",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "900000",
"decimals": 6,
"status": "completed",
"transactionHash": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
},
{
"messageId": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"token": "0x4444444444444444444444444444444444444444",
"amount": "1",
"decimals": 6,
"status": "completed",
"transactionHash": "0x1111111111111111111111111111111111111111111111111111111111111111"
}
]
},
"fee": {
"amount": "0",
"decimals": 6
},
"expectedStatus": "settled"
}
JSONhttps://www.brainiac.software/api/v1/crypto-operations/bridge-leg-consistency$0.04 USDCScore bridge leg consistency
Group caller-supplied source and destination legs by message id. A message is consistent when both legs succeeded for the same amount. The recovery index is the hardest leg: a pending destination after a successful source scores lower than two matching successes. No chain is queried.
Body
| Field | Required | Notes |
|---|---|---|
legs | Yes | array; Array |
Request exampleJSON
{
"legs": [
{
"message_id": "a",
"role": "source",
"status": "success",
"amount": 1000000
},
{
"message_id": "a",
"role": "destination",
"status": "success",
"amount": 1000000
},
{
"message_id": "b",
"role": "source",
"status": "success",
"amount": 500000
},
{
"message_id": "b",
"role": "destination",
"status": "pending",
"amount": 0
}
]
}Response exampleJSON
{
"consistency_score": 50,
"recovery_feasibility_index": 45
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/crypto-operations/bridge-leg-consistency" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"legs": [
{
"message_id": "a",
"role": "source",
"status": "success",
"amount": 1000000
},
{
"message_id": "a",
"role": "destination",
"status": "success",
"amount": 1000000
},
{
"message_id": "b",
"role": "source",
"status": "success",
"amount": 500000
},
{
"message_id": "b",
"role": "destination",
"status": "pending",
"amount": 0
}
]
}
JSON