Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mroth/momocode
:peach: Visual fingerprinting for 20-byte Ethereum addresses via emoji
https://github.com/mroth/momocode
emoji ethereum solidity visual-hash
Last synced: about 1 month ago
JSON representation
:peach: Visual fingerprinting for 20-byte Ethereum addresses via emoji
- Host: GitHub
- URL: https://github.com/mroth/momocode
- Owner: mroth
- Created: 2018-03-02T22:40:09.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-21T12:05:53.000Z (over 4 years ago)
- Last Synced: 2024-06-20T12:36:18.658Z (6 months ago)
- Topics: emoji, ethereum, solidity, visual-hash
- Language: Solidity
- Homepage:
- Size: 27.3 KB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MomoCode π
This proof-of-concept exhibits a representative visual fingerprint for a 20-byte
address, such as those found on the Ethereum network, by using Emoji Unicode
glyphs. The representation is designed to be easily visually distinguished by a
human, using commonly supported and visually distinct symbols, that can be
easily transmitted without having to rely on image generation/storage/serving.For example, `0x627306090abab3a6e1400e9345bc60c78a8bef57` can be more visually
distinctly represented as:π‘π²ππ±π²
π±πͺπππ¬
π·ππ±π³π
πΎπππ¨πNote by design this encoding provides no [avalanching][1], e.g. a small change
in the input hash will result in an equivalently small change to the visual
representation, so if your goal in visual fingerprinting is to provide robust
_change detection_ for the end-user, then you must be sure to hash the input
first. (For convenience, the included libraries have built-in optional hashing
functions that can do this for you.)[1]: https://en.wikipedia.org/wiki/Avalanche_effect
## Libraries
### [Solidity](solidity/)
All encoding operations are `pure` functions written in inline assembly, for low
execution gas costs (or zero cost when called locally). For docs, see natspec
documentation in the source files themselves.### [Go](go/)
See the [godocs](https://godoc.org/github.com/mroth/momocode/go).
## Visual Representation
When displaying visually to a user, I recommend splitting the string into a 4x5
grid via linebreaks, as the rectangular format makes it easier to visually parse
for differences even faster.The Go library contains a `Grid()` function to do this for you.
## Future Work
- Replace the 256 4-byte emoji with hand-picked choices optimized for visual
distinction and compatibility.
- Flesh out a JavaScript library so people can do equivalent stuff client side
in the browser if desired.## Prior Art
This is not a new idea by any means, just adapting it to Ethereum addresses. See
for example:1. ["Visualizing hex dumps with Unicode Emoji"](http://www.windytan.com/2014/10/visualizing-hex-bytes-with-unicode-emoji.html) by Oona RΓ€isΓ€nen
2. [baseπ―](https://github.com/AdamNiederer/base100) authored by Adam Niederer