## The concept There are 5 different bottle shapes each drawn as a Scalable Vector Graphic (SVG). Each bottle shape is broken into many different fragments called shards, and there are different tiers for the bottles based on the number of shards. In Tier 1 each bottle shape has 25 shards In Tier 2 each bottle shape has 50 shards In Tier 3 each bottle shape has 100 shards In Tier 4 each bottle shape ahs 200 shards The collector (you) attempts to build bottles in each tier by coloring in shards with color tokens. Color tokens come in random primary and secondary colors [red, yellow, blue, cyan, magenta, green, black, and white]. Tier 1 color tokens can be obtained at the faucet, and Tier 1color tokens can only color in shards in Tier 1 bottles. A collector completes a bottle by sending their color tokens to the bottle maker contract which burns the color tokens and returns an NFT of your completed bottle. The collector can do whatever they want with their bottle NFT... they can hodl it, they can sell it, they can give it away. Or they can smash it... Smashing a bottle destroys the NFT and returns twice the number of color tokens of the next tier up to the collector. So if you smash a Tier 1 bottle with 25 shards, you will get a 50 Tier 2 color tokens in return. Smashing a Tier 2 bottle returns 100 Tier 3 color tokens and so on. This continues until you get to the Tier 4 bottles which cannot be smashed. There will only ever be 99 Tier 4 bottles minted, and once the cap has been met the bottle maker contract is locked. We don't know how many Tier 1, Tier 2, Tier 3 completed bottle NFTs will exist at that time... ## The art But wait there is more! In order to make the bottles look like bottles not all shards are equal. Bottles have really cool highlights and lowlights that give them tone and depth. Each shard space within each bottle shape within each tier is assigned a grey scale value from 0 (black) to 256 (white). Likewise each individual color token has a grey scale value and you can only apply a color token to a shard space if the grey scale values are within a certain range (we've created grey scale groups to make it easier). In Tier 1 only the basic colors can be applied [red, yellow, blue, cyan, magenta, green, white, black]. But as the collector progresses through the tiers they will need to combine colors to get into the right grey scale group. In Tier 2 there will be some shard spaces that require 2 colors tokens to be combined, in Tier 3 some will require three tokens, and in Tier 4 there are a handful that require the combination of four basic colors. (I know this seems like a lot to keep track of, but don't worry... we've built a calculator that can determine what you can build with what you have and which color tokens you need to complete it) This allows the collector a huge combination of colors to apply to their NFT, but it also maintains the tone and depth of the bottle shapes. Obviously the Tier 4 bottles (with 200 shards) have a lot more detail, but we don't actually know what they will look like! ## The economics Limiting the Tier 4 to only 99 bottles creates a cap on the total number of bottle NFTs that will be generated even through there are unlimited number of shards that can be generated from the faucet. And because the shard spaces on each bottle shape have a specific range of colors some color tokens will be more rare than others. For this reason shards must be purchased at the faucet (to avoid spamming the price of a shard may increase in proportion to demand, and collectors will be limited to buying only 10 shards in a single transaction). The shard color is randomly distributed based on the rarity scale for Tier 1 bottle shapes (see the math section below). When you smash a bottle NFT the color tokens are returned to you in the proportion that you used to build it. So for example if you used two cyan color tokens in a Tier 1 bottle NFT you will get four Tier 2 cyan color tokens in return for smashing it. Because the shards themselves are NFTs you can sell them or trade them to build up the pieces that you want. In order to use the tools on the website please keep your color tokens in one wallet... Building up a bottle of mostly rare color tokens will cost more (and take more time) but will yield more rarity in the later tiers.

99bottles.nft showcase

How it's made

This project combines two sets of token contracts to manage the shards and bottle tokens. The shard (oe color) tokens operate as an 1155 deployed on Polygon. Using polygon allows for a bit larger transactions with more complicated logic at a more reasonable price. The bottle tokens are created on Ethereum, assuming a user has collected enough of the shard tokens and triggered a cross-chain transaction to mint the bottle from Polygon to Ethereum. By using an ERC-1155 there can be many types of shards - 100 red shards, 25 green shards, and 50 red shards. This 1155 contract is also aware of the number of shards of each type required to mint a bottle token. Once a user has enough shards, they trigger a mint bottle transaction. The ERC-1155 contains logic to confirm if a certain set of shards owned by the user matches the requirements of shards needed to create a bottle. Assuming the requirements have been met - a cross-chain transaction is created to mint a bottle with the shards that have been a determined to meet the appropriate bottle criteria. Additionally, the identifiers of the shards are compressed to the smallest size possible and packed into a bytes array in order to fit the shards that make the bottle into the least amount of on-chain data possible. Once the cross-chain transaction is complete and the state is updated on Ethereum, the user can claim their Bottle ERC-721. The shard set used to create the bottle is saved within the ERC-721. The ERC-721 also contains ‘.svg’ templates on-chain that are returned in the tokenURI function. In the tokenURI, the contract inserts the color of each shard into the template SVG in order to return the image of the full bottle.