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: Yinbox Demo 2023 - YouTube
Smart Contract links: TRONSCAN | TRON BlockChain Explorer | 波场区块链浏览器
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.
- 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.
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.
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.
- 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.
- The offchain database is used to store the encrypted messages and various operations of the application. The database is hosted on MongoDB Atlas.
- 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.
- 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.
- 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.
- 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.
|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.|
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)
Nile Testnet: TP7NRizVSFAo5qkmoGF6EKGfP981qz4PGa
- Project Inception, Planning and Prototyping
- Participate in NEAR Meta Build Hackathon
- Launch proof-of-concept build on NEAR Testnet
- Participate in TRON Grand Hackathon S4
- Ramp up on project development
- Launch pre-beta build on TRON Nile Testnet
- Beta launch on TRON mainnet
- Beta launch on NEAR mainnet
- Production readiness development
- Stable release of TRON and NEAR
- Integration with Ethereum chain
- 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
- 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
- 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