Blockchain research, smart contract experiments, and Web3 project trials
by Elias Kfoury β Finance Management & Blockchain Expert
"Blockchain made simple. Finance made clear."
Chain Clarity Lab is the open research and development workspace of Elias Kfoury β a Finance Management & Blockchain Expert focused on making blockchain technology accessible, practical, and deployable for businesses, developers, and individuals.
This repository serves as a public lab for:
- π¬ Research experiments β testing blockchain protocols and concepts
- π Smart contract development β building and auditing Solidity contracts
- π DeFi analysis β exploring decentralised finance mechanisms
- π Post-quantum cryptography β preparing blockchain for the quantum era
- π₯ Sector applications β healthcare, supply chain, finance, and charity
- π Code from the Chain Clarity Ebook Series β working implementations
All research in this lab is connected to the Chain Clarity Blockchain in Business Series β a comprehensive ebook collection covering every major application of blockchain technology.
| # | Title | Focus |
|---|---|---|
| 01 | Decoding The Digital Currency Revolution (FREE) | Bitcoin, Ethereum, DeFi, Web3 |
| 02 | Charity & Blockchain | NGOs, transparency, smart donations |
| 03 | Blockchain & Supply Chain | Traceability, eBL, Walmart/Maersk |
| 04 | Blockchain Finance & AI Finance | DeFi, CBDCs, tokenization, AI trading |
| 05 | Healthcare & Blockchain | EHR, drug supply, clinical trials |
| 06 | Blockchain & Quantum | PQC, NIST 2024, quantum-safe crypto |
π Get the full series β chainclarify
chain-clarity-lab/
β
βββ π README.md
βββ π LICENSE
β
βββ π smart-contracts/
β βββ escrow/ β Smart contract escrow implementations
β βββ tokens/ β ERC-20 / ERC-721 token contracts
β βββ defi/ β DeFi protocol experiments
β βββ healthcare/ β Healthcare consent & data contracts
β
βββ π blockchain-demos/
β βββ supply-chain/ β Supply chain tracking demos
β βββ identity/ β Self-sovereign identity experiments
β βββ voting/ β Decentralised governance demos
β
βββ π post-quantum/
β βββ pqc-signatures/ β NIST PQC algorithm implementations
β βββ hybrid-crypto/ β Classical + PQC hybrid approaches
β βββ qkd-simulation/ β Quantum Key Distribution simulation
β
βββ π research/
β βββ whitepapers/ β Research notes and analysis
β βββ case-studies/ β Real-world implementation studies
β βββ market-analysis/ β Blockchain sector market data
β
βββ π tools/
β βββ wallet-utils/ β Blockchain wallet utilities
β βββ gas-analyser/ β Ethereum gas optimisation tools
β βββ on-chain-analytics/ β Blockchain data analysis scripts
β
βββ π docs/
βββ getting-started.md
βββ contributing.md
βββ security.md
# Node.js 18+
node --version
# npm or yarn
npm --version
# Install Hardhat globally
npm install --global hardhatgit clone https://github.com/chainclar/chain-clarity-lab.git
cd chain-clarity-labnpm install# Run all smart contract tests
npx hardhat test
# Run with gas report
REPORT_GAS=true npx hardhat test
# Deploy to local network
npx hardhat node
npx hardhat run scripts/deploy.js --network localhostThe most practical example to start with β a blockchain escrow contract:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/**
* @title ChainClarityEscrow
* @author Elias Kfoury β @chainclar
* @notice Simple milestone-based escrow contract
*/
contract ChainClarityEscrow {
address public buyer;
address public seller;
address public arbiter;
uint256 public amount;
bool public isComplete;
constructor(address _seller, address _arbiter) payable {
buyer = msg.sender;
seller = _seller;
arbiter = _arbiter;
amount = msg.value;
}
function confirmDelivery() external {
require(msg.sender == buyer, "Only buyer");
require(!isComplete, "Already complete");
isComplete = true;
payable(seller).transfer(amount);
}
function refund() external {
require(msg.sender == arbiter, "Only arbiter");
require(!isComplete, "Already complete");
isComplete = true;
payable(buyer).transfer(amount);
}
function getBalance() external view returns (uint256) {
return address(this).balance;
}
}π Full implementation with tests β smart-contracts/escrow/
| Project | Status | Description |
|---|---|---|
| π’ Smart Contract Escrow | Active | Milestone-based payment automation |
| π‘ Post-Quantum Signatures | In Progress | CRYSTALS-Dilithium on Ethereum |
| π‘ Healthcare Consent Contract | In Progress | Patient data access smart contract |
| π΅ Supply Chain Tracker | Planned | End-to-end product traceability |
| π΅ Quantum-Safe Wallet | Planned | FALCON signature wallet implementation |
| π΅ DeFi Yield Analyser | Planned | On-chain yield strategy comparison |
Contributions, experiments, and feedback are welcome!
- Fork the repository
- Create your feature branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m 'Add: your feature description' - Push to the branch:
git push origin feature/your-feature - Open a Pull Request
Please read docs/contributing.md before submitting.
Found a vulnerability in one of the smart contracts?
Please do not open a public issue.
Email: n.satoshi@gmx.com
This project is licensed under the MIT License β see the LICENSE file for details.
Free to use, modify, and distribute with attribution.
| Platform | Link |
|---|---|
| π Website | chainclarify |
| π· Instagram | @chainclar |
| π§ Email | n.satoshi@gmx.com |
| π Ebooks | Chain Clarity Series |