4.1 KiB
Carrotcoin
This project was created to play around with a cryptocurrency and have a bit of fun. Don't take it too seriously.
Basically, carrotcoin works like bitcoin but with many parameters modified like you can see in the following comparison:
| Bitcoin | Carrotcoin | |
|---|---|---|
| avg. block cycle | 10 min. | 5 min. |
| payments per block | ~ 3-6 thousand | at most 1 |
| difficulty adjustment | once after every 2016 blocks | sliding average over the last 10 blocks |
| block reward | initially 50 BTC, regularly halved | 1,00 cc per block, forever |
| decimal places | 8 (1 BTC = 100 million satoshi) | 2 (1 cc = 100 cents) |
Gambling feature
One special feature that distinguishes carrotcoin from bitcoin is the built-in gambling functionality.
A user can place a bet in a 50:50 game of chance. The played amount will either be doubled or lost completely with equal probability. Such games are resolved about once per day so there is a significant waiting time before you know if you won.
Note that no provider for this gambling feature is required. Every user owning money can play against the blockchain. Money that is lost will disappear, money that is won will be created.
Launch day
The carrotcoin blockchain starts on December 20, 2025, at UTC 13:00. Before that, running miners will only waste energy. They already consume CPU power and print some mining statistics (and success messages), but all created blocks are lost.
Getting started
Install one required dependency:
pip install cryptography
Run ./node.py and pass any number of initial peer addresses as commandline arguments.
There is one specific introducer node that you can use to connect your node to the network:
./node.py 2a03:4000:22:250:8bd:fdff:fef3:ee7a
All other actions (like using your wallet or participating in mining) require a locally running node.
Run ./wallet.py to see your wallet address and transactions. Add any invalid commandline argument (like ./wallet.py ?) to see usage information on how to transfer money and how to place a bet.
You can only send one transaction at the same time, then you need to wait until it is part of the blockchain. This is a current limitation of the wallet script.
Participate in the mining process
Because of the gambling feature, there are two ways how you can participate in the mining process.
Classical mining
This is the proof-of-work process creating blocks. Running this process on multiple computers increases the overall reward.
Look inside the miner subdirectory for a reference implementation. A Rust installation is needed to compile the mining software. You can run cargo run --release -- --help to see possible commandline options.
Note that -- is required to separate cargo options from mining options. A typical mining command would look like this:
cargo run --release -- -w <wallet address>
Reveal mining
Gambling bets are resolved in two steps. They are first "committed" which means that it is mathematically defined but not yet known which bets won and which lost. As a second step, this information (wich is essential to pay out winnings) needs to be revealed to make it public knowledge. You can be the one to reveal it.
In contrast to classical mining, using multiple computers does not help with reveal mining, because only the fastest of all participants gets a reward.
Look inside the reveal-miner subdirectory to get started. From there run ./mine.py <wallet address> to start the reveal mining process.
Technical details
See docs/blockchain.md how the blockchain and all kinds of transactions are defined.
See docs/protocol-v0.md to learn about the network protocol, how nodes communicate with each other.