Skip to content

Instantly share code, notes, and snippets.

View SergioDemianLerner's full-sized avatar

Sergio Demian Lerner SergioDemianLerner

View GitHub Profile
@SergioDemianLerner
SergioDemianLerner / mining-side-business.csv
Created October 7, 2023 01:06
Mining improvements or side-businesses
Mining Tweak or Side business Mining centralization Mining pool centralization
Selling branded T-shirt No No
Use of ASIC heat (“making cookies¨) Yes No
ASICBoost kept secret Yes No
Leader election based on Bitcoin Block hash No Yes
Merged mined sidechain with onchain AMMs No Yes
Transaction fees from Sidechain without BMM No Depends(*)
Scheduling of Transactions without BMM No Depends(**)
DEX Arbitrage from Sidechain without BMM No Yes
Transaction fees from Sidechain with BMM No No
@SergioDemianLerner
SergioDemianLerner / gist:ef6563df14f481b4fda18358f807100e
Created October 7, 2023 01:04
Mining improvements or side-businesses
Mining Tweak or Side business, Mining centralization,Mining pool centralization
Selling branded T-shirt,No,No
Use of ASIC heat (“making cookies¨),Yes,No
ASICBoost kept secret,Yes,No
Leader election based on Bitcoin Block hash,No,Yes
Merged mined sidechain with onchain AMMs,No,Yes
Transaction fees from Sidechain without BMM,No,Depends(*)
Scheduling of Transactions without BMM,No,Depends(**)
DEX Arbitrage from Sidechain without BMM,No,Yes
Transaction fees from Sidechain with BMM,No,No
pragma solidity >=0.4.0 <0.7.0;
abstract contract IBridgePrecompiledContract {
function getBtcBlockchainBlockHashAtDepth(int256 depth) public virtual view returns (bytes memory hash);
function getBtcBlockchainBestChainHeight() public virtual view returns (int height);
}
contract CryptoRandomBridge {
IBridgePrecompiledContract bridge =
@SergioDemianLerner
SergioDemianLerner / CryptoRandomBlockheader.sol
Last active October 29, 2020 18:41
CryptoRandomBlockheader
pragma solidity >=0.4.0 <0.7.0;
abstract contract IBlockHeaderPrecompiledContract {
function getBitcoinHeader(int256 indexBlock) public virtual view returns (bytes memory coinbase);
}
contract CryptoRandomBlockheader {
IBlockHeaderPrecompiledContract blockHeader =
IBlockHeaderPrecompiledContract(0x0000000000000000000000000000000001000010);
@SergioDemianLerner
SergioDemianLerner / CryptoRandomBlockhash.sol
Created October 29, 2020 18:34
CryptoRandomBlockhash
pragma solidity >=0.4.0 <0.7.0;
contract CryptoRandomBlockhash {
bool waitForRandom;
uint deadline;
function debug_queryLastRskBlockHash() public view returns (bytes32) {
return rskHeaderHash(block.number - 1);
}
{"id": "12fac0a09539e1059cff1953bc8134f17316c6be9333ba5c271b3fc40837f68548d088358caf5f5847105d12f81246c311a7cc6e4c1d312a8cc60b30336cf9ad"}