blob: e6cb61bd354c2aa4f1055870a3eca9888fa4e228 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
# Bitflash mining calculator
`scripts/bitflash-mining-calculator.py` is a local WhatToMine-style calculator
for Bitflash.
It does not fetch market prices, does not talk to exchanges, and does not
change consensus. Price is a manual input until Bitflash has a reliable public
market.
## Examples
Estimate from network hashrate:
```bash
python3 scripts/bitflash-mining-calculator.py \
--hashrate 21 --hashrate-unit kh/s \
--network-hashrate 1.56 --network-hashrate-unit mh/s \
--watts 140 --kwh-cost 0.10 \
--price 0.001 --pool-fee 1
```
Estimate from Bitflash difficulty:
```bash
python3 scripts/bitflash-mining-calculator.py \
--hashrate 21 --hashrate-unit kh/s \
--difficulty 45600 \
--watts 140 --kwh-cost 0.10
```
Machine-readable output:
```bash
python3 scripts/bitflash-mining-calculator.py \
--hashrate 21 --hashrate-unit kh/s \
--network-hashrate 1.56 --network-hashrate-unit mh/s \
--json
```
## Bitflash Difficulty Scale
Bitflash does not use Bitcoin's SHA256 difficulty-1 constant for pool shares.
The chain's easiest RandomX target is `bnProofOfWorkLimit = ~uint256(0) >> 12`,
so difficulty 1 expects about `4096` hashes.
The calculator uses:
```text
network_hashrate = difficulty * 4096 / block_time_seconds
```
At the default two-minute block target:
```text
network_hashrate = difficulty * 4096 / 120
```
If you already know network hashrate, pass `--network-hashrate` directly and
the script derives the equivalent Bitflash difficulty for display.
## Reward Estimate
The expected daily reward is:
```text
blocks_per_day = 86400 / block_time_seconds
miner_share = miner_hashrate / network_hashrate
gross_btf_per_day = blocks_per_day * block_reward * miner_share
net_btf_per_day = gross_btf_per_day * (1 - pool_fee_percent / 100)
```
Electricity is:
```text
electricity_per_day = watts / 1000 * 24 * kwh_cost
```
This is an expectation, not a promise. Solo mining variance can be very large,
especially when the miner has a small share of the network.
## Future Website Use
The script is intentionally standalone so the same math can later back a
website widget or status dashboard. Until a public price exists, a website
calculator should keep price as a manual field and label fiat profit as
speculative.
## Website Fields
A public calculator should ask for:
- miner hashrate and unit;
- power draw in watts;
- electricity price per kWh;
- pool fee percent;
- optional BTF price;
- either current Bitflash difficulty or current network hashrate.
The output should separate:
- estimated BTF per day;
- estimated gross fiat revenue, if a manual price was provided;
- electricity cost;
- net profit/loss;
- the difficulty/hashrate assumptions used.
Never present the fiat number as a market quote unless it comes from a real
public market. Before that exists, label it as a manual scenario.
|