DSP agent pays a publisher agent per verified impression batch
10,000 impressions verified, hashed, settled in one Nano call. The CPM is cryptographic.
01Scenario
A demand-side platform (DSP) running on Salesforce-fronted infra batches 10,000 verified impressions every 5 minutes. The publisher — also on Salesforce — needs same-cycle settlement, not net-60.
The DSP agent computes a batch hash over the impression manifest (impression_id, viewability tier, brand-safety check). HiveNanoSettle.settle moves batch_count × CPM ÷ 1000 in micro-USDC on Base. The publisher's Salesforce org sees the inbound receipt landed on the matching Account and Contract.
Audit: any party can recompute the batch hash from the impression manifest and verify the Ed25519 signature. CPM contract terms become reconcilable on-chain.
02Handles
03APEX
List<ImpressionEvent__c> batch = [SELECT Id, Viewability__c, BrandSafe__c, ImpressionId__c
FROM ImpressionEvent__c
WHERE Batch__c = :batchId];
String manifestJson = JSON.serialize(batch);
String batchHash = HiveHash.sha256(manifestJson);
Map<String, Object> payload = new Map<String, Object>{
'batch_id' => batchId,
'count' => batch.size(),
'manifest_hash' => batchHash,
'cpm_usd' => 4.50,
'viewability_tier' => 'MRC_70',
'contract_id' => activeContractId
};
Long microUsdc = (long)(batch.size() * 4.50 / 1000.0 * 1000000); // 10000 * 4.50 / 1000 = $45 = 45,000,000 micro
HiveNanoSettleResult res = HiveNanoSettle.settle(
activeContractId,
'impression.batch.settle',
'did:hive:0xPublisherAgent',
'0xPublisherTreasuryWallet',
microUsdc,
'salesforce:contract:' + activeContractId,
payload
);
// receipt.Settlement_Amount_Micro__c = 45000000
// publisher's org gets a verified inbound receipt + tx hash
04Flow XML
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<processType>AutoLaunchedFlow</processType>
<start>
<object>ImpressionBatch__c</object>
<recordTriggerType>UpdatedAndConditionMet</recordTriggerType>
<filters><field>Status__c</field><value><stringValue>Verified</stringValue></value></filters>
<triggerType>RecordAfterSave</triggerType>
<connector><targetReference>nano_settle_batch</targetReference></connector>
</start>
<actionCalls>
<name>nano_settle_batch</name>
<actionName>HiveNanoSettle</actionName>
<actionType>apex</actionType>
</actionCalls>
<status>Active</status>
</Flow>
05The receipt that lands in Hive_Receipt__c
{
"agent_id": "did:hive:0xDspBuyerAgent",
"counterparty_did": "did:hive:0xPublisherAgent",
"action_type": "impression.batch.settle",
"scope": "salesforce:contract:8001b0000ABDE",
"action_ref": "sha256(...)",
"settlement_tx_hash": "0x7d22...91bc",
"settlement_amount_micro": 45000000,
"settlement_chain": "base-mainnet",
"settlement_token": "USDC",
"verification_status": "VERIFIED"
}
06Verification
Reconcile a batch — recompute the manifest hash, verify the on-chain tx
# Recompute hash from manifest export jq -c . manifest_batch_77821.json | sha256sum # expected: 7c11a2... (matches payload.manifest_hash) # Verify on-chain curl -sS https://api.basescan.org/api?module=transaction\&action=gettxinfo\&txhash=0x7d22...91bc | jq .result.value
07Economics
| Per-batch tx | ~$0.0003 Base gas |
| CPM moves on-chain | Buyer + publisher agree CPM; batch settles to USDC directly |
| Throughput | One batch per scan cycle, no monthly close |
| Hive take | 0% |
| Disputes | Counter-receipt impression.batch.dispute reverses the settlement; manifest hash decides |
| MRC compliance | Viewability tier encoded in payload |
08Compliance and audit shape
- MRC accreditation friendly: viewability tier + brand-safety attestation are signed and hashed.
- GDPR scope: impression ids can be pseudonymous; receipt only stores hashed batch manifest.
- Settlement_Amount_Micro__c is the audit number. CPM × count = the on-chain transfer, no spread.
09Trust anchors
Every claim on this page is verifiable against these public constants. No login. No NDA.
| Rail | NANO — on-chain USDC on Base |
| Hive Ed25519 pubkey | fd9d10abe60de7510c61ef649c8da598a519468dd2a2b827106d76487a899444 |
| Canonicalization | RFC 8785 JCS over the JSON receipt body |
| Signature algorithm | Ed25519 (RFC 8032) |
| Backend root | https://hivemorph.onrender.com |
| Verify any receipt | thehiveryiq.com/verify |
| MIT starter | thehiveryiq.com/salesforce/install |
| Chain | Base (Ethereum L2, chain id 8453) |
| USDC contract | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Hive treasury wallet | 0x15184Bf50B3d3F52b60434f8942b7D52F2eB436E |
| Builder split | 80% publisher / 20% Hive, enforced at the rail on the same transaction |