1// SPDX-License-Identifier: MIT
2pragma solidity ^0.8.24;
3// orgone, live. evaluated against the chain and birdeye
4// about once a second, results rewritten in place. every
5// number is a reading or is computed from readings.
6// empty means not answered yet or no address configured.
7
8contract Live {
9 // chain
10 address box = ;
11 uint64 blockNow = ;
12
13 function layers() view {
14 layer[0] = ;
15 layer[1] = ;
16 layer[2] = ;
17 layer[3] = ;
18 layer[4] = ;
19 layer[5] = ;
20 core = ;
21 held = sum(layer) = ;
22 share = [, , , , , , ] %;
23 }
24
25 function threshold() view {
26 totalSupply = ;
27 threshold = totalSupply >> 9 = ;
28 fill = core / threshold = %;
29 gap = threshold - core = ;
30 armed = core >= threshold = ;
31 }
32
33 function drift() view {
34 flux[5 to core] = layer[5] >> 6 = ;
35 flux[4 to 5] = layer[4] >> 6 = ;
36 flux[3 to 4] = layer[3] >> 6 = ;
37 flux[2 to 3] = layer[2] >> 6 = ;
38 flux[1 to 2] = layer[1] >> 6 = ;
39 flux[0 to 1] = layer[0] >> 6 = ;
40 moving = sum(flux) = ;
41 coreNext = core + flux[5 to core] = ;
42 blocksToFire = ;
43 }
44
45 function decay() view {
46 // layer[0] left alone, 63/64 of itself per block
47 after44 = layer[0] * 0.5001 = ;
48 after128 = layer[0] * 0.1332 = ;
49 after384 = layer[0] * 0.0024 = ;
50 crossing = 64 blocks per boundary, 384 to the core;
51 }
52
53 function stall() view {
54 touched = ;
55 idle = - = ;
56 untilStall = 2048 - idle = ;
57 stalled = ;
58 ventIfWoken = layer[0] >> 3 = ;
59 }
60
61 function memory() view {
62 replay = min(idle, 128) = ;
63 forgotten = max(idle - 128, 0) = ;
64 }
65
66 function projected() view {
67 // what a touch in this block would leave behind
68 core = (now );
69 held = ;
70 fill = %;
71 firesNow = ;
72 }
73
74 function history() view {
75 discharges = ;
76 vents = ;
77 burned = = % of 1e9;
78 supply = 1e9 - burned = ;
79 heldPct = held / supply = %;
80 nextThreshold = (supply - core) >> 9 = ;
81 avgDischarge = burned / discharges = ;
82 }
83
84 function market() view {
85 price = usd;
86 marketCap = usd;
87 fdv = usd;
88 liquidity = usd;
89 volume24h = usd;
90 trades24h = = buy + sell;
91 wallets24h = ;
92 holders = ;
93 change = % 1h, % 24h;
94 liqToCap = liquidity / marketCap = %;
95 avgTrade = volume24h / trades24h = usd;
96 }
97
98 function worth() view {
99 heldUsd = held * price = usd;
100 coreUsd = core * price = usd;
101 burnedUsd = burned * price = usd;
102 drawDayUsd = volume24h / 100 = usd;
103 drawDay = drawDayUsd / price = ;
104 daysToFire = gap / drawDay = ;
105 }
106
107 function top() view {
108 top1 = = % of supply;
109 top5 = % of supply;
110 top20 = % of supply;
111 }
112
113 function flow() view {
114 // the last 50 trades on the feed
115 buys = , sells = ;
116 bought = usd, sold = usd;
117 net = usd;
118 largest = usd ;
119 drawn = sum(amount) / 100 = ;
120 last = at usd;
121 }
122}
123
124// trace, newest at the bottom, one line per trade on the feed
program output
x
market cap:
orgone
capybara