Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain & Web3 Engineering

Smart contract and protocol engineering across Ethereum (Solidity) and Solana (Rust/Anchor) — from a published BSc thesis on NFT marketplace design to an on-chain order-book DEX, built from first principles with the test suites to back it up.

Solidity Rust Truffle React IPFS Tests


Diskify — Music NFT Marketplace (BSc Thesis, 2021)

projects/diskify · read the paper

My undergraduate thesis at PUCPR — a full-stack dApp that turns digital albums into tradable NFTs, built to restore the economics streaming removed: limited pressings, real ownership, and a royalty paid to the artist on every resale, forever.

  • ERC-1155, deliberately — an album is one work in N copies, which 1155 models natively and 721 does not
  • Perpetual artist royalties implemented inside the trade function, in parts-per-thousand to work around Solidity's lack of floats — built in 2021, before EIP-2981 existed
  • IPFS-backed storage — only the content hash goes on-chain, so gas is flat regardless of album size
  • On-chain discovery feeds via 100-entry ring buffers for new releases and recent sales, no indexer required
  • React 16 + web3.js + MetaMask frontend, 1,763 lines across 7 components; Truffle + Ganache

The README includes an honest "what I'd change today" review of the contract — tx.origin auth, unchecked .send(), missing reentrancy guard — because knowing why 2021 code is unsafe in 2026 is the actual skill.


30 dApps, One Repo, 291 Passing Tests

projects/30-dapps is the centrepiece — a progression from HelloWorld to a full on-chain order-book DEX, every contract written from scratch and every one covered by tests.

Solidity contracts 31 files · 3,634 lines · solc 0.8.21
Test suite 35 files · 5,359 lines · 291 passing, 1 intentionally skipped
Test-to-code ratio 1.47 : 1 — more test code than contract code
Deployment 31 Truffle migrations
Frontends 8 dApp UIs (Express/EJS + React 19/Vite/MUI)

No OpenZeppelin shortcuts. ERC-20 and ERC-721 are implemented from the standard, then used as the foundation for the token, NFT, ICO and DEX projects.

The five worth your time

Project Why it's interesting
On-chain DEX 602 ln Real order-book exchange: limit and market orders, price-sorted order insertion, a matching engine with partial fills, fee accounting, and 10 mock ERC-20s (DAI, WETH, USDC, LINK…) to trade against.
DAO 512 ln Share-based governance — contribute, redeem, transfer shares; proposals with quorum voting and execution. Structs deliberately packed for storage cost, fully NatSpec-documented.
Rock-Paper-Scissors Commit–reveal scheme (keccak256(move, salt)) so neither player can observe the other's move in the mempool before committing. Front-running resistance done properly.
Inline Assembly study Each routine written twice — idiomatic Solidity vs hand-written Yul — to measure the gas delta directly.
Multisig Wallet M-of-N approval wallet: transfer proposals, per-approver vote tracking, execution only on threshold.

Also inside: ERC-20/ERC-721 from scratch, a breeding NFT (CryptoKitties-style), ICO with whitelist and release schedule, escrow, deed with scheduled multi-payouts, a loan state machine, lottery, voting, and on-chain Twitter / eBay / Tinder clones.

Testing approach

The suite is not smoke tests. Every contract is exercised against a live EVM with:

  • Per-test EVM snapshot & revert (evm_snapshot / evm_revert) so no test can leak state into the next
  • Revert-reason assertions via truffle-assertions — failures are verified to fail for the right reason
  • Time manipulation (evm_increaseTime) to drive time-locked deeds, ICO windows and lotteries
  • Full happy-path and adversarial coverage — every access-control modifier has a test that tries to break it

Solana Programs — projects/solana-programs

Rust programs on the Anchor framework, covering the account model that makes Solana different from the EVM:

  • advanced-storage — per-user state via PDAs (seeds/bump), with explicit account-space calculation
  • helloworld — program entrypoint, Context, account validation
  • armstrong_number — compute logic on-chain

Solidity Fundamentals — projects/solidity-fundamentals

Early groundwork building up the language: storage vs memory, visibility and modifiers, events, external libraries and using for, a custom pre-0.8 SafeMath, ERC-20 tokens, and an NFT using Chainlink VRF for verifiable randomness.

Flashloan Arbitrage — projects/flashloan-arbitrage

Truffle project plus an off-chain run-arbitrage.js watcher that monitors DEX price spreads and fires a flashloan-funded arbitrage when a profitable opportunity appears. Contract ABIs and mainnet addresses included.


Quick start

Runs against a local chain — no testnet funds or API keys needed.

git clone https://github.com/guhhammer/BlockchainAndWeb3.git
cd BlockchainAndWeb3/projects/30-dapps
npm install

npx ganache --port 8545          # terminal 1
npx truffle test                 # terminal 2  ->  291 passing

Deploy and open one of the dApp UIs:

npx truffle migrate --reset --network development
cd frontend/5_etherwallet && npm install
PRIVATE_KEY=0x<ganache-test-key> CONTRACT_ADDRESS=0x<deployed-address> node app.js

Solana:

cd projects/solana-programs/advanced-storage
anchor build && anchor test

Repository layout

projects/                  ← my own work; start here
├── diskify/               BSc thesis — ERC-1155 music NFT marketplace + paper
├── 30-dapps/              31 contracts, 291 tests, 8 frontends
├── solana-programs/       Anchor/Rust programs
├── solidity-fundamentals/ language + pattern groundwork
└── flashloan-arbitrage/   DeFi arbitrage bot + contracts

credentials/               course completion certificates
coursework/                third-party course material, kept for reference only

Everything under coursework/ is followed-along material from courses and books by other authors, not authored work — it is separated out precisely so the distinction is unambiguous. See coursework/README.md.


Tech

Contracts Solidity 0.8.21 · Yul/inline assembly · ERC-20 · ERC-721 · ERC-1155 · Chainlink VRF Solana Rust · Anchor · PDAs · account model Tooling Truffle · Ganache · Hardhat · Mocha/Chai · truffle-assertions Frontend React 19 · Vite · MUI · web3.js 4 · ethers.js 6 · Express · EJS Storage IPFS DeFi & NFT AMMs · order books · flashloans · arbitrage · yield farming · ICOs · NFT royalties · marketplaces


Contact

Gustavo — guhhammer@protonmail.com · GitHub

Open to blockchain and smart-contract engineering roles.

About

Curated portfolio of computer science coursework, research, and side projects spanning Rust, Solidity, Go, web development, and blockchain.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages