Yinbox - Fully integrated messenger with end-to-end encryption

Project Name: Yinbox

Project Track: Web3

Team Name: Jeffrey Lewis

Team Member(s): jnlewis

Dorahacks Project Link: Yinbox | Buidls | DoraHacks

Project Goal: We want to give people the ability to make connections with anyone on the blockchain, only by knowing their wallet addresses.

Project Website: https://www.yinbox.chat/ (Please note: This alpha version of the application is for testing and development purposes only. The final version may differ significantly in terms of features, appearance, and functionality.)

Github: GitHub - jnlewis/yinbox-contracts

Demo Video: https://youtu.be/_o57UpQCKLk

Smart Contract links: TRONSCAN | TRON BlockChain Explorer | 波场区块链浏览器

Project Info

Yinbox: Blockchain Integrated Messenger


There is a disconnect between people on the blockchain

There is no easy way to reach someone you’ve come across on a blockchain network unless you know them personally or are already connected on a platform like Discord. Whether it’s coming across a wallet address or the owner of an NFT you found on a marketplace that you’d like to talk to.

That’s where Yinbox comes in. We wanted to bridge that gap, and give people the ability to make connections with anyone on the blockchain.

About the Project

Message any wallet address on the blockchain.

Yinbox is the first fully integrated messenger app with end-to-end encryption on TRON, NEAR Protocol and Ethereum. Strike a conversation with anyone on with only their wallet address, link NFTs on the network, send tokens directly in conversations, and engage in a rich and intuitive messaging experience. Just connect your wallet and you’re good to go, no signups required.


End-to-End Encryption

  • Your messages are secured so only you and the person you’re communicating with can read them. No one else in between can see your conversation, not even us at Yinbox.

Real Time Messaging

  • Messages are sent and received in real time with no delays.

Direct Message & Private Groups

  • Send direct messages to a wallet address, or create chat groups and invite multiple wallet addresses into a conversation.

Public Channels (Coming Soon)

  • Create public channels that anyone on the internet can join.


  • Unlocks exciting features and blockchain integrations like linking any NFTs and sending tokens directly in conversations.

Business Model

While we strive to keep the majority of features free so anyone can experience and use Yinbox, we impose a small fee for additional usage in order to sustain the project’s development.

After exhausting free quotas, a small fee is imposed for each private group and public channels created. Direct messages are unlimitedly free.

Add-Ons: In future development, we also want to open up our add-ons capabilities to enable other developers to build their own add-ons and monetize them. We are studying the model of this and are leaning towards commission based fees.

Technical Details

Architecture Overview

We wanted to build a practical application with strong consideration for speed, security and convenience. After rounds of design reviews, we decided to go with a hybrid approach of leveraging both on-chain and off-chain services.

Web Application & APIs

  • The frontend Web Application is developed in React using the NextJS framework. The authentication and core APIs are developed in NodeJS. We have plans to convert the core API to GraphQL to facilitate third-party integrations. These applications are hosted on Vercel.

Real-Time Messaging

  • Ably service is used for maintaining an active connection to enable real-time message transmission in conversations.

Blockchain Smart Contract

  • TRON: The Yinbox TRON Smart Contract is written in Solidity and is responsible for managing conversations creation, quotas and fee collections See Smart Contract for details.

Offchain Database

  • The offchain database is used to store the encrypted messages and various operations of the application. The database is hosted on MongoDB Atlas.

Process Flow

Connect Wallet

  • Users first connect to the chain they want using a wallet provider like TronLink, NearWallet or MetaMask. After connecting, user then signs a message to Yinbox Authentication API, which verifies the authenticity and returns a generated JWT token for access to Yinbox Core API calls.

End-To-End Encryption

  • When starting a conversation, a session key is generated. This session key is unique for each conversation and is shared only with the participants of the conversation. This key is used to encrypt and decrypt messages on the user’s browser.

Conversation Activation

  • All conversations are created on the blockchain. The Yinbox Smart Contract manages the activation, fee collection and quota balances for each type of conversations: Direct Message, Private Groups and Public Channels.

Message Transmission

  • All messages are encrypted on users browser using the conversation session key before they are sent across the network. They remain encrypted even on Yinbox and is only decrypted on the recipient browser.

Smart Contract

Function Access Description
setOwner Owner Write Creates a listing of an NFT token making it available for receiving offers.
setFee Owner Write Cancels a listing. Caller must be the creator of this listing.
setQuota Owner Write Makes an offer for a listing, providing an NFT token as the offer item.
getOwner Public Read Cancels an offer. Caller must be the creator of this offer.
getConversations Public Read Gets all open listings.
getFee Public Read Gets a single listing.
getQuota Public Read Gets all open offers.
createConversation Public Write Accept an offer and executes the exchange transaction.

Contract Interface

getOwner() public view returns (address) 
setOwner(address newOwner) public ownerOnly 
setFee(string memory conversationType, uint256 fee) public ownerOnly 
setQuota(string memory conversationType, uint256 quota) public ownerOnly 
createConversation(string memory conversationType, string memory conversationId) public payable
getConversations(address creator) public view returns (Conversation[] memory) 
getFee(string memory conversationType) public view returns (uint256) 
getQuota(string memory conversationType) public view returns (uint256) 

Contract Hash
Nile Testnet: TP7NRizVSFAo5qkmoGF6EKGfP981qz4PGa

Project Roadmap

Q4 2022

  • Project Inception, Planning and Prototyping
  • Participate in NEAR Meta Build Hackathon
  • Launch proof-of-concept build on NEAR Testnet

Q1 2023

  • Participate in TRON Grand Hackathon S4
  • Ramp up on project development
  • Launch pre-beta build on TRON Nile Testnet

Q2 2023

  • Beta launch on TRON mainnet
  • Beta launch on NEAR mainnet
  • Production readiness development

Q3 2023

  • Stable release of TRON and NEAR
  • Integration with Ethereum chain

Q4 2023

  • Beta launch on Ethereum mainnet
  • Enable developer-created add-ons

TRON Hackathon Season 4

Development highlights since Feb 2023

View Github commits snapshot (26Feb - 10Apr)

Product Uplift and Integration

  • Revamp UX for minimalistic with dark theme
  • TRON integration & Smart Contract development
  • Change/Pivot in business model
  • Uplift landing page and introduce pricing section

Technical Improvements

  • Restructure application to support multichain
  • Migrate to Sockets connections for Real-Time Messaging
  • Implement auto-scrolling on chats for better UX
  • Bug fixes and stability improvements

Feature Development

  • Add-On: Send Tokens on TRON
  • Add-On: Link NFT on TRON
  • Develop different conversation types: Direct Message, Groups
  • Allow renaming conversations
  • Allow viewing conversation participants



This is such an amazing idea and tech by chatting with my friends through through their respective wallet address, honestly am excited already to see how this works out and test it out myself,… please I hope connecting a wallet wouldn’t be any risk or cause any harm or negative to our wallet?


Thanks so much @Nweke-nature1.com for the motivating words. You can safely connect your wallet, but the app is currently only available on TRON Nile Testnet and is not yet completely stable. You may try it out but note that data (like conversation and messages) will be regularly deleted during the development period as this is still an alpha build. We are working hard to bring the app out of alpha and into a more completed version.


Alright thanks for your response and clarification, wish you all the best :handshake:


A lot is happening in this space, this is a unique idea btw welcome to hackathon S4.
@Nweke-nature1.com asked about the risk of connecting your wallet. What measures have you put in place to see to it that scammers do not take advantage of this to steal people’s crypto.

These scammers always learn new things, and can use your platform to steal crypto.


Oh my goodness.
This is one its kind.
So with just wallet address… Connection to socialize can occur ?
Lovely concept… all the best.
Welcome to Tron Hackathon session 4

So newbies using this your project feature can chat with whales… All good.

This bring me to some concerning features like:-

  • What will determine your fees as business model when adding other blockchain ?

  • Dont you think of some security threat, as your Yinbox can be use to some illegal chat that is highly SECURE end-to-end ?


Thank you for the motivating comments @Prince-Onscolo @Gordian . I’ll try to answer your questions as best as I can:


What measures have you put in place to see to it that scammers do not take advantage of this to steal people’s crypto

This is very insightful. Yes, it seems that scammers can reach out to wallet addresses and try to trick people into transferring their assets to them. For this I think the app will have to educate people, perhaps a notice for each conversation with a stranger not to transfer any assets unless they trust the person. Nevertheless, I’ll think this through and find out if there are better ways to prevent scams on the platform.


What will determine your fees as business model when adding other blockchain ?

I hope to keep the fees consistent across different chains, so all chains have around the same pricing in dollars. In the smart conract I have also created an owner only function to adjust fees when necessary, since different tokens will vary in prices overtime.

Dont you think of some security threat, as your Yinbox can be use to some illegal chat that is highly SECURE end-to-end ?

Actually there are many messengers today that support end-to-end encryption, like whatsapp and telegram. We are just following industry standards in this implementation.


oh OK nice, try to add such notices to help people from getting scammed. thank you keep building


Feel good to have your answer this way.


Bienvenido al S4, su proyecto a parte de ser innovador resulta muy interesante.
Mi pregunta, que coste supondrá, para los usuarios el poder chatear en su aplicación.


Web3 messenger is simply the best, but like every messenger app, there’s this common challenge of funding and generation of revenue.

How will Yinbox generate revenue and sustain its operations in the long term?


@antonio Gracias por el comentario y disculpas porque no hablo español, por lo que tuve que usar un traductor. La aplicación es de uso gratuito para todos los mensajes directos a cualquier persona. En el caso de los chats grupales, los primeros 10 son gratuitos y, a partir de entonces, cada chat grupal creado tiene un costo de aproximadamente $0.60. Todos los mensajes dentro de los chats son gratuitos.

English translation: Thanks for the comment and apologies because I don’t speak Spanish, so I had to use a translator. The app is free to use for all direct messages to anyone. For group chats, the first 10 are free, and thereafter each created group chat costs approximately $0.60. All messages within the chats are free.


@manfred_jr Thanks for the comment and question. This is indeed a challenge and we want to keep things as affordable and free whenever possible in order for user adoption and growth. We currently imposed fees for group chats and public channels created (after the free quotas is used up). We are still doing market research to determine if this is feasible in the long run, launching in TRON as beta will help give us some clarity on usage patterns.


This Blockchain Integrated messenger looks amazing. Best Wishes!


I clearly get it now, best wishes on your journey.


Hello team,

Thank you for the elaborate resources on your project.

I wanted to know if anyone can message you with just your wallet address, how will you stop individuals/businesses from spamming you with unwanted and unsolicited messages?

Wish you all the best for the hackathon!


Gracias por la información, me parece perfecto el coste de chat creado, en cuanto al idioma no te preocupes, con los traductores nos comunicamos.


Demo video is now available Yinbox Demo 2023 - YouTube

Please note that the application is still in alpha and is for testing and development purposes only. The final version may differ significantly in terms of features, appearance, and functionality.


Hello Buddy

Kudos to you guys
I have watched, the explanation is okay.
Please, I would love to test and use this
How do I start?

I have few questions

  • How will deleted messages be handled?

  • How do visibility of user wallet address be known,
    Like showing who is online , offline or away?

  • Is it limited to only chat.?
    Audio call or video call. Soon??

Thanks for explanation
All the best to your project


@Hirangi Thanks for the comment. Yes, this is a concern and generally there are a couple of ways to solve this. Automated spam detection, which doesn’t always work as we know. Another way is if we impose fees for direct messages after a certain number. Eg: if after messaging 30 wallet addresses, we ask for a fee for messaging new wallet address. This option could mitigate spam as it would be expensive. For the coming beta we do not have this in order to not scare user away with fees, but in the future we will definitely find ways to prevent or at least reduce spams.