Mining $GOURDES on Base
Half of every $GOURDES that will ever exist, 500,000,000 coins, can only be created by mining. Mining runs on Base through a public contract with no owner. Anyone with a computer and a Base wallet can take part, under the same rules we follow with our own graphics cards.
Miner contract on Base: 0xdfaBce24c8C1fbEc42327fb336A229606810b497 (explorer). It mints the $GOURDES coin 0xB614b287dA2BD9574181cF9CCA8D049d26AF22d0. Mining is open when the contract's started() function returns true; the miner program below checks this itself and waits until it does.
Mining right now
The current reward, difficulty and solution count load here from the miner contract on Base. This needs JavaScript; the trade page shows the same numbers when Base is selected.
Miner leaderboard
The leaderboard of every wallet that has mined GOURDES loads here. This needs JavaScript; every solution is also on the explorer under the miner contract.
How the puzzle works
The miner contract stores a value called the challenge and a number called the target. A solution is any number, the nonce, for which this hash comes out at or below the target:
keccak256(challenge, your address, nonce) <= target
Hashes are unpredictable, so the only way to find a good nonce is to try a huge number of them. A lower target means fewer hashes qualify, which means more tries on average. That is the whole of the work in proof of work.
Three details make the puzzle fair:
- Your address is inside the hash. A solution only counts for the address that found it. If someone copies your nonce out of a pending transaction and sends it from their own address, the hash changes and the contract rejects it.
- The challenge changes after every solution. It mixes in the previous solution, the running solution count and the previous block hash, so an old solution can never be replayed.
- One solution per block. The contract accepts at most one solution in each Base block. A second one in the same block fails. No matter how much hashing power one miner brings, the coins come out at most one reward per block.
The reward and the halving
Each accepted solution mints the current reward straight to the address that submitted it. The reward halves after a fixed number of solutions, on a schedule set when the contract is deployed. Nobody can change it afterwards.
The sum of all rewards is capped at the mining budget, half the total supply. The miner contract checks this on every solution and clamps the last reward to what is left, and the token contract keeps its own separate count and refuses to mint past the budget. When the reward reaches zero, by halving or because the budget is used up, mining is over for good.
Once mining is live, the trade page shows the reward right now, the current difficulty, the number of solutions so far and how much is left to mine, read straight from the contract when Base is selected.
Difficulty: one solution a minute
The contract aims for one solution per minute across all miners together. Every fixed number of solutions it compares how long that batch actually took with how long it should have taken, and moves the target in proportion:
- If solutions came too fast, the target drops and the puzzle gets harder.
- If they came too slowly, the target rises and the puzzle gets easier.
- Each adjustment is limited to a factor of 4 in either direction, and the target always stays between a fixed floor and ceiling, so difficulty can neither run away nor get stuck.
The contract started with a target of about 236 hashes per solution on average, roughly 68.7 billion, which is about 51 seconds of work for one NVIDIA RTX A5000 graphics card at 1.35 billion hashes per second. When nobody mines, the easing below lowers the work step by step down to the contract's floor, and the retarget raises it again as miners join, to keep the pace near one a minute. The difficulty right now is in Mining right now at the top of this page.
If everyone stops
A miner with a lot of hardware could push the difficulty up and then leave, and nobody else could find a solution. The contract prevents that stall: for every four minutes without a solution, the target used to judge the next one doubles, which halves the work needed. The easing ends as soon as a solution is accepted, and the regular retarget then settles the difficulty to the hashing power that is really there.
What you need to mine
- A wallet address on Base. Any Ethereum style address you control works. Rewards are minted to the address that sends the solution.
- A little ETH on Base. Every solution is a transaction, and Base charges its gas fee in ETH.
- Hashing hardware. The puzzle is keccak256, the same hash function Ethereum uses everywhere. Graphics cards are by far the fastest, which is what we mine with, but the program also mines on the processor, so any computer can take part.
- A connection to Base. The miner program reads the current challenge and target from a Base node and sends your solutions back as transactions.
- The miner program. It is on this page, under Run the miner, with the exact commands.
Run the miner
The miner is a Python program. It mines on one or many graphics cards and on processor threads at the same time, and it is the same program we mine with. It needs no account, and it connects only to the Base endpoints you give it. Read it before you run it: it is plain source code.
Easy start: Windows or Docker
Two downloads hold the same miner files as the table below, with everything they need to run. You still need a mining wallet with a little ETH on Base (see Requirements).
Windows, 64-bit (tested on Windows 11)
- Download
gourdes-miner-windows-x64.zipand unzip it. It includes Python and every package, so there is nothing else to install. Your graphics card's normal Windows driver provides OpenCL. - Double-click
start-miner.bat. The first time, it asks for the mining wallet's private key (the typing stays hidden), lists your graphics cards and processor, and lets you choose. The key is saved inkeys\hot.keyinside the folder, readable only by your Windows user. - It then mines and prints each solution.
test-miner.batdoes a dry run that sends nothing,list-devices.batshows your devices and their speed, andstop-miner.bat(or closing the window) stops it.
Windows may show a SmartScreen warning because the package is not signed. Check the zip's sha256 against the table below first (certutil -hashfile gourdes-miner-windows-x64.zip SHA256), then choose More info and Run anyway.
Docker, Linux (NVIDIA cards with the NVIDIA Container Toolkit, or the processor on any machine)
docker build -t gourdes-miner https://gourdes.finance/miner/gourdes-miner-docker.tar.gz
mkdir -m 700 gourdes-data
docker run -it --rm --gpus all --user "$(id -u):$(id -g)" -v "$PWD/gourdes-data:/data" gourdes-miner setup
docker run -d --name gourdes-miner --gpus all --user "$(id -u):$(id -g)" -v "$PWD/gourdes-data:/data" gourdes-miner minesetup asks for the key and the devices and keeps them in gourdes-data. Replace mine with test (and -d with -it --rm) for a dry run. docker logs -f gourdes-miner follows it and docker stop gourdes-miner stops it. Without an NVIDIA card, leave out --gpus all and it mines on the processor. The README.txt inside the download has the details.
The rest of this section installs the same program by hand.
What a solution pays
- Each accepted solution mints the current reward to the address that sent it. The reward is 475 $GOURDES per solution in the first era and halves every 525,600 solutions.
- The contract aims for one solution every 60 seconds across all miners and retargets the difficulty every 64 solutions.
- At most one solution is accepted per Base block. A second solution in the same block fails and still costs its sender gas.
- Your address is part of the hash. A nonce is only valid for the address that searched it, so nobody can take a solution out of your pending transaction, and you cannot search for one address and submit from another.
- Your share of the rewards follows your share of all the hashing power pointed at the contract. Nothing is guaranteed: the coin's price and the number of miners are not known in advance.
Requirements
- Python 3 with
venv. We run it on Python 3.12.3, Ubuntu 24.04, with NVIDIA RTX A5000 cards. - For NVIDIA cards: the NVIDIA driver and its OpenCL library, with
nvidia-smiworking. Cards are named by full uuid. - For other graphics cards (AMD, Intel, Apple): the vendor's OpenCL driver. The program uses standard OpenCL, but we have only tested the plain files below on NVIDIA cards ourselves. The Windows and Docker downloads adjust the kernel for other drivers; we tested them on an Intel Iris Xe and on the processor.
- For the processor: nothing extra. Processor mining works on any computer but is far slower than a graphics card, about 0.1 million hashes per second per thread against 1,350 million for one A5000. It runs at the lowest priority, so it does not slow down the rest of the machine.
- A Base JSON-RPC endpoint.
https://mainnet.base.orgis a public one. A second endpoint from a different operator is optional and makes the client cross-check every answer. - A new wallet used only for mining, with a small amount of ETH on Base for gas. Its private key sits in a file on the mining machine, so keep nothing else in that wallet.
Files
| File | What it is | Bytes | sha256 |
|---|---|---|---|
| run.py | The mining client. Reads the puzzle, runs the solver, checks and sends solutions. | 72,190 | b802a2b2ee2657291dbd22534d518998d89c1707b1d7896567b3622d055867b9 |
| gminer.py | The GPU solver (OpenCL, any vendor). Also a benchmark and device list on its own. | 8,074 | 5a5b2e45beee43e44cb14fb0d9eaa89d28fa8fb2e803c3a579ffeeb8d93c4faf |
| msolver.py | Runs several graphics cards and processor threads on the same puzzle at once. | 8,950 | 0d8b81e8339ab8efa8c8d98278777f9a90355972cd55b665e6d2e70c8c1ab433 |
| keccak.cl | The keccak256 search kernel the solver compiles for the GPU. | 2,177 | 805ac63a47387923c1a970a402e57205a23a0d9663d1d1000d73b40834ae306b |
| config.example.json | Config template for the client. | 1,755 | 107b12db5a2fcbaeaabd3c5da9cd0135e4fe2b99c29bc76a569b7d046ab804b0 |
| GourdesMiner.abi.json | The miner contract's ABI, named by the config. | 7,465 | bfdf8fdc0827a4a7ea2770ac35e5534dbd7d86ca3a711eb0f63720c27da20709 |
| requirements.txt | Pinned Python packages. | 85 | 673f67b7fba989fce5b8b8de02b73df3fee8acc9613ffe070c485132da9bf10b |
| gourdes-miner-windows-x64.zip | Windows 64-bit, ready to run: Python, every package and the files above, with start-miner.bat. See Easy start. | 35,742,293 | c39c4dc85d5aab529ebd8694cbe066b73068755137f1f9b84c3049f2f7459647 |
| gourdes-miner-docker.tar.gz | Docker build context: Dockerfile and the files above. NVIDIA cards or the processor. See Easy start. | 36,297 | a9d67cecbc6c8fadf5bc41cea44979d72ebcfa18bcd3ceb6106f33eddac77827 |
| SHA256SUMS | The sha256 of every file above, for sha256sum -c. | 749 | 116e8a301c7ca9f65457773d6b7a2114837424cf3829cea1ba2f5fff177cf852 |
All files are served from https://gourdes.finance/miner/. The miner files are plain text; the two packages are the easy-start downloads above.
1. Download and check
mkdir gourdes-miner && cd gourdes-miner
for f in run.py gminer.py msolver.py keccak.cl config.example.json GourdesMiner.abi.json requirements.txt SHA256SUMS; do curl -fsSO https://gourdes.finance/miner/$f; done
sha256sum -c --ignore-missing SHA256SUMSEvery line must end in OK. The hashes in SHA256SUMS are the ones in the table above.
2. Install the Python packages
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt3. Find your devices and test the solver
NVIDIA cards:
nvidia-smi --query-gpu=uuid,name --format=csv,noheader
CUDA_VISIBLE_DEVICES=GPU-your-full-uuid .venv/bin/python gminer.py --bench 10The first command prints each card's full uuid (GPU- followed by 32 hex digits in five groups). The second prints the hash rate of that card. The client takes NVIDIA cards by full uuid only and never by index.
Any graphics card, any vendor:
.venv/bin/python gminer.py --list
.venv/bin/python gminer.py --opencl-device 0:0 --bench 10--list prints every OpenCL device as PLATFORM:DEVICE, for example 0:0 GPU Radeon RX 7900 XTX. Pass that pair to --opencl-device. If --list prints nothing, the graphics driver's OpenCL part is not installed; you can still mine on the processor.
4. Write the config
cp config.example.json config.jsonEdit config.json. Every value in it is a safety pin: the client refuses to start, or stops, when the node disagrees with it.
| Key | Value |
|---|---|
chain_id | 8453 (Base). Already set. |
contract | The miner contract: 0xdfaBce24c8C1fbEc42327fb336A229606810b497 |
token | The $GOURDES coin on Base: 0xB614b287dA2BD9574181cF9CCA8D049d26AF22d0 |
contract_code_hash, token_code_hash | keccak256 of the code deployed at each address. Compute both with the command below. |
abi_file | GourdesMiner.abi.json. Already set. |
rpc2 | Optional second Base endpoint from a different operator, or null. |
gas_caps | The most gas one transaction may use: 200,000 for a solution. Already set. |
max_native_per_hour_wei, max_native_per_day_wei | The most ETH the client may spend on gas: 0.01 per hour and 0.05 per day as shipped. |
A code hash is keccak256 of what eth_getCode returns for the address. Run this once for the miner contract and once for the coin:
.venv/bin/python -c "import sys; from web3 import Web3; w = Web3(Web3.HTTPProvider(sys.argv[1])); print('0x' + bytes(Web3.keccak(w.eth.get_code(Web3.to_checksum_address(sys.argv[2])))).hex())" https://mainnet.base.org 0xdfaBce24c8C1fbEc42327fb336A229606810b497
.venv/bin/python -c "import sys; from web3 import Web3; w = Web3(Web3.HTTPProvider(sys.argv[1])); print('0x' + bytes(Web3.keccak(w.eth.get_code(Web3.to_checksum_address(sys.argv[2])))).hex())" https://mainnet.base.org 0xB614b287dA2BD9574181cF9CCA8D049d26AF22d0Each command prints 0x followed by 64 hex digits. Write the two results into the config. The zero addresses and zero hashes of the template are placeholders, and the client refuses them.
5. Dry run
.venv/bin/python run.py --rpc https://mainnet.base.org --config config.json --gpu-uuid GPU-your-full-uuid --sender 0xYourMiningAddressPick the devices with any mix of these options:
--gpu-uuid GPU-uuid-one,GPU-uuid-two: one or more NVIDIA cards, full uuids separated by commas.--opencl-device 0:0 --opencl-device 1:0: any OpenCL graphics card fromgminer.py --list, repeated for each one.--cpu-threads 4: that many processor threads. With no graphics card at all, use this option alone.
All devices search the same puzzle together and the first valid solution wins, so adding devices adds their speed. The log lists every device it started. Without --send the client only prints the solutions it finds and sends nothing. Use this to check the config, the node and the card. Addresses must be written with their checksum capitals, as wallets and explorers show them. The client mines at any hour by default. To keep the card idle at set times, pass a window, for example --hours mon-fri:19:00-08:00,sat-sun:00:00-24:00 --tz Europe/Paris; times are read in the --tz zone, which defaults to America/New_York.
6. Mine
install -m 700 -d keys
( umask 077; nano keys/hot.key )
.venv/bin/python run.py --rpc https://mainnet.base.org --config config.json --gpu-uuid GPU-your-full-uuid --send --keyfile keys/hot.key --no-profit-gateUse the same device options as in the dry run: replace --gpu-uuid ... with --opencl-device ..., --cpu-threads N or a mix of them.
keys/hot.keyholds the mining wallet's private key as hex and nothing else. The client refuses a key file that is not mode 600 or that sits in a directory other users can write to.--sendneeds either a price or--no-profit-gate. With--price-wei-per-gourde N(wei of ETH that one whole coin is worth) the client skips a send when its gas would cost more than a quarter of the reward's value.--no-profit-gateswitches that rule off.--forward-to 0xYourOwnWalletmoves the mined coins to another wallet of yours after every 10 accepted solutions, so little stays next to the key on the mining machine.- To stop, create a file named
STOPnext torun.py(touch STOP). The client also writes that file itself when a safety limit trips, and it will not start again until you delete the file. .venv/bin/python run.py --helplists every option.
Getting ETH on Base for gas
- From an exchange: buy ETH on an exchange that lets you withdraw on the Base network, and withdraw it to your mining address with Base chosen as the network. Check the network twice: a withdrawal on another network will not show up on Base.
- From another chain: if you already hold ETH on Ethereum or another chain, move it to Base with a bridge, to your mining address.
- How much: very little. On 2 December 2026 the Base gas price was about 0.006 gwei, so one solution of about 75,000 gas cost about 0.0000005 ETH plus a small Ethereum data fee. At that price 0.001 ETH pays for more than a thousand solutions. Fees rise when Base is busy, which is why the client caps them (below).
- Check the balance on the Base explorer before you start. With an empty wallet the dry run works but
--sendcannot pay for its first solution.
Gas
- Every solution is one transaction on Base and pays its gas in ETH, whether it is accepted or not.
- On our test chain a solution used about 74,700 gas, and 160,200 for the very first solution on a fresh contract. The shipped cap is 200,000 gas per solution. The client does not send a transaction whose estimate is above the cap.
- The client never pays more than
--max-fee-gweiper unit of gas, 5 gwei unless you change it. At that ceiling the worst case is 200,000 x 5 gwei = 0.001 ETH for one solution. - Before sending, the client checks the solution against the contract's current target. After 3 failed or unconfirmed sends in a row it stops and writes the
STOPfile. - Exit codes: 0 stopped cleanly or mining finished, 1 crash or node unreachable at start, 2 bad config or arguments, 3 a safety limit tripped.
Facts for programs
- Chain: Base, chain id 8453. Contract name:
GourdesMiner. Miner contract address:0xdfaBce24c8C1fbEc42327fb336A229606810b497. - Valid solution:
keccak256(abi.encodePacked(challenge, sender, nonce)) <= effectiveTarget(), withchallengebytes32,senderthe 20 byte address that sends the transaction,nonceuint256. The hashed message is 84 bytes. - Submit with
mine(uint256 nonce). One accepted solution per block. Reward:currentReward(), 475 coins in the first era, halving every 525,600 solutions. - Miner files:
https://gourdes.finance/miner/SHA256SUMSlists every file with its sha256.
The miner contract, for builders
Everything a miner program needs is public on the contract:
| Function | What it does |
|---|---|
mine(uint256 nonce) | Submits a solution. The reward goes to the sender. |
challenge() | The current puzzle seed. |
effectiveTarget() | The target a solution is judged against right now, including any easing. |
target() | The base target set by the last retarget. |
currentReward() | What the next solution earns. |
digestFor(address, uint256) | The hash mine would compute for that address and nonce, for checking a hit before sending it. |
solutionCount(), totalMined() | Solutions accepted and coins minted so far. |
started() | Whether mining is open. |
The contract emits Mined for every accepted solution, Retargeted when the difficulty moves and MiningStarted once, at launch. It has no owner, and every parameter is fixed when it is deployed.
The full mining spec has the exact formulas, a real test vector, the parameters read from Base, event topics, error selectors, the ABI and how a pool fits the address-bound hash.