Skip to content

Phoenix1808/TrustLock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 TrustLock — Trustless Escrow Protocol

TrustLock is a Solidity-based escrow smart contract that enables secure peer-to-peer transactions without relying on trust or intermediaries.

Funds are locked in a smart contract and released only when predefined conditions are met.


🚀 Vision

Online transactions often fail due to lack of trust between parties.
TrustLock replaces trust in people with trust in code by using smart contracts as a neutral escrow.


🧠 How It Works

  1. Buyer creates an escrow and deposits ETH
  2. Funds are locked in the smart contract
  3. Seller marks work as completed
  4. Buyer releases funds if satisfied
  5. Smart contract transfers ETH to seller

If buyer becomes inactive, timeout protection allows seller to claim funds.
If conflict occurs, an arbitrator can resolve the dispute.


✨ Features

  • Escrow-based ETH locking
  • Buyer-controlled fund release
  • Refund option
  • Timeout protection for sellers
  • Dispute resolution system
  • Arbitrator-based conflict handling
  • On-chain state tracking

🏗 Tech Stack

  • Solidity
  • Hardhat
  • Ethers.js

🎯 Purpose

This project was built to explore:

  • Smart contract design
  • Escrow logic
  • Time-based conditions
  • Dispute resolution mechanisms
  • Role-based permissions in Solidity

📌 Note

TrustLock is a learning-focused prototype and not production-ready.
It demonstrates core escrow mechanics in decentralized systems.

Commands to run & test

  1. npx hardhat compile
  2. npx hardhat node
  3. npx hardhat run scripts/deploy.cjs --network localhost (Deployment and the local contract address will be tabulated)
  4. npx hardhat run scripts/interact.cjs --network localhost (For basic process)
  5. npx hardhat run scripts/disputetest.cjs --network localhost (For Dispute Events)

👨‍💻 Author

Divyansh Goyal

About

TrustLock is a Solidity-based escrow smart contract that enables secure peer-to-peer transactions without relying on trust or intermediaries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors