Closed philiphacks closed 1 week ago
Requirements:
Reward slot holders: https://api.mainnet.hiro.so/extended/v1/burnchain/reward_slot_holders -> We already have all rewards in DB
Bitcoin API: https://api.blockcypher.com/v1/btc/main/addrs/bc1q9ll6ngymkla8mnk5fq6dwlhgr3yutuxvg3whz5/full
Mining rewards: https://docs.stacks.co/stacks-101/mining Coinbase rewards + all TXs fees
Block miner: https://api.mainnet.hiro.so/extended/v2/blocks/150987 miner_txid https://www.blockchain.com/explorer/transactions/btc/84142066977b25a27123fc76155bda78f03d9afc899c65b4954bf126d0ea355b
Find miners: https://docs.stacks.co/stacks-101/mining Miners commit Bitcoin to two addresses in every leader block commit. The amount committed to each address must be the same. The addresses are chosen from the current reward set of stacking participants. Addresses are chosen using a verifiable-random-function, and determining the correct two addresses for a given block requires monitoring the Stacks chain. So once we have 1 miner, we can find all of them.
Lambda Function On each block:
/extended/v2/blocks/xx/transactions
to get total fee amount/extended/v2/blocks/xx
to get miner_txid
miner_txid
to get the miner address
Add page to track miner commitments (in BTC) with date filters, and checking their profitability