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.
Proof of Stake vs Proof of Work, this introduces sharding which increases speed and throughput.
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)
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
- List accounts and balances.
- List of Smart Contracts and their data.
- From
- To (zeros is deploy new contract)
- Value
- Data/Input
- Gas Price
- Gas Limit
- Nonce
- v,r,s
Optimizing the smart contract code to minimise the amount of computational resources used by EVM
https://www.alchemy.com/overviews/solidity-gas-optimization
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.
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))
OpenZeppelin provides a complete suite of security products to build, manage, and inspect all aspects of software development and operations for Ethereum projects.
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.
Smart contract called DAO, was the largest crowd fund at that point, it was a reentrancy hack on fallback function
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,
Very good resource: https://consensys.github.io/smart-contract-best-practices