Skip to content

bbresearcher/web3

Repository files navigation

A repository for WEB3 101 and things I have learned to share my learning journey

ANY CODE IS NOT TO BE USED IN PRODUCTION AND LIKELY CONTAINS MAJOR VULNERABILITES. I AM NOT LIABLE FOR ANY LOSS IF ANY CODE IS USED FROM THIS REPOSITORY

NB!!! DISCLAIMER: All information is as I understand it but please verify the correctness of it, this repository is not meant to be an authoritative source of information.

Concepts

What is ETH 2.0

Proof of Stake vs Proof of Work, this introduces sharding which increases speed and throughput.

What is Layer 2

Layer 2 is transactions/computing off of Layer1 (Mainnet) to lower costs and increase speed. current scaling solutions

  • Channels (State and payment channels, allows users to share transactions many time while only submitting 2 transactions.) (application specific no open participation cant be used to scale general smart contracts)RADEUM
  • Plasma framework for building apps on ethereum.OMG
  • Side chains ETH compatible blockchains
  • Rollups bundle TX in a single TX (SNARK) ZK ROLLUPS AND OPTIMISTIC ROLLUPS (OVM)

What is the EVM

Spearbit EVM info video
A Low-Level Guide To Solidity's Storage Management
Reversing The EVM: Raw Calldata
EVM OP Codes
Ethereum Virtual Machine (EVM)
Quasi-turing complete
State machine

  1. List accounts and balances.
  2. List of Smart Contracts and their data.

Ethereum Transaction structure

  • From
  • To (zeros is deploy new contract)
  • Value
  • Data/Input
  • Gas Price
  • Gas Limit
  • Nonce
  • v,r,s

What is GAS Optimisation

Optimizing the smart contract code to minimise the amount of computational resources used by EVM
https://www.alchemy.com/overviews/solidity-gas-optimization

What is the ETH ENS

Ethereum Name Service (ENS)
Its like a DNS for the blockchain, it supports sub-domains and the owner can configure them.
Link: https://docs.ens.domains/
top level domains are owned by owner contract eg. .eth and .test
Can be used by a user or a contract.

What is a proxy

https://docs.openzeppelin.com/contracts/4.x/api/proxy
A proxy is an abstract contract that uses delegation.
TPP(Transparent Proxy Pattern)
UUPS (Upgradeable Proxy Standard (UUPS))

When is a proxy unintialized and how to check

yAcademy proxy security

What is Compound

What is OpenZeppelin

OpenZeppelin provides a complete suite of security products to build, manage, and inspect all aspects of software development and operations for Ethereum projects.

What is UniSwap and how does it work

Automated Liquidity Pool, EthToToken,TokenToEth or tokenToToken swaps
You can itneract via a factory class
Can also create your own exchange
Price of Eth/Token is controlled by the pool balances.

What is MasterChef

What was the DAO Hack

Smart contract called DAO, was the largest crowd fund at that point, it was a reentrancy hack on fallback function

What is an Oracle and how can it be manipulated

An Oracle is a datasource from off chain eg. Currency conversions
To solve the decentralization issue DON's exist (Decentralized Oracle networks).

  • Input Oracles
  • Output Oracles
  • Cross-chain Oracles
  • Compute-Enabled Oracles

Some manipulations: draining one side of a swap pool,

WEB3 Security Best Practices

Very good resource: https://consensys.github.io/smart-contract-best-practices

About

My Repository of web3 resources and write ups

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published