Updated 662 days ago

Yinbox

Fully integrated messenger with end-to-end encryption. Connect with anyone safely on the blockchain.

  • Crypto / Web3
  • NEAR
  • TRON

Yinbox: Blockchain Integrated Messenger

TRON DAO Forum Post: https://forum.trondao.org/t/yinbox-fully-integrated-messenger-with-end-to-end-encryption/17097

TRON Smart Contract: https://nile.tronscan.org/#/contract/TCTwyCevxNh9edu4kZ88KL8P7F9C1xcGCv

Inspiration

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.

Features

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.

Add-Ons

  • 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 https://nile.tronscan.org/#/contract/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

Screenshots

Yinbox Intro Screenshot

Yinbox Chat Screenshot