Quick demo video available to show basic operation of minting & burning.
Masquerade is a platform which leverages Chainlink to build NFTs which hide a secret - encrypted information encoded directly into the image. Simply provide an image and your plaintext data and Masquerade will handle the rest, minting you a shiny new NFT with your information safely stored within!
As an NFT, your token is able to be freely transferred and traded. When you want to redeem the information, simply return to the portal and burn the token to unlock the encoded data - delivered by the Masquerade Bot on Telegram.
Visit the Masquerade portal, provide an image file and your plaintext data, then submit. Your request will be sent to the Masquerade External Initiator (masq_ei
), which will construct the Chainlink request payload and trigger the Masquerade External Adapter (masq_ea
). Within this External Adapter, the following process occurs:
- User secret is encrpyted using the Google KMS platform.
- Encrypted buffer is then encoded into the user image via steganography.
- Image is uploaded and pinned to IPFS.
- Metadata is constructed using image IPFS hash and user data, then uploaded and pinned to IPFS.
- Masquerade smart contract is called with metadata hash as tokenUri to mint brand new NFT!
At the end of this process is in control of the new NFT, which can be viewed and traded on Opensea.
When the owner of a token wants to unlock the secrets of their newly gifted/purchased NFT, they can visit the Masquerade redeem portal and initiate the burning process:
- User interacts with the Masquerade Delivery Bot (
masq_tg
) - a Telegram bot which will provide a safe chat ID to receive secrets. - Users goes to the Masquerade web portal and selects the NFT to burn and provides the Telegram chat ID.
- Smart contract calls Chainlink node and initiates the decode function in the Masquerade External Adapter (
masq_ea
). - NFT metadata is parsed and the image is retrieved from IPFS.
- Encrypted message is decoded from image.
- Message is decrpyted using Google KMS.
- Message is sent to user via Telegram Delivery Bot (
masq_tg
) - If successful, IPFS data from token is unpinned.
- Callback to smart contract burns the user token so data can no longer be decoded.
- Chainlink Nodes, External Initiators, External Adapters.
- Data encrpytion using Google KMS platform.
- Image encoding using process of steganography.
- IPFS for image/metadata hosting.
- create-eth-app for front-end.
- NFT smart contracts (ERC721) from OZ.
- Polygon (MATIC) L2.
- Message delivery via Telegram Bot.
- Masquerade Web App - https://masquerade.tech - (
client/react-app
) - Masquerade External Adapter (
masq_ea
) - Masquerade External Initiator (
masq_ei
) - Masquerade Delivery Bot (
masq_tg
)
- Ran into issues when constructing Chainlink ethTx transactions to mint NFTs. Believe it has to do with the bytes32 response having a maximum length. As a temporary measure, implemented ethers.js in the external adapter to provide this functionality.
- Find an alternative message encryption scheme to Google KMS - ideally something which could be shared amongst multiple nodes.
- Redesign architecture to allow for a greater number of nodes to be safely used, currently restricted to a single node.
- More elaborate front-end which could allow users to better manage and graphically customise their NFTs.