In the current web3 phase, we are used to having complex UX for sending funds to anyone. This works for those who have been in the space for a long time (crypto-native) but for those who are not into the space and have no knowledge of tech, missing out on the power they can have using blockchain technology.
We brought you Grandma's Phone to solve this significant mass adoption issue, starting with a minimal but most crucial function: SENDING FUNDS*.
Grandma's Phone is a completely decentralized application where any user can send tokens (for now, USDC Only) to anyone without worrying about the different chains where they have funds.
To send tokens to any address on any chain from any chain.\
The flow:
- The user enters the recipient's address and the token amount.
- The user signs the transaction.
- The recipient receives the funds on the destination chain.
We achieved this great UX using the following:
- Particle Network
- Connect Kit
- https://github.com/0xLPircy/unifi-feb/blob/master/client/app/_components/AccountInfo.tsx
- https://github.com/0xLPircy/unifi-feb/blob/master/client/app/_components/ConnectWallet.tsx
- https://github.com/0xLPircy/unifi-feb/blob/master/client/app/_components/Providers/ParticleAuthProvider.tsx
- Auth Core Modal
- Connect Kit
- Chainlink CCIP
- Covalent
- Unified API
- GoldRush Kit
The flow:
- The user enters the recipient's address and the token amount.
- The backend searches the user's address across all the supported chains and sorts them into an array concerning minimum gas fees and the number of tokens to be sent from each chain.
- The transaction data is created, and the user signs the transaction.
- The array then passes to the
MainContract
contract'ssendAsset
function.
- The array then passes to the
- Then, the
TreasuryCrossChain
contract'ssendAssetsToTreasury
is called.- First, the transaction on the base chain (Avalanche Fuji) is executed, and the funds are transferred to the user's wallet to the Treasury Address on Avalanche.
- Then, a loop is executed where the funds are transferred from the user's wallet to the treasury on each chain present in the initial array.
- At last, the initial amount is sent from the treasury to the recipient's wallet on the destination chain.
Scenario: The user wants to send 600 $USDC to a receiver on Sepolia. User wallet scenario:
- 300 $USDC on Avalanche Fuji
- 150 $USDC on Polygon Mumbai
- 150 $USDC on Ethereum Sepolia
The user inputs the values, the backend creates the transaction data, and the user signs it on the base chain (Avalanche Fuji).
- Transaction initiation and funds transferred to the treasury on the base chain. TxLink
- The Transaction to send funds from User's Wallet to treasury on Mumbai is initiated by CCIP. TxLink
- Funds are sent from User's Wallet to the Treasury on Mumbai. TxLink
- The Transaction to send funds from the User's Wallet to the treasury on Sepolia is initiated by CCIP. TxLink
- The transaction to send the funds from the Treasury to the receiver on Sepolia is initiated by CCIP. TxLink
- Funds are dispatched from the User's Wallet to the Treasury and from the Treasury to the Receiver's Wallet on Sepolia. TxLink