doutv / wallet-unity

https://wallet-unity.vercel.app
Apache License 2.0
0 stars 0 forks source link

Development Process #1

Open doutv opened 10 months ago

doutv commented 10 months ago

https://doutv.notion.site/WalletUnity-6bc37344fe73444185675a5b75ca8e23?pvs=4

WalletUnity

Multi-chain asset consolidation Dapp, manages multi-chain assets, and with one click consolidates them to the designated chain when needed.

Scenario: Assets in user's wallet are scattered across multiple chains.

Features:

Technical architecture: frontend + Solidity smart contract, no backend.

MVP

Connect user's wallet, display USDC amount on Arbitrum, Avalanche, Ethereum, OP Mainnet, and bridge USDC via CCTP.

Supported Chains

Mainnet:

Testnet:

doutv commented 10 months ago

Add support for OP Goerli testnet

I develop WalletUnity based on Circle's cctp-sample-app, which already implemented bridging USDC via CCTP.

cctp-sample-app only support 3 chains for now: ETH, Avalanche, Arbitrum.

I add support for Optimism Goerli, and open a PR to contribute my code: https://github.com/circlefin/cctp-sample-app/pull/21

doutv commented 10 months ago

Display mainstream tokens and calculate the account value in USD

Through Debank API, I can get the total balance of certain account. However, this is a paid API: https://cloud.debank.com/#section-openapi

image

Thus, I decided to use multiple free APIs to obtain the token details and real-time total value of the account:

The token details and total value in USD can be calculated.

Result

Commit: https://github.com/doutv/wallet-unity/commit/ebdfbf9413f0486a39dbe26744b45fe4d941b016

Frontend dashboard

image

doutv commented 10 months ago

Integrate Uniswap Widget for token swap

Since CCTP only bridge USDC, if I want to bridge other tokens, I shall first swap them into USDC.

Integrate Uniswap Widget into my Dapp, so that users can swap tokens without leaving my site.

Implementation

Result

Since Uniswap Widget does not support Avalanche and Arbitrum testnets, I disable swap buttons of them.

image image

doutv commented 10 months ago

Support more tokens

Refactor the code, allowing to add new tokens easily.

image