41 lines
1.9 KiB
Markdown
41 lines
1.9 KiB
Markdown
# Reward Distribution Example
|
||
|
||
## Scenario: Block Reward = 50 RIN (49 RIN after 1% pool fee)
|
||
|
||
### Miners Connected:
|
||
1. **Miner A**: `rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q.worker1` (30 difficulty)
|
||
2. **Miner B**: `user.worker2` (20 difficulty) - No address specified
|
||
3. **Miner C**: `rin1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.worker3` (50 difficulty) - **INVALID ADDRESS**
|
||
|
||
### Total Difficulty: 100
|
||
|
||
### Reward Distribution:
|
||
|
||
#### **Step 1: Calculate Individual Shares**
|
||
- **Miner A**: (30/100) × 49 = **14.7 RIN** → `rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q`
|
||
- **Miner B**: (20/100) × 49 = **9.8 RIN** → **Pool address** (no valid address)
|
||
- **Miner C**: (50/100) × 49 = **24.5 RIN** → **Pool address** (invalid address)
|
||
|
||
#### **Step 2: Final Distribution**
|
||
- **Pool Address**: 1 RIN (fee) + 9.8 RIN (from Miner B) + 24.5 RIN (from Miner C) = **35.3 RIN**
|
||
- **Miner A**: **14.7 RIN**
|
||
|
||
### Pool Logs:
|
||
```
|
||
[127.0.0.1] ✅ Authorized: miner_rin1qah.worker1 -> rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q
|
||
[127.0.0.1] ⚠️ Authorized: user.worker2 (rewards will go to pool address)
|
||
[127.0.0.1] ❌ Invalid RinCoin address: rin1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||
💰 Miner rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q: 14.70000000 RIN (30 difficulty)
|
||
⚠️ Miner without address: 20 difficulty -> 9.80000000 RIN to pool
|
||
⚠️ Miner without address: 50 difficulty -> 24.50000000 RIN to pool
|
||
💰 Pool keeps 34.30000000 RIN from miners without addresses
|
||
📊 Summary: 1 miners with addresses, 2 without (rewards to pool)
|
||
```
|
||
|
||
### Key Points:
|
||
- ✅ **Miners with valid addresses**: Get their full share
|
||
- ⚠️ **Miners without addresses**: Contribute to difficulty but rewards go to pool
|
||
- ❌ **Miners with invalid addresses**: Rejected at connection time
|
||
- 💰 **Pool benefits**: Gets additional rewards from careless miners
|
||
- 📊 **Transparent**: All distributions clearly logged
|