About the Employee ID Badge NFT

The Cigarettes Token
6 min readJul 28, 2023
A sample badge

Editor’s Note: The NFT has been deployed to 0xED9a438bD8E2F0e3F0Feb4DD397cBA4274609DBe.

Employee ID badges are NFTs that are issued for those who have deposited
Stogies into the New Cigarette Factory. Each NFT has a unique Employee ID that you can put on to your Twitter / Discord profile.

Badges are 100% onchain, and combine the following contracts to generate and render their metadata:

- 0xe91eb909203c8c8cad61f86fc44edee9023bda4d “Punk Blocks”. A contract for storing PNG files of individual punk traits onchain. Categorized in layers, and rendering the layers according to a configuration.

- 0xc55C7913BE9E9748FF10a4A7af86A5Af25C46047 “Punk Identicons”. A contract that contains a “punk picking function”. it picks the traits from a pool of “Punk Blocks” based on an Ethereum address, and configurable probabilities.

- 0x4872BC4a6B29E8141868C3Fe0d4aeE70E9eA6735 “Barcode in Solidity”. A contract that can generate Code-128C barcodes from a number and output as SVG.

The “Punk Blocks” and “Punk Identicons” contracts are used to draw a custom punk picture based on an Ethereum address. The “Barcode in Solidity” contract is used to draw a barcode at the bottom of the picture, and this is a real barcode that stores the Employee ID. The badge artwork was designed and drawn piv.eth. Additional “Factory Employee” punk attributes were drawn by Mr.1/Employee 20, a community member of the Cig Token project.

In all, there are 51 new attributes, which includes 34 new types. The
probabilities of the new types are fairly evenly distributed, which ensures that punks will be picked with a higher count of traits on average. Therefore, there might be be some very weird punk pictures generated, and it was impossible to check all the possible combinations before deploying this contract.

The spritesheet used to generate the pictures for the badge.

TERMINOLOGY

Stogies: An ERC20 token that wraps the CIG/ETH SushiSwap Liquidity Pool (SLP) token, for meme-ability and ease of use. Each Stogie represents a share of the ETH & CIG reserves stored at 0x22b15c7ee1186a7c7cffb2d942e20fc228f6e4ed. To work out how much is a Stogie worth, add the values of ETH and CIG in the pool, and divide them by the total supply of the SLP token. For example, if there are $100 worth of CIG and $100 worth of ETH in the pool, and the total supply of the SLP token is 1000, then each token would be worth (100+100)/1000 = 0.2, or 20 cents. Note that the SLP tokens do not have a capped supply and new tokens can be minted by anyone, by adding more CIG & ETH to the pool. This means that Stogies are not capped, only limited by the amount of ETH
and CIG that can practically be added to the pool.

Minimum Stogie Deposit: The minimum amount of Stogies required to be deposited in the Cig Factory to mint a badge. This value can be changed by the CEO of CryptoPunks, and is recorded for each badge. The recorded value is used to calculate the “Total Minimum Stogie Deposit” for an account.

Total Minimum Stogie Deposit: The amount of Stogies the account is required to deposit in the Cigarette Factory, depending on the badges they own. For all badges owned by an account, a sum is calculated using the
Minimum Stogie Deposit value of each badge. This sum is the Total Minimum Stogie Deposit.

Primary Badge: In case the address holds multiple badges, a primary badge can be chosen. The primary badge will be the one that the holder chooses to be always associated with their account. If the address has no primary badge set, then the first badge held by the address will be chosen as the primary.

RULES

1. Each account can mint a badge once. With the exceptions: (a) if their badge expired, once their expired badge gets reclaimed, then they can mint again. (b) The badge gets transferred to a fresh account and the “snapshot” function is executed from the fresh account to change the picture.

2. To mint a badge, a minimum amount of stogie deposit in the Cigarette Factory is required.

3. Badges can expire! If you have not deposited a minimum amount of Stogies into the Cigarette Factory, then anybody can call the `expire` function. So, you will need to make sure to always keep a “Total Minimum Stogie Deposit” in the Cigarette Factory, or else badges owned by your account can be expired one-by-one, until the deposit amount is satisfied.

4. Expiration can be initiated by anyone at any time, if the expiration rule (4) is met. If an expiry initiation transaction is successful, the token will be
placed in the `PendingExpiry` state, and moved to the “Expired” account.
Your “Total Minimum Stogie Deposit” will also decrease by the “Minimum
Stogie Deposit” value of that badge.

5. Expiration grace period: After transferring a badge, it cannot be expired for 72 hours. The new owner will have 72 hours to put up a Minimum Stogie Deposit onto the account holding the badges.

6. Reactivating: Badges that are in `PendingExpiry` state for less than 90 days can still be reactivated. Their owner would need to place a minimum
amount of stogies to the Cigarette Factory, and then call the reactivate method. Only the owner can reactivate.

7. Reclaiming: If the NFT has been expired in `PendingExpiry` for more than 90 days, then it can be reclaimed by a fresh account, by calling the
`reclaim` function. The caller must hold a minimum amount of Stogies to
reclaim. “Fresh account” here means that the address reclaiming must not
have minted a badge before. Note that the picture on the badge will change, but the ID won’t change.

8. The supply of the NFT is unlimited. However, since Stogies are required
for minting and holding the NFT, there is an economic scarcity to the NFT.
This means it cannot be minted forever, since CIG and ETH is needed to create Stogies, and both may have limited availability, if demand for any of these is high.

9. Each unique address can only mint a maximum of 1 badge. However, they can hold an unlimited number of badges, minted by other accounts, as long as they have deposited the minimum Stogies into the Cigarette Factory.

10. CEO can change the Global Minimum Value. %2.5 up or down, every 30 days. With the limit that the result of the change must be not higher than 0.01% of Stogies staked supply, and never less than 1 Stogie. The change will not affect existing badges, only new mints or reactivations.

11. The punk picture is chosen randomly based on the address that minted it. There is also a special feature: Addresses starting with 5 or more zeros get a rare type. The more 0’s, the rarer the type!

The list is like this:

zeros = name
5 = Alien 3
6 = Alienette 3
7 = Killer Bot
8 = Killer Botina
9 = Green Alien
10 = Green Alienette
11 = Alien 4
12 = Alienette 4
13 = Alien 5
14 = Alienette 5
15 = Alien 6
16 = Blue Ape
17 = Alienette 6

The more zeros, the harder it is to get. It should be very difficult to get the last few, but maybe impossible to get 16 and 17.

Some “back of the napkin” estimations if you have a GPU:

17 = 26,722 years
16 = 1,670 years
15 = 104 years
14 = 6.5 years
13 = 0.4 years
12 = 1.3 weeks
11 = 14 hours
10 = 0.9 hours

12. Changing the punk picture: It is possible to change the punk picture by transferring the punk to a fresh address that has never minted an ID before, and then calling the `snapshot` method. This method can only be called once per address.

--

--