StackingDAO / stacking-tracker

MIT License
0 stars 0 forks source link

Miner profitability #12

Closed philiphacks closed 1 week ago

philiphacks commented 2 months ago

Add page to track miner commitments (in BTC) with date filters, and checking their profitability

nieldeckx commented 1 month ago

Requirements:

nieldeckx commented 1 month ago

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: