# TrustFingerprint

TrustFingerprint is Noderr's reputation system that tracks and scores the reliability of network participants.

## Overview

Every node, strategy, and operator in the Noderr network has a TrustFingerprint score that influences their:

- **Selection probability** for validation tasks
- **Reward multipliers** for successful operations
- **Voting weight** in governance decisions
- **Capital allocation limits** for strategies

## Score Components

### Node TrustFingerprint

The Node TrustFingerprint is computed from three objective, on-chain verifiable components, each measured automatically with no subjective input into the base formula. (A bounded admin-adjustment path exists for exceptional events such as bug bounties and security violations; see [Manual Adjustments](#manual-adjustments).)

| Component | Weight | Description |
|-----------|--------|-------------|
| Uptime | **50%** | Percentage of time the node is online and responsive |
| Task Success Rate | **40%** | Rate of successfully completed validation tasks |
| Stake Commitment | **10%** | Amount of NODR staked (normalized against tier maximum) |

### Strategy TrustFingerprint

| Component | Weight | Description |
|-----------|--------|-------------|
| Risk-Adjusted Return | 35% | Sharpe ratio and Sortino ratio |
| Drawdown History | 25% | Maximum and average drawdowns |
| Consistency | 20% | Return volatility and predictability |
| Guardian Validations | 20% | Number of successful validations |

### Operator TrustFingerprint

| Component | Weight | Description |
|-----------|--------|-------------|
| Node Performance | 40% | Average score of operated nodes |
| Governance Participation | 20% | Voting activity and alignment |
| Stake Amount | 25% | Total tokens staked |
| Community Contribution | 15% | Bug reports, proposals, etc. |

## Score Calculation

### Formula

```
TF = (0.50 × Uptime) + (0.40 × TaskSuccessRate) + (0.10 × Stake)
```

**Score range:** 0–10000 (display scale), which maps directly to the 0–1 internal scale (10000 = 1.00 = 100.00%).

### Example Calculation

```
Node with:
- Uptime: 99.5%           → component score 9950
- Task Success Rate: 98%  → component score 9800
- Stake: 50,000 NODR (Guardian max) → normalized score 10000

TF = (0.50 × 9950) + (0.40 × 9800) + (0.10 × 10000)
   = 4975 + 3920 + 1000
   = 9895 (98.95%)
```

## Score Tiers

All ranges below use the 0–10000 display scale (equivalently 0.00–1.00 on the internal scale).

| Tier | Score Range (0–10000) | Internal (0–1) | Benefits |
|------|-----------------------|----------------|----------|
| **Diamond** | 9500–10000 | 0.95–1.00 | 2x rewards, priority selection, governance boost |
| **Platinum** | 8500–9499 | 0.85–0.94 | 1.5x rewards, high selection probability |
| **Gold** | 7000–8499 | 0.70–0.84 | Standard rewards, normal selection |
| **Silver** | 5000–6999 | 0.50–0.69 | Reduced rewards, lower selection |
| **Bronze** | 2500–4999 | 0.25–0.49 | Minimal rewards, rare selection |
| **Probation** | 0–2499 | 0.00–0.24 | No rewards, under review |

### Node Promotion Thresholds

TrustFingerprint also gates node-tier eligibility. A participant must meet the minimum TrustFingerprint score for the tier they wish to enter (on the 0–10000 display scale; equivalently 0–1 internal):

| Node Tier | Minimum TrustFingerprint |
|-----------|--------------------------|
| **Validator** | 6000 (0.60) |
| **Guardian** | 7000 (0.70) |
| **Oracle** | 8000 (0.80) |

Guardian promotion additionally requires governance approval and a UtilityNFT; Oracle promotion additionally requires election (66% Oracle supermajority) and a UtilityNFT.

## Score Updates

### Automatic Updates

Scores are updated automatically based on:

- Task completion (immediate)
- Uptime checks (every 5 minutes)
- Performance metrics (hourly)
- Stake changes (immediate)

### Manual Adjustments

Admins can adjust scores for:

- Bug bounty rewards (+5 to +20)
- Security violations (-10 to -100)
- Exceptional contributions (+10 to +50)

## Smart Contract Integration

### Reading TrustFingerprint

```solidity
interface ITrustFingerprint {
    function getScore(address entity) external view returns (uint256);
    function getTier(address entity) external view returns (Tier);
    function getComponents(address entity) external view returns (
        uint256 uptime,           // weight: 50%
        uint256 taskSuccessRate,  // weight: 40%
        uint256 stake             // weight: 10%
    );
}
```

### Using in Selection

```solidity
function selectValidator() internal returns (address) {
    address[] memory validators = registry.getActiveValidators();
    uint256 totalWeight = 0;
    
    // Calculate weighted selection
    for (uint256 i = 0; i < validators.length; i++) {
        totalWeight += trustFingerprint.getScore(validators[i]);
    }
    
    // Random selection weighted by TrustFingerprint
    uint256 random = getRandomNumber() % totalWeight;
    uint256 cumulative = 0;
    
    for (uint256 i = 0; i < validators.length; i++) {
        cumulative += trustFingerprint.getScore(validators[i]);
        if (random < cumulative) {
            return validators[i];
        }
    }
}
```

## Governance Impact

TrustFingerprint affects governance in several ways:

### Voting Power

Governance voting power is **tier-based** (`TierVotingPower.sol`), determined by a participant's node tier rather than by a TrustScore multiplier or any time-weighting:

| Node Tier | Voting Multiplier |
|-----------|-------------------|
| Micro | 1x |
| Validator | 2x |
| Guardian | 4x |
| Oracle | 7x |

TrustFingerprint influences governance indirectly through tier eligibility (a participant must meet the promotion thresholds above to hold a higher-weighted tier) rather than through a direct multiplier on voting power.

### Proposal Thresholds

On-chain governance (`GovernanceManager.sol`) sets the following parameters:

| Parameter | Value |
|-----------|-------|
| Proposal threshold | Proposer must hold ≥ **70% TrustFingerprint** |
| Quorum | **10%** of total voting power |
| Standard approval | **60%** of votes cast |
| Oracle supermajority | **66%** for major decisions (treasury / capital deployment, allocations > $100K or > 5% AUM, and strategy approval) |
| Timelock | **2 days** standard · **1 day** emergency · **7 days** maximum |

Governance operates across **two chambers** (Oracle and Guardian). Major decisions (treasury and capital deployment, large allocations, and strategy approval) require the **66% Oracle supermajority** in addition to the standard process.

> **Conceptual / roadmap:** A vote-escrow design (`veNODR` / vote-escrow governance) appears only in archived material and is **not implemented**. It is presented here as a planned/conceptual direction, not a live mechanism.

## Privacy Considerations

- TrustFingerprint scores are public onchain
- Individual component scores are public
- Calculation methodology is transparent
- Historical data is preserved for auditing

## API Access

```typescript
import { NoderrClient } from '@noderr/sdk';

const client = new NoderrClient({ chainId: 84532 });

// Get TrustFingerprint
const score = await client.trustFingerprint.getScore(address);
const tier = await client.trustFingerprint.getTier(address);
const components = await client.trustFingerprint.getComponents(address);

console.log(`Score: ${score}, Tier: ${tier}`);
```

---

*Last Updated: June 2026*
