Skip to content

USDC native mobile wallet with cross chain transfer, liquidity lending and investment

Notifications You must be signed in to change notification settings

jefedcreator/synergy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

synergy

Synergy Demo

🌞 Base onchain summer

This project was built during the Base onchain summer hackathon.

💰 Tracks

synergy is applicable to the following tracks:

  • Coinbase Account Abstraction prize: we developed a native wallet that leverages AA (ERC-4337) to simplify the experience of sending, receiving and borrowing USDC tokens;
  • Sythethix Trading Prize: for allowing users to trade USDC tokens seamlessly by using their email address or Google account.
  • Aerodrome Trading Prize: for allowing users to swap and invest USDC tokens seamlessly by using their email address or Google account.

⚒️ synergy features

synergy is a USDC native wallet; this means that everything is built around USDC tokens: transfers, deposits, withdrawals, borrows. It allows users to create a new Smart Wallet by using their email address or Google account. Once the account is created, a custom Smart Account contract is created in order to automatically swap between received DAI or USDT tokens into USDC.

All the transactions are made leveraging the ERC-4337 Account Abstraction standard using the Thirdweb paymaster

Every time a user receives USDT, USDC or DAI, the remainder rounded to nearest dollar (eg. you receive $1.30, $0.30 will be set aside) is sent to:

  • AAVE Lending Contracts in the case of USDT or DAI. The rest (eg. $1) is automatically swapped to USDC (on Sepolia using a Mock Aerodrome Router) and sent to the user's Smart Account. Here these tokens maybe used by the user in the future to borrow some USDT, or they can leave them there to accrue some interest;
  • USDC Vault in the case of USDC. The rest (eg. $1) is sent to the user's Smart Account. The tokens inside the USDC Vault are then used as liquidity provider into a USDC/USDT Aerodrome pool.

In addition to this, when a synergy user wants to send USDC tokens to another user and the sender doesn't have enough USDC tokens in their Smart Account, the app will automatically borrow the required amount from the AAVE Lending Contracts to match the amount and send it to the recipient.

🔗 synergy contract addresses:

💻 Tech Stack

synergy contracts is built using Aerodrome contracts, Synthetix,Openzeppelin, Chainlink Automation, Chainlink CCIP and Thirdweb Abstracted Account factory. with react native for the mobile app

📱 App features

synergy wallet allows users to:

  • Create a Smart Wallet using their email address or Google account that can be exported to any Ethereum wallet via the private key;
  • Seamlessly transfer USDC tokens to other users using their synergy username;
  • View their total Pocket balance (USDC Vault Balance + AAVE Lending Balance);
  • Deposit or withdraw USDC tokens from the USDC Vault;
  • Borrow or repay USDC tokens from the AAVE Protocol.

📦 Run locally

In order to run the app locally, you need to execute the following steps:

# Install dependencies
npx expo install

Once the dependencies are installed, you must install the Expo modules and prebuild the app:

# Install Expo modules
npx install-expo-modules@latest
# Prebuild the app
npx expo prebuild

We need to prebuild the app because the Thirdweb SDK uses the Coinbase Wallet SDK that needs the app to be prebuilt in order to work.

Once the app is prebuilt, you can run it locally:

# iOS
yarn ios
# Android
yarn android