My first Smart Contract. The Consensus Token

 


It's a simple coin.  


You mint as many as you want.  You pass them out and when they're all burned, consensus is reached.  Because it's on the Polygon network, fees are cheap and the minimum is 1 Pol which is .25 cents to validate any vote by consensus.  

Simple mechanics... print tokens.  Consensus is met when all are burned.  No questions, no games.  Want to unlock an LP?  Burn all the tokens and you can. 


https://github.com/mikelewis1971/ConsensusCoin


This is the github page... try it out.  It's cheap and useful.  I have to use it to create my next coin so I hope you get a chance to try it out. 


Absolutely — here's your complete, step-by-step ConsensusCoin user tutorial.

This guide covers:

  • ✅ How to mint tokens

  • ✅ How to burn tokens

  • ✅ What consensus means

  • ✅ What users need

  • ✅ What happens behind the scenes


🧠 ConsensusCoin: Complete User Tutorial


🚀 What Is It?

ConsensusCoin is an on-chain tool that lets anyone mint tokens under a unique name, and only when all of those tokens are burned, the name reaches permanent consensus.

Think of it like an irreversible decision mechanism — a one-way finality switch you can’t turn off.


⚙️ What You Need to Use It

  • A Polygon wallet (MetaMask, Coinbase Wallet, etc.)

  • Some POL (Polygon’s native token) to pay the 1 POL minting fee

  • Access to PolygonScan

  • Optionally: a frontend (coming soon)


🔐 What Happens When You Use It

  • You pick a name (e.g. "TRUTH" or "VOTE-1")

  • You choose how many tokens to mint (e.g. 10, 1000000, etc.)

  • You provide a wallet address to receive the tokens

  • You pay 1 POL — always just 1, no matter the amount

  • The contract generates a unique ID using that name + real ETH/BTC prices from Uniswap

  • Those tokens can now only be burned — not transferred, not increased, not revived

  • Once all tokens in that set are burned → consensus is reached

  • That name+salt set is forever locked. No more minting is possible for it.


📝 Step-by-Step: MINT

  1. Visit this page:
    ConsensusCoin on PolygonScan

  2. Scroll to the mint function.

  3. Click Connect to Web3 (MetaMask will pop up, approve connection)

  4. Fill in the inputs:

    • name: "TRUTH" (or any name of your choice)

    • amount: 1000000 (how many tokens to mint — 1 to 100 million)

    • to: your wallet address (where the tokens should go)

  5. Send exactly 1 POL as value
    (That’s what the contract checks for with require(msg.value == 1 ether))

  6. Click Write → approve the transaction in MetaMask.

✅ Done. Your named token set is now live.


🔥 Step-by-Step: BURN

  1. Scroll down to the burn function.

  2. Fill in:

    • name: the same name you used (e.g. "TRUTH")

    • amount: how many of your tokens you want to burn

  3. Click Write → approve the burn in MetaMask

  4. Repeat as needed

Once all minted tokens for that name are burned, the contract will:

  • Automatically record consensusReached for that set

  • Emit an event: Consensus(name, setId)

  • Permanently block new minting for that exact name+salt combo


📈 What You Can Use This For

Use Case Example
Voting Mint 10 votes under "ELECTION-2024", let users burn their vote
Final Agreements Issue 1 million "MERGER-APPROVED" tokens. When they’re gone, it’s done
Rituals / Closures Burn a name like "FORGIVENESS" or "IN-MEMORIAM" — publicly and forever
Proof of Action Mint tokens for "PROMISE-DELIVERED" and burn them to seal it
Public Timestamping Each mint is a snapshot of ETH/BTC prices and a human action

📦 Extras

  • You can call balanceOf(name, address) to see your current balance

  • You can call hasConsensus(name) to see if consensus has been reached

  • Every name+price combo is cryptographically unique — "TRUTH" minted today is not the same as "TRUTH" next week


💰 Who Gets the Fee?

Every 1 POL sent during mint() is automatically forwarded to the creator of the protocol:

0x0F6dbb5B71372aB1d77Ed67D1260083cF9f07476

No middlemen. No treasury. Just a clean creator fee.


🧱 Smart Contract Source

  • View the contract:
    0x501cbA...

  • Verify the logic yourself — it's open source, immutable, and final.


✅ Summary

Action What to do
Mint Call mint(name, amount, to) + send 1 POL
Burn Call burn(name, amount) from the holding wallet
Track Use hasConsensus(name) or view on PolygonScan
Repeat New names → new consensus processes


Popular posts from this blog

Tensors and the Pythagorean Curvature Correction Theorem

The real Pythagorean Law...

Olivia Markham Reports: How an Unlikely Team Redrew Physics in an Abandoned Factory