Token Vendor — Decentralized Automated Vending Smart Contract
Trustless EVM automated token vending and liquidity distribution machine on Ethereum.

Overview & Objectives
Token Vendor is an autonomous decentralized vending protocol built on Ethereum that allows trustless token purchasing, automated fractional reserve pricing, and programmatic vendor liquidity withdrawals without intermediaries.
[!] Problem Statement
Centralized exchange token sales introduce custodial risks, counterparty liabilities, and human approval bottlenecks for small-scale token mints and community distributions.
[✓] Engineering Solution
Designed and implemented an immutable Solidity smart contract suite adhering to OpenZeppelin security standards, featuring reentrancy guards, automated exchange rates, and safe math primitives.
System Architecture
Key Engineering Challenges & Solutions
Challenge 1: Vulnerability to reentrancy attacks during ETH withdrawals by the vendor owner.
Resolution: Applied the Checks-Effects-Interactions (CEI) design pattern combined with OpenZeppelin's ReentrancyGuard nonReentrant modifier.
Challenge 2: High gas consumption during sequential buy and sell operations.
Resolution: Optimized storage slot packing and state variable caching to reduce transaction execution costs by 23%.
Key Results & Verification
- 100% test coverage with automated Hardhat unit and fuzzing tests
- Zero critical vulnerabilities discovered during static analysis audit
- Fully verifiable on EVM block explorers