⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣴⣶⣾⣿⣿⣿⣿⣷⣶⣦⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⠀⠀⠀⠀⠀
⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀
⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⠟⠿⠿⡿⠀⢰⣿⠁⢈⣿⣿⣿⣿⣿⣿⣿⣿⣦⠀⠀
⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣤⣄⠀⠀⠀⠈⠉⠀⠸⠿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀
⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢠⣶⣶⣤⡀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⡆
⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠼⣿⣿⡿⠃⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣷
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⢀⣀⣀⠀⠀⠀⠀⢴⣿⣿⣿⣿⣿⣿⣿⣿⣿
⢿⣿⣿⣿⣿⣿⣿⣿⢿⣿⠁⠀⠀⣼⣿⣿⣿⣦⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⡿
⠸⣿⣿⣿⣿⣿⣿⣏⠀⠀⠀⠀⠀⠛⠛⠿⠟⠋⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⠇
⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⣤⡄⠀⣀⣀⣀⣀⣠⣾⣿⣿⣿⣿⣿⣿⣿⡟⠀
⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣄⣰⣿⠁⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠀⠀
⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀
⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠋⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠻⠿⢿⣿⣿⣿⣿⡿⠿⠟⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀
So my fellow miners buddies!
I have been in the lab working on some projects recently one of which I think might be interesting to try out here in the group.
So let me start off by kicking off the first Smart Contract - MagicHash Rounds!
The concept is simple. We use a smart contract on the Ethereum network to pool our resources. Each "round" of mining has a predefined limit of how much ETH can be collected. Everyone can contribute, you have to contribute a fixed amount each time to keep things fair and square just like standard rounds everyone knows and loves.
When you want to join a mining round, you use this function to send in your ETH and specify your BTC payout address.
You can't just send any amount it's got to match the deposit size for the current round.
The contract checks if the round is already full, so you won't be sending ETH into a black hole or anything.
Once the round is full completeRound Function is called which then sends the funds over to the Nicehash address hardcoded into the contract.
address payable niceHashAddress = payable(0x836049EAfA2B0CD48DFBc2114eD21Ff346270986);
This function is also able to be updated by the contract owner if the address changes in Nicehash for any reason.
This will also be manually checked each round before the function is called.
Here is some of the code that might interest some of you.
Full Contract :
https://etherscan.io/address/0xc51972112f899b9d02a2716e44fa4ccd1f066d55#codeEach round has a set maximum deposit limit (e.g., 1 ETH for Round 1 can be changed later if users want to rent larger amounts)
Each round has a set deposit size (e.g., 0.1 ETH).
A round is considered complete once the maximum deposit limit is reached.
struct RoundInfo {
uint256 maxLimit; // The maximum amount of ETH that can be deposited in this round
uint256 depositSize; // The size of each individual deposit in ETH
uint256 currentTotal; // The current total amount of ETH deposited in this round
bool isComplete; // Whether this round is complete or not
constructor() {
owner = msg.sender;
miningBTCAddress = "bc1qy7xdv25rv5ejkh4vkv4m8x7ctyzagma62ef0eh";
// Initialize the first round
RoundInfo memory initialRound = RoundInfo({
maxLimit: 1 ether,
depositSize: 0.1 ether,
currentTotal: 0,
isComplete: false
});
rounds.push(initialRound);
currentRound = 0;
}
If a block is found, the contract owner manually enters details about the found block, including a hash from IPFS that contains the transaction ID, block height, payout address, timestamp, and block hash.
struct BlockFoundInfo
string ipfsHash; // The IPFS hash containing additional information about the block
string transactionID; // The transaction ID related to the block
string blockHeight; // The height of the block in the blockchain
string payoutAddress; // The BTC address that receives the mining reward
uint256 timestamp; // The time when the block was found
string blockHash; // The hash of the block
If we do not fill the round the refund function will pay users back if we do not reach the target for the run to begin.
function refundUsers() public onlyOwner {
require(!rounds[currentRound].isComplete, "Round already complete");
for (uint256 i = 0; i < roundDepositors[currentRound].length; i++) {
address user = roundDepositors[currentRound][i];
uint256 refundAmount = userInfo[user].ethDeposited;
payable(user).transfer(refundAmount);
emit Refunded(user, refundAmount);
}
}
}
============== ROUND 1 =================
Contract Address :
https://etherscan.io/address/0xc51972112f899b9d02a2716e44fa4ccd1f066d55#writeContractRound 1 Deposit Amount = 0.1 ETH (Per User)
Max Users = 10
Total Deposit Limit = 1 ETH
How to take part :
1.)
DO NOT SEND ETH DIRECTLY TO THE CONTRACT ADDRESS2.) Head to the contract link
https://etherscan.io/address/0xc51972112f899b9d02a2716e44fa4ccd1f066d55#writeContract3.) Connect your wallet with the connect web3 button
3.) Use the function 4. deposit and enter your amount (0.1) and your BTC address.
5.) When you enter your BTC address MAKE SURE IT'S CORRECT!
6.) Come back to the forum and post your TXID to the forum you will be added to the list.
7.) Only 1 ETH can be in the contract so only 10 users can deposit at any round first come first serve.
8.) The mining address is stated in the contract and you can follow along mining at :
https://solo.ckpool.org/users/bc1qy7xdv25rv5ejkh4vkv4m8x7ctyzagma62ef0ehID |User | TXID
---------------------------------------------------------------------------------------------------------
1 | MagicByt3 | 0x4dc994f6d34bb8648791d3c2ef47cdca60378442e861c1b77041365f5a59a4fe
---------------------------------------------------------------------------------------------------------
2 |
---------------------------------------------------------------------------------------------------------
3 |
---------------------------------------------------------------------------------------------------------
4 |
---------------------------------------------------------------------------------------------------------
5 |
---------------------------------------------------------------------------------------------------------
6 |
---------------------------------------------------------------------------------------------------------
7 |
---------------------------------------------------------------------------------------------------------
8 |
---------------------------------------------------------------------------------------------------------
9 |
---------------------------------------------------------------------------------------------------------
10 |
---------------------------------------------------------------------------------------------------------
If the idea works and people like the idea I will create a front end for it and a nice dashboard to show the rounds in progress and round status
and mining status when a round begins.
Thanks guys!
Lets find a block!
Ps - Sorry CK will add a full topic in another thread once get some people interested <3 sorry for long topic <3Full topic so not to full CK's pool post :
https://bitcointalksearch.org/topic/m.62859282