DeFi Sight is a comprehensive risk analysis dashboard designed to empower decentralized finance (DeFi) users. It provides real-time insights into your portfolio, helping you identify and mitigate risks such as potential liquidations, rug pulls, and smart contract vulnerabilities. By connecting your wallet, you get a holistic view of your positions across different protocols, enabling you to make informed decisions and protect your digital assets.
- Risk Dashboard: At-a-glance overview of your portfolio's overall health with a dynamic risk score, liquidation watch, and alerts for high-risk tokens and vulnerable contracts.
- Position Monitoring: In-depth analysis of your lending and borrowing positions, tracking crucial metrics like health factor and liquidation price.
- Token Analyzer: Scan any token contract to detect potential "rug pull" characteristics, including liquidity lock status and holder concentration.
- Smart Contract Scanner: Evaluate smart contracts for security vulnerabilities, audit history, and source code verification status.
- Seamless Wallet Integration: Connect securely with your favorite wallet using WalletConnect & Wagmi to fetch and analyze your live on-chain data.
This project is built with modern web technologies, ensuring a fast, responsive, and reliable user experience.
- Frontend: React
- Build Tool: Vite
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Blockchain Interaction: Wagmi & Viem
- Wallet Connectivity: @reown/appkit (WalletConnect)
- Charting: Recharts
To get a local copy up and running, follow these simple steps.
Make sure you have Node.js and npm installed on your machine.
-
Clone the repository:
git clone <YOUR_GIT_URL> cd akin-tunde-safe-defi-sight
-
Install NPM packages:
npm install
-
Set up environment variables: Create a
.envfile in the root of the project by copying the example file:cp .env.example .env
You will need to add the following keys:
VITE_REOWN_PROJECT_ID: Your Project ID from WalletConnect Cloud.VITE_ETHERSCAN_API_KEY: Your API key from Etherscan (Optional, for enhanced on-chain data).
-
Run the development server:
npm run dev
- / (Dashboard): The main overview page showing the portfolio risk score, liquidation watch, high-risk tokens, and vulnerable contracts.
- /positions: A detailed list of the user's current DeFi positions with risk analysis for each.
- /token-analyzer: A tool to input a token contract address and receive an analysis of its potential risks.
- /contract-scanner: A utility to scan a smart contract address for audits, vulnerabilities, and verification status.
- /alerts: A center for notifications regarding changes in risk levels for the user's positions.
- /settings: A page for managing user preferences (currently a placeholder).