How to

Build a Money Printer

You can do this on any chain that works with MetaMask

Let’s use Polygon so everyone can play along:

Whichever chain you choose, we start at remix.ethereum.org[1] 

Click the Create New File icon:

Name the file how you like e.g. YourToken

and paste in the following code:

// SPDX-License-Identifier: GLWTPL
pragma solidity ^0.8.0;

import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol';

contract YourToken is ERC20 {
  constructor() ERC20('YourToken', 'YTK') {
    _mint(msg.sender, 1000000 * 10 ** 18);
  }
}

so it looks like this:

Now compile the code:

And then deploy it:

Make sure to select Environment Injected Web3 and have your MetaMask connected to your chain of choice e.g. Polygon

Simply approve the MetaMask popup and wait for your transaction to complete

Congratulations! You're a millionaire 💸

Add your token in MetaMask and enjoy your riches:

But... this isn't a REAL money printer!

OK then add the following function:

// SPDX-License-Identifier: GLWTPL
pragma solidity ^0.8.0;

import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol';

contract YourToken is ERC20 {
  constructor() ERC20('YourToken', 'YTK') {
    _mint(msg.sender, 1000000 * 10 ** 18);
  }

  function moneyprint(address to, uint256 amount) external {
    _mint(to, amount);
  }
}

Hold on... now anyone can print!

Fine... you can keep the power just to yourself:

// SPDX-License-Identifier: GLWTPL
pragma solidity ^0.8.0;

import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol';

contract YourToken is ERC20 {
  address owner;
  constructor() ERC20('YourToken', 'YTK') {
    _mint(msg.sender, 1000000 * 10 ** 18);
    owner = msg.sender;
  }

  function moneyprint(address to, uint256 amount) external {
    require(msg.sender == owner);
    _mint(to, amount);
  }
}

and increase your wealth whenever you like:

Keep in mind the contract uses 18 decimals i.e. to add another million you type  1000000000000000000000000

It's so easy even a 14-year old can do it... and they probably are 👀

You could first try this on a test chain[2][3] or locally by setting your Remix environment to JavaScript VM

And yes there are tools to make this easier...

...but basic knowledge helps you spot scams


Ex-enterprise solution architect who loved implementing financial systems at banks, retail, govs but got fed up with corporate inefficiencies

After founding a mobile gaming studio I discovered the art of performance marketing and how to easily influence human behavior ❤️

Are you building global earning opportunities? Let's do it together: