Smart Contracts, AI Collab


A ‘CoinTokens’ contract allows back and forth exchange between an ERC-20 and ERC-1155 NFTs that represent integer denominations of that ERC-20. The art for these tokens was made using custom stable diffusion models.

Ser Leo (token #69000420)

ERC-20 <=> ERC-1155 Contract Template


The contract template I wrote can be used for any ERC-20 token, and for user security, ERC-20 contract and ERC-1155 denomination parameters are locked at deployment. The contract has on-chain royalty functions for the ERC-1155s and does not implement any operator filters. Also, there is a customization option built in: it can return ERC-20 ‘change’ leftover from denomination functions or it can lock it permanently to the contract. Any number of integer denominations are supported, always with a tokenID matching the denomination.

$LFG Implementation

This implementation includes 8 denominations that are exchangable for $LFG, as seen in the following list.

These denominations are represented as ERC-1155 NFTs where the tokenID matches the denomination (eg. tokens with ID ‘69420’ can be exhanged for exactly 69,420 $LFG).

Only these 8 denominations can be exchanged for $LFG, but note that there is another token with 0 value: tokenID 0. That token is a 1:1 burner token, received for burning/locking $LFG to the contract. It cannot be exchanged for $LFG.


    • 69
    • 420
    • 9,000
    • 69,420
    • 1,000,000
    • 8,675,309
    • 69,000,420
    • 1,000,000,000

There are no fees for exact exchanges between the ERC-20 and ERC-1155 tokens (other than gas), but any ERC-20 overage amount used in Denominate functions is permanently locked to the contract.

The $LFG CoinTokens

Burner (1:1 burned $LFG, 0 Value)

Theoretical Max: 69,000,000,000

LFG! (69 $LFG)

Theoretical Max: 1,000,000,000

Weed (420 $LFG)

Theoretical Max: 164,285,714

lvl 9000! (9,000 $LFG)

Theoretical Max: 7,666,666

Big Brain (69,420 $LFG)

Theoretical Max: 993,949

LFG Rocket (1,000,000 $LFG)

Theoretical Max: 69,000

Jenny? (8,675,309 $LFG)

Theoretical Max: 7,953

Ser Leo (69,000,420 $LFG)

Theoretical Max: 999

Crown of Crowns (1,000,000,000

$LFG) Theoretical Max: 69

Theoretical Max = $LFG Total supply (69B) / Denomination Amount

Token circulation and locked coins will lower the theoretical max values.

Interacting with the Smart Contract

Owners of the $LFG ERC-20 coin or ERC-1155 tokens can interact with the controlling smart contract on Etherscan or on the project’s dedicated page:

LFG CoinToken FAQ (click to expand)

Can anyone withdraw $LFG held or ‘locked’ by the contract?

The contract should only send $LFG to an account if LFGCoinTokens are liquidated from that account.


Has this contract been audited?

No. While I believe I coded it well to protect from hacks, please consider it a risky experiment with no warranties.


Cost? Fees? Royalties?

There is no cost besides gas, and there are no ‘fees’ charged on ERC-20/ERC-1155 exchanges… But for fun (and to reduce the available supply of $LFG by locking/burning coins) any $LFG overages submitted in denominate functions are locked to the contract. Oh, and the ERC-1155 tokens have 3% royalties payable to artist.MonkMatto.eth.


Rarity? Bonding curve? Reason to FOMO??? (no x 3). Then, why?

For fun and flex I suppose. Also, it’s kinda cool to have truly liquid jpegs, isn’t it? 😛


Where’s the art from?

Matto used Stable Diffusion with custom models to generate a few thousand outputs from dozens of prompts, then curated/tweaked/combined them to create the art. It’s stored on Arweave.


What’s the license on the contract? Can I use it for another coin?

The contract is licensed MIT, so you can go nuts with it. If you want to toss me a tiny bag of whatever ERC-20 you use the contract with, I won’t be upset about it 😀 MonkMatto.eth pls!


Will there be a secondary market for the tokens?

Time will tell, but I’m sure bots will exist someday to bid/buy the tokens automatically as long as they can make a profit by converting the token to ERC-20 and selling it in a single block. So, for larger denominations, a market is likely to exist, yes. Maybe I’ll even be paid some royalties – NOBODY KNOWS, hahahaaa!


What can I do with the burner token?

Not sure yet, but I wouldn’t burn them…


I thought you were a serious artist, wtf are you messing around with shitcoins for?

“If you’re not having fun, you’re doing it wrong.” -Matto