# Getting Educated!

*The solution to the puzzle hidden in a MoonCat Accessory*

By [Midnight Realm](https://paragraph.com/@midnightlightning) · 2026-02-02

blockchain, ethereum, mooncatrescue, nft, puzzle

---

I created [Accessory number 572](https://mooncatrescue.com/accessories/572), back in [July of 2021](https://x.com/midnight426/status/1414594350923800581), and as part of the design of the Accessory, put a puzzle to be solved.

Several years have passed now, and it was great fun for me to see people attempt it over the years. In the end, two MoonCats and their owners solved the puzzle, and they'll be the only two to ever wear that Accessory: [Whiskers (MoonCat #39)](https://mooncatrescue.com/mooncats/39) and [MoonCat #5997](https://mooncatrescue.com/mooncats/5997). Congratulations you two!

The door for further guesses is now closed, so let's take a trip through discovering the solution to this puzzle:

The description of the Accessory indicates:

> Trying to work through a complicated process? Sometimes the best way to get it out is to draw it on the wall! But can you figure out this accessory's puzzle...?

Many people submitted guesses related to what was visible on the blackboard next to the MoonCat (a rocket, and a route indicating a slingshot maneuver around a planet). But that illustration is not the "drawing on the wall" the description refers to.

I followed up with a hint in January of 2022 to indicate the obvious/visible writing on the board wasn't it, but there was some other message written on the board.

[![User Avatar](https://storage.googleapis.com/papyrus_images/1e2fe37cdc6dbdd266582a5a8552e793c868dc09d2033d9b02b4dec5eca433e6.jpg)](https://twitter.com/midnight426)

[Brooks Boyd | 1289.ismymooncat.eth](https://twitter.com/midnight426)

[@midnight426](https://twitter.com/midnight426)

[](https://twitter.com/midnight426/status/1483182635627139077)

Accessory #572 has:  
  
\- An obvious message on the board (ship + planet)  
\- A secret message written ON the board  
\- A "red herring" secret message written OFF the board  
  
Nobody has yet messaged me the correct answer for either secret message...

[![User Avatar](https://storage.googleapis.com/papyrus_images/1e2fe37cdc6dbdd266582a5a8552e793c868dc09d2033d9b02b4dec5eca433e6.jpg)](https://twitter.com/midnight426)

[Brooks Boyd | 1289.ismymooncat.eth](https://twitter.com/midnight426)

[@midnight426](https://twitter.com/midnight426)

[](https://twitter.com/midnight426/status/1414594350923800581)

MoonCats can now acquire accessories to deck out their appearance, and there's several accessories you can buy, and some you can earn through other ways.  
  
How about solving a puzzle to earn the accessory...? ![🎓](https://abs-0.twimg.com/emoji/v2/72x72/1f393.png)  
  
[boutique.mooncat.community/a/572](https://t.co/1Z4sC864pH)

![](https://storage.googleapis.com/papyrus_images/fe7cb3c2875664246704f297921de356f997750cad3806299868287ade6b9c3c.png)

[3](https://twitter.com/midnight426/status/1483182635627139077)[

3:01 PM • Jan 17, 2022

](https://twitter.com/midnight426/status/1483182635627139077)

The key realization to solve this puzzle is that the puzzle message is written on the other half of the blackboard, **_behind the MoonCat's head_**. This Accessory is a "background" accessory, which means it gets layered behind the MoonCat when rendered, but when Accessory designers create a background accessory, they can fill in the content behind the MoonCat (which is good for supporting other MoonCat poses, which expose different areas of the background).

So the trick to even see the puzzle message is to figure out **_how to get an image of the Accessory, without a MoonCat over the top of it_**. The typical ways an Accessory is shown is it's always with a MoonCat flattened as a PNG so there's no layers to hide or show. The [Photobooth tool](https://mooncatrescue.com/mooncats/1289#photobooth) allows any user to turn on and off Accessory layers, but not turn off the MoonCat visibility itself. So to get at this data, you'd have to learn a bit more about how Accessories work.

As part of the creation of the MoonCatRescue Accessories functionality, the organizing team created some parsing scripts to interact with Accessories, and that got published as the `libmooncat` library. Within that library, [the](https://gitlab.com/ponderware/libmooncat/-/tree/master/dist-js?ref_type=heads#generateimage) `generateImage` [function](https://gitlab.com/ponderware/libmooncat/-/tree/master/dist-js?ref_type=heads#generateimage) has the ability to show any MoonCat with any accessory (even accessories they don't own), and it has an option called `noCat`, to enable rendering just the accessory, without the MoonCat. That's one way to get at the Accessory without a MoonCat, but it's decently technical to utilize.

Another option is the MoonCatRescue team [created several helper contracts](https://mooncatrescue.com/log/onchain) to make the on-chain data about MoonCats easier to parse by humans. One of those contracts is the `MoonCatAccessoryImages` that is [deployed to](https://etherscan.io/address/0x91CF36c92fEb5c11D3F5fe3e8b9e212f7472Ec14#readContract) `0x91CF36c92fEb5c11D3F5fe3e8b9e212f7472Ec14`. It has several functions that allow generating SVGs of MoonCats with their owned Accessories, but that wouldn't have helped you at the beginning of this puzzle, since no MoonCat owned the puzzle accessory yet. But it also has the function accessoryPNG that does help in this situation.

![](https://storage.googleapis.com/papyrus_images/7e87a1546959f09211973bc63106a23740879eb7528255dc5058efbbfaafbaeb.png)

That function asks for a MoonCat's rescue order as one of the input arguments, but it doesn't use that MoonCat's identifier to draw the MoonCat. Instead it uses that MoonCat's color to alter the colors of the Accessory (if the Accessory uses color-shifting colors, which this Accessory does).

Running that function in a tool like Etherscan results in a string being output that starts with "data:image/png;base64". That doesn't look like an image, so how do we see the output? That prefix indicates that this data is a [Data URL](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data), which encodes the PNG image data in a base-64-encoded manner. There's several online tools that can convert a Data URL into an image for you. And if you do that conversion, you end up with a PNG that looks like:

![](https://storage.googleapis.com/papyrus_images/a761e672cca3b7614945eebd87d48f2d944deb8774306fa3a604ee3f1cbc669a.png)

Well, would you look at that; there's something else on the board! Though you may note that this image appears flipped horizontally compared to the image sample. Why is that? If you dig into the raw data that gets stored for each Accessory on-chain, it is PNG-formatted data and it's always encoded for how it appears for a left-facing MoonCat. For Accessories that change their appearance for a right-facing MoonCat, the alternate view isn't stored on-chain. Instead, all the tools that do the assembling of the accessory layers with a MoonCat do the transformation themselves.

Knowing that I presented the puzzle on a right-facing MoonCat, let's zoom in on that drawing and flip it so it's how it would show for a right-facing MoonCat:

![](https://storage.googleapis.com/papyrus_images/32331497f8355ffbcf96d30438a0293f6dfa4d394f4fdceb0c95d99793ef0475.png)

Knowing how the green color is acting as "the board" means the yellow and brown colors would be the "writing on it". And treating the horizontal bands of green color as "blank areas of the board' that makes it look like a few lines of text, in 3x12 pixel chunks. If those three regions are text, how do we discern the letters? With only three pixels of height, that's not a lot of room to make letter shapes. So, that's not how I encoded the letters.

Looking at each "line" of text, there's some vertical slices in each region that have only the green background color, similar to how spaces would appear between each word. And indeed, I did make each vertical slice of three pixels one character in the final message, with solid green slices as spaces between words. But then how to convert colors to letters?

The answer is, this message is encoded with a ternary numbering system. You're likely already familiar with decimal (base-ten) numbers, and if you've dealt with computers at all, you've likely heard of binary (base-two) and hexadecimal (base-sixteen). Ternary is base-three, so uses the digits 0, 1, and 2. Encoding the english alphabet into ternary would then be:

*   A = 1 (decimal): 001 in ternary
    
*   B = 2: 002
    
*   C = 3: 010
    
*   D = 4: 011
    
*   E = 5: 012
    
*   F = 6: 020
    
*   G = 7: 021
    
*   ...
    
*   Y = 25: 221
    
*   Z = 26: 222
    

Notably, it only takes three digits of ternary to represent all 26 english alphabet characters. If binary were used, then 26 would be represented as "11010"; it would need five digits to represent all the letters, which would take up more space.

Using five "digits" to encode letters with two varying values ("zero" and "one" or some other "A" and "B" distinct values) is sometimes referred to as [Bacon's cipher](https://en.wikipedia.org/wiki/Bacon%27s_cipher), and so the method used in this puzzle of using three colors to represent letters is a "ternary Bacon" cipher. I had given the hint that the TORCHED H34R7S artwork was an inspiration for this one, and that puzzle used sixteen different types of flames around the border to encode the hidden values. Mine was more simple with only three color variants.

[![User Avatar](https://storage.googleapis.com/papyrus_images/1e2fe37cdc6dbdd266582a5a8552e793c868dc09d2033d9b02b4dec5eca433e6.jpg)](https://twitter.com/midnight426)

[Brooks Boyd | 1289.ismymooncat.eth](https://twitter.com/midnight426)

[@midnight426](https://twitter.com/midnight426)

[](https://twitter.com/midnight426/status/1414929029694689281)

If you're interested in this sort of puzzle, you might be interested in reading the history of the "TORCHED H34R7S" artwork; a puzzle that took community members almost three years to solve!  
  
Mine's not quite as complex as that one, but it was definitely inspiration for mine!

[4](https://twitter.com/midnight426/status/1414929029694689281)[

7:45 AM • Jul 13, 2021

](https://twitter.com/midnight426/status/1414929029694689281)

For this puzzle, green is "zero", yellow is "one", and brown is "two". That leads to:

![](https://storage.googleapis.com/papyrus_images/07f8cd18569c850d3d636fb4e9fbf5e21fb6dd1429b442283e518740a2ccc9e4.png)

Reading each slice of three pixels vertically, left-to-right, top-to-bottom, we get:

201, 120, 000, 110, 120, 112, 021, 000, 001, 112, 011, 000, 202, 022, 001, 112, 102, 201, 000, 020, 120, 200, 000, 000, 001, 110, 110, 000, 202, 022, 012, 000, 202, 210, 112, 001

Converting those from ternary to binary, that becomes:

19, 15, 0, 12, 15, 14, 7, 0, 1, 14, 4, 0, 20, 8, 1, 14, 11, 19, 0, 6, 15, 18, 0, 0, 1, 12, 12, 0, 20, 8, 5, 0, 20, 21, 14, 1

Changing each of those numbers into [the letter at that position in the alphabet](https://www.dcode.fr/letter-number-cipher) (zero is a space) gives:

**_SO LONG AND THANKS FOR ALL THE TUNA_**

And that is the secret phrase that I was looking for people to message me! Don't worry, it's not an actual farewell from me (I'm still in this for the long haul!) but rather it's an homage to one of my favorite book series, _The Hitchhiker's Guide to the Galaxy_ 🐬, slightly modified to be more MoonCat-related, always chasing that space tuna!

* * *

Huzzah! So now you know the secret. I had lots of fun creating this puzzle, and I hope you had fun working on it! You can no longer earn the puzzle accessory itself, but if you made it this far in the article and now understand what a "Ternary Bacon Cipher" is, drop me a comment indicating "I learned something!" and I'll make your favorite MoonCat eligible to claim the ["I learned something!" accessory](https://mooncatrescue.com/accessories/570) (the square academic cap that my MoonCat is wearing in the original puzzle image) 🎓 as a memento.

And if you're itching to try out your newly-formed Ternary Bacon skills, you might now enjoy giving [this THREE little pigs puzzle](https://puzzling.stackexchange.com/questions/25214/the-three-little-pigs-are-hiding-something) a try (it was also an inspiration for my puzzle, though I didn't give that hint publicly as I thought it might have been too obvious).

---

*Originally published on [Midnight Realm](https://paragraph.com/@midnightlightning/getting-educated)*
