citycoins / governance

Community-submitted CityCoins Improvement Proposals (CCIPs)
6 stars 4 forks source link

CCIP-016: Query and Payout Information #37

Open whoabuddy opened 6 months ago

whoabuddy commented 6 months ago

Getting this out of my Discord convo with @Rapha-btc, data courtesy of @friedger:

Query code:

select se.block_height , amount, ((b.burn_block_height  - 666050) / 2100) - 1 as cycle, * from stx_events se left join blocks b on se.block_height = b.block_height  where sender  = 'SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP'
and recipient = 'SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccd002-treasury-mia-stacking'
and se.canonical and se.microblock_canonical 
and b.canonical
order by se.block_height desc

Resulting data for MIA:

block height payout amount
144186 11956403387
142306 14691143091
140709 12658202794
138972 21862239159
137331 23761013666
135730 43886090272
134191 20528917568
132680 15495109117
130893 19913782531
129309 24147184987
127254 22070459358
126031 22346829090
124081 22875310501
122286 22049542417
120440 32036545780
118392 27330659232
116596 25195947330
114755 29773591836
112820 33867164794
111097 36386519532
109338 45695032162

Resulting data for NYC:

block height payout amount cycle
144186 7891090017 80
142306 9695916112 79
140709 8354173172 78
138972 14428419333 77
137331 15681210555 76
135730 28962280296 75
134191 13547686726 74
132588 10225347415 73
130893 13140642834 72
129309 15933649223 71
127254 14562588849 70
126031 14744214112 69
124081 15092603850 68
122286 14547584045 67
120440 21136466347 66
118392 18031083017 65
116596 16622163699 64
114755 19641588871 63
112820 22341600977 62
111097 24002944424 61
109338 30143370950 60

This will be helpful both for the CCIP table and for the download/analysis script:

We'll also need the numbers from 80 forward once the payout for 83 is complete.