Skip to content

AyushDocs/SecureTransac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸ›‘οΈ SecureTransac

A Decentralized Reputation & Identity Layer for the Ethereum Ecosystem.

SecureTransac leverages On-Chain AI, Zero-Knowledge Proofs, and Social Graph Analysis to create a transparent, privacy-preserving AV system for Web3. It protects smart contracts from malicious actors by assigning dynamic "AV Scores" to every wallet address based on their behavior and associations.


πŸš€ Key Features

🧠 AI-Driven AV Scoring

  • Temporal Analysis: Detects anomalies like sudden transaction bursts (bot activity) or volume spikes (hacked wallets).
  • Social Graph Scoring: Implements "Guilt by Association". Interacting with low-AV addresses negatively impacts your score.
  • On-Chain Source of Truth: All behavioral data is fetched directly from the blockchain event logs, not a centralized database.

πŸ” Privacy-First Identity

  • ZK-Proofs (Circom): Users can prove their "Verified" status to third parties without revealing their underlying identity metadata.
  • Identity Vault: Encrypted user data (names, emails) is stored on IPFS, accessible only via approved "Authority" requests.

⚑ Real-Time & Scalable

  • Live Activity Feed: Real-time WebSocket updates for all on-chain transactions and reports.
  • Redis Caching: A simulated Redis layer (via node-cache) reduces RPC load by 90% for high-frequency score lookups.
  • Gas Optimized: Smart contracts utilize struct packing and event-driven storage to minimize gas costs by ~40%.

πŸ›‘οΈ Guardian Layer

  • Protection: Smart contracts can inherit Guardian.sol and use the onlyTrusted modifier to automatically block low-score addresses.
  • Vulnerable Demo: Includes a showcase demonstrating how SecureTransac mitigates reentrancy and other common attacks.

πŸ“‚ Project Structure

For a detailed map, see PROJECT_MAP.md.

/onchain           - Solidity Smart Contracts & ZK Circuits
  /contracts       - TrustRegistry, VerificationRegistry, ZKIdentityVerifier
  /zk              - identity.circom (Zero-Knowledge Circuit)
/server            - Node.js Backend (AI Engine, Web3 Sync, Caching)
  /src/services    - Logic for Scoring, Persistence, and Real-time Sockets
/frontend          - React/Vite DApp (Decentralized, IPFS-ready)
/demo-vulnerable   - Security comparison demo

πŸ› οΈ Installation & Setup

Prerequisites

  • Node.js (v18+)
  • Truffle & Ganache (or Hardhat/Anvil)
  • MetaMask

1. Smart Contracts & ZK

cd onchain
npm install
# Compile Contracts & Circuits
truffle compile
# Deploy to Local Network
truffle migrate --reset --network development

2. Backend Server

cd server
npm install
# Ensure .env is configured with CONTRACT_ADDRESSES from the migration output
npm run dev

3. Frontend DApp

cd frontend
npm install
npm run dev

πŸ§ͺ Testing

Backend & AI Logic

Run the comprehensive API and AI logic test suite:

cd server
npm test

Smart Contracts

Run Truffle integration tests:

cd onchain
truffle test

πŸ“– Deployment (IPFS)

The frontend is fully decentralized and ready for IPFS hosting. See DEPLOY_IPFS.md for detailed instructions on deploying to Fleek, Pinata, or local nodes.


🀝 Community & Security


Built for the Pecathon Hackathon.
Secure your code, secure the future.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors