OnChain Vision - Open your EYES on chain world

Project Name:

OnChain Vision
Project Track: Web3
Team Name: onchaindev
Team Member(s): @constantinpricope201
Dorahacks Project Link: OnChain Vision | Buidls | DoraHacks
Project Goal: Provide Data Gathering from Blockchain
Project Info:

  1. Github
  2. Twitter

Project Website: Just install the app on Play Store (if you have any issue at all download from Google Drive
Project Test Instructions:

  1. Download the App on Play Store or use the Google drive link OnChainVision
  2. Use a wallet with WalletConnectv2
    2.1. Can use this apk which is the WalletConnect wallet
    2.2. Use a webBrowser wallet with WalletConnect v2 with Tron network support
  3. Open the OnChain Vision app
  4. Chose the Network to connect to
  5. Scan the QR /Copy the link/ Open wallet local on the phone through deeplinks
  6. Confirm in the wallet the connection
  7. Go back to OnChain Vision App
  8. You are now connected :confetti_ball:

Project Details: The project focuses on bringing data from world chain in the user hands meaning mobile dApps that provide analysis and insights into data from blockchains.
Smart Contract links: Whitelisted addresses

  1. Tron Shasta → TRONSCAN | TRON BlockChain Explorer | 波场区块链浏览器
    TTBBQCC511JAqjnxTMf1QaRRnzsUrrb6ef
  2. Tron Mainnet → TRONSCAN | TRON BlockChain Explorer | 波场区块链浏览器
    TDgV8xHg3tZ3EaJ4aZocZ4CbtmJSxchKuQ

Project Milestones:

:triangular_flag_on_post: Reseach
:white_check_mark: Completed

:upside_down_face: Why mobile development ?
Focusing days in creating something that would bring the most value to the community. I ask even the community and receive feedback from you guys (very grateful for those who helped me out). As you might know there are a lot of projects web based (some of them supports mobile browsing) but very little to none around mobile. So the best value that I could bring is develop around mobile(backed also by data Operating System Market Share Worldwide | Statcounter Global Stats).

:face_with_diagonal_mouth: What about existing projects?
There were some project around mobile (even last year in Hackathon3) the best that I could find were:

:woozy_face: What is the best solution ?
Well the best solution depends on what do you need but in my case as I see the things you should have on one side the wallet and on the other the app or dApp that should connect to your Wallet. The single tech solution that I found that does this perfect is WalletConnect. WalletConnect Provides a solution to connect a wallet to and dApp using web socket.

Think that one child is the dApp (which speaks) and the other is the wallet(which listen). You could think that the wire is the WalletConnect.

:thinking: More about WalletConnect v2… What should I know and why?
Well right now WalletConnect is in a migrated process from v1 to v2 which will end by end of June. This is important because a Wallet with v1 cannot connect to a dApp with v2. SO by the end of the June all the Wallets will migrate to v2.

So that’s the summary for my research… With your help I decided to create something similar with GeckoTerminal on mobile. Check also DefiLlama (Tron TVL - DefiLlama) which has support on Tron unlike GeckoTerminal.

:triangular_flag_on_post: Connectivity
:white_check_mark: Completed
WalletConnect Community has developed a sample for wallet and dapp conectivity v2. The code can be found here. These are web based which have TRON integration (based on TronWeb).

On mobile they provided some sample on their official kotlin repo but did not add support for Tron. My goal is not to create a wallet on mobile but I adapt the sample for testing purpose.


That is the wallet. As mention after end of June most wallets will support WalletConnect v2.

the dApp OnChain Vision. The interface is basic providing a network chose in this case support for Tron and Tron Shasta has been implemented. After clicking connect the WalletConnect QR code and the deeplink will be provided for connectivity. Currently multi session is not implemented so it will start again each time.

The connectivity module here ytou have the QR code for conectivity and the deeplink which is

Conectivity aproval on wallet First is in the web based wallet. Second and third in the android wallet on Testnet and Mainnet.

The conection. Please note that at the Unknown is in fact the website which is not applicable.

:bangbang: NOTE: I worked around the clock in order to provide the best value but as was previously done very little work, the workload was quite a lot more that I initially anticipated. Still working around the clock but I also wanted the community input and my apologies to posting so late but I am in full developing mode.

:triangular_flag_on_post: Data Gathering
:white_check_mark: Completed
Will use TronGrid to Gether data from chain. ( Details Below)

Version 2.0.0 - Expected Relese Date on Play Store 20.05.2023
This version will use TRONGRID to gather data from chain :smiling_face_with_three_hearts:

Data read
Balance
Transactions

Work in progress Data 28.04
Added a little nice snackbar which activates when an event occured as Session Rejected by wallet

This is nice we read the account from the Response provided by the Walllet
We added also the bottom navigation Which corresponds to Version 2.0.0


V3.0 Release now we read a predifined list of TRC 20 tokens and have all the transaction. The load is happining once and you then have all the details. All the transactions and addreses can be open directly from the app in a browser to be seen on tronscan for those who likes to see more details. The version is now available on Play Store.


We will adapt the Guest login in v4 so that you could whatch an adrees without WalletConnectv2 so a whatcher mode for the address. In version 4 will add also some predifined pair from DEX which will read the chain for details. :white_check_mark:

The plan is to launch this version by May15.

V4.0 Contract Calls (Only views) Tokens and Transaction on Account Tab (Main Tab)

V5.0 Transaction Sign for payable methods + PAYWALL MONTHLY PAY FORUM UP to 200 https://forms.gle/CB5GiLsQfh1NkUUHA will be whitelisted - Done

A few styling will be added and a few more details about the account This is an MVP at the moment not ready for production.

:triangular_flag_on_post: Data Analysis
:bangbang::negative_squared_cross_mark: Future Milestone will not be implemented during this Hackathon

Arhitecture overview. As you might seem the v5/v4 look more like an explorer but the fact that you can query any contract on TRON in our app offers great advantages for future development.

On the server part we will query all the contract and categorize them in known predifined categories and the rest will be undefined but also can be queried.

Possible categories:

  1. Tokens (TRC20, TRC721,TRC10,…)
  2. Decentralized lending and borrowing
  3. Decentralized exchanges (DEXs)
  4. Decentralized derivatives
  5. Margin trading
  6. Decentralized insurance

:triangular_flag_on_post: Multiplatform IOS
:negative_squared_cross_mark: Future Milestone will not be implemented during this Hackathon

39 Likes

Welcome to this season of Grand hackathon season 4, wish you and your project all the best

9 Likes

Thanks a lot :smiling_face_with_three_hearts: Really appreciate

3 Likes

I decided to open source the code. You could give it a try it is hosted on Github. Or wait for the apk

4 Likes

What do you need to get pools data from a specific DEX (tvl, volume, price,…)?

2 Likes

Bienvenido a este S4, suerte con su proyecto.

4 Likes

It will be pretty heavy work to do that under android so for that my best solution is to use a server to collect that and expose through API and read APIs return data within the app

4 Likes

This will not be implemented during this hackathon and is in data analysis. For this hackathon I will try and use the API provided by TronGrid but I am open to other solutions if you have something in mind. Glad that you ask that as is a core arhitecture in the project

Gracias. This means a lot for me.

Welcome and good to see you back again.

I am a bit lost here, can you break it down in simple terms for us layman.

What are you trying to build for us the community.

Thank you and wishing you the best.

3 Likes

Welcome to Season 4

How will OnChain Vision ensure the accuracy and reliability of the on-chain data it provides to users?

1 Like

Well in simple terms creating an dApp on mobile that tracks data on chains. There are solutions so far that tracks data as geckoterminal and Defillama (which supports also tron) but none are mobile… So am trying to bring this on mobile.

So far all the mobile dApps that have been developed were using internal keys (for wallets) you could say that are kind of smart wallets or wallets that do certain integration. So the soltion is WalletConnect that ensures the connection between a dapp and a wallet (aka TronLink / TrustWallet …). But there was no project done so far (See TRON Wallet Connectivity Options - WalletConnect, TronLink, Bitkeep, etc - #9 by kanit) with walletconnect. So basically now I am the first to my knowledge that will use TRON network.

The goal by the end of the hackathon so far is to have a fully integrated app that is doing basic connectivity.

2 Likes

Let’s take as an example a DEX which has certain transaction on daily basic on a certain pair TRX/USDT as a example. If you want to know what is the total volume traded from the begging to now what you will have to do is go and ask a node all the transactions that has been made by that contract address. After filtering the transactions you could add them up and give the total volume traded. You can do that by having a server that reads data from a node and provides through an API just the total volume traded. So you as a user if you want to know the volume can see it instantly in the mobile app (in the future). So you read data from a node. It works exactly as etherscan or any other explorer works.

Just one more example in order that etherscan to know what ERC20 tokens do you have they behind must go through all the contracts and all those contracts transaction.

That will be an overview!

1 Like

Thank you for the explanation! Can you provide more details on how nodes retrieve data from the blockchain? How do they verify the transactions and ensure that the data they provide is accurate? Also, how is the data processed and made available through an API?

1 Like

Thanks for the clarification, i think I understand what you are trying to build now. Wishing u all the best.

3 Likes

The apk just with the connectivity implementation can be downloaded Google Drive. Just a reminder it uses WalletConnect v2 so you must use a compatible wallet

In fact a node is a miner or a computers that runs a program that ensures that the transaction made are added to the blockchain. Now this miners or nodes keep tracks (usually) of all transcations why? Because from starting point up to now when you make hashes over transaction they should reside in the same hash. This part is explain Blockchain 101 - A Visual Demo - YouTube in this video. If you want to be a miner or a node you should have a history of all transactions. And apart from that through services like infura all this transaction ever made are available to you through an API(usually when you add a new network in Metamask you fill the address where those API are exposed) but you have only the transactions in here. You might be interested in different aspect from those transaction and you could have a server that process and analysis

1 Like

Has anyone tried out the app? I added a little demo video !

1 Like

Please note that Google drive is a link and could be access and installed directly from forum tron dao app . Just one detail install from unknown source must be enabled.

1 Like

I absolutely get it now, thank you

1 Like