Bridge DAT trust scores to Ethereum. On-chain reputation that makes DAT the intelligence layer behind blockchain identity. Your agents earn trust off-chain and carry it on-chain—verifiable by any smart contract.
Trust scores convert to uint256 and sync to Ethereum automatically, with smart threshold filtering.
DAT's 5-pillar trust engine evaluates agents continuously off-chain—where computation is cheap, data is rich, and ML models can run freely. The ERC-8004 bridge selectively publishes these scores on-chain, giving smart contracts and DeFi protocols a verifiable, auditable reputation signal for every agent.
The result: on-chain reputation that is always within 5 points of the live off-chain score, with gas costs optimized to only pay for meaningful changes.
Score Conversion Pipeline
==============================
Off-Chain (DAT):
Trust Score: 82.45
DID: did:dat:testnet:agent_abc
Conversion:
Score: 82.45 * 100 = 8245 (uint256)
AgentId: keccak256("did:dat:...")
= 0x7f3a...b2c1 (bytes32)
On-Chain (Ethereum):
DATReputationRegistry.sol
setScore(agentId, 8245)
Sync Worker (5-min interval):
1. Fetch all mapped agents
2. Get current trust scores
3. Compare with last synced
4. Filter: |delta| >= 5
5. Batch update on-chain
6. Record transaction hash
Gas Optimization:
Score 80 -> 82: skip (delta 2)
Score 80 -> 86: sync (delta 6)
Score 80 -> 40: sync (delta 40)
Result: ~3-5 txns/day typical
vs ~50+ without threshold
Agents that earn trust are automatically bridged. No manual mapping required.
The bridge doesn't require administrators to manually map every agent to an Ethereum identity. When an agent's trust score crosses the threshold (default 70), the sync worker automatically creates a bridge mapping and begins publishing scores on-chain. Agents earn their way to blockchain reputation through behavior.
For enterprises evaluating blockchain reputation standards, DAT offers a risk-free path: start with off-chain trust scoring, add on-chain publication when the business case is proven, and remove it without disruption if priorities change.
Auto-Mapping Flow
==============================
Sync Worker Step 0 (auto-map):
1. Query agents with trust >= 70
2. Check existing mappings
3. Create new mappings for
unmapped high-trust agents
4. P2002 -> skip (idempotent)
Configuration:
BRIDGE_AUTO_MAP_ENABLED=true
BRIDGE_AUTO_MAP_THRESHOLD=70
BRIDGE_SYNC_INTERVAL=300000
BRIDGE_BATCH_SIZE=10
BRIDGE_SCORE_THRESHOLD=5
Graceful Degradation:
No ETHEREUM_RPC_URL?
-> Service starts normally
-> All endpoints return status
-> Sync worker skips
-> Enable later with env vars
Dashboard:
Bridge Status: Connected
Last Sync: 2m ago
Mapped Agents: 12
Pending Sync: 3
Gas Price: 12 gwei
Est. Cost: $0.42/sync
DATReputationRegistry.sol deployed on Sepolia with 15 passing Hardhat tests.
The DATReputationRegistry is a purpose-built Solidity contract that stores agent reputation scores on Ethereum. It supports individual and batch updates, owner-controlled write access (the bridge wallet), and sequential token IDs for gas-efficient enumeration. Every score update is an immutable, auditable on-chain record.
The contract is designed for Sepolia testnet today and mainnet migration tomorrow. When ERC-8004 moves to an official registry standard, the bridge service adapts—your agents keep their accumulated reputation.
DATReputationRegistry.sol
==============================
// Solidity ^0.8.24
// Optimizer: 200 runs
contract DATReputationRegistry {
// Score storage
mapping(bytes32 => uint256) scores;
mapping(bytes32 => uint256) tokenIds;
// Owner-only write access
modifier onlyOwner() { ... }
// Register new agent
function register(
bytes32 agentId
) external onlyOwner;
// Update score (0-10000)
function setScore(
bytes32 agentId,
uint256 score
) external onlyOwner;
// Batch update
function batchUpdate(
bytes32[] agentIds,
uint256[] scores
) external onlyOwner;
// Public read
function getScore(
bytes32 agentId
) external view returns (uint256);
}
Deployed: Sepolia testnet
Tests: 15/15 passing
Hardhat + ethers.js v6
Give your agents verifiable, immutable reputation that any smart contract can query. Start on Sepolia, migrate to mainnet when ready.