Ethereum
Ce contenu est en anglais.
Homepage / Notes / Computer Science / Blockchain / Cryptocurrencies / Ethereum
What is L2?
Rollup?
Smart Contracts
https://ethereum.org/en/developers/tutorials/
Intro
Smart contracts are a type of Ethereum account. This means they have a balance and they can send transactions over the network. However they're not controlled by a user, instead they are deployed to the network and run as programmed. User accounts can then interact with a smart contract by submitting transactions that execute a function defined on the smart contract. Smart contracts can define rules, like a regular contract, and automatically enforce them via the code.
High gas costs? Should check how expensive…
Smart contracts alone cannot get information about "real-world" events because they can't send HTTP requests. This is by design as relying on external information could jeopardise consensus, which is important for security and decentralization.
Languages
https://ethereum.org/en/developers/docs/smart-contracts/languages/
more advanced: Yul, intermediate to the EVM cheatsheet Solidity vs Vyper: https://reference.auditless.com/cheatsheet/
Anatomy
https://ethereum.org/en/developers/docs/smart-contracts/anatomy/
Storage: permanently in the blockchain, expensive
Memory: only stored during the contract's execution, cheaper
Env var: block timestamp,
msg.sender…Functions:
internal(only accessible internally) vsexternal(can be called from other contracts and through transactions)publicvsprivatefor both functions and values?view functions: "getter" function not modifying state
constructor functions: to initiate the state, only ran at contract creation
built-in functions:
address.send()ERCs: set of standards
https://ethereum.org/en/developers/docs/security/
Resources
Tutorials
https://ethereum.org/en/developers/tutorials/ https://learnxinyminutes.com/docs/solidity/
Interactive Tutorials
https://cryptozombies.io/ https://ethernaut.openzeppelin.com/
Infrastructure
https://infura.io/: Ethereum node; have account and keys (acquired by ConsenSys, Feb 2026) https://dashboard.alchemy.com/: Ethereum node; have account (legacy alchemyapi.io retired Jan 2026)
Local Dev Env
https://ethereum.org/en/developers/local-environment/ https://hardhat.org/ compile, deploy, test, and debug your Ethereum software (Hardhat 3 in dev, 2026) https://openzeppelin.com/sdk/ interacting with smart contracts in the CLI deprecated, superseded by OpenZeppelin Upgrades Plugins https://www.trufflesuite.com/ tools for smart contracts / https://www.trufflesuite.com/ganache local copy of an Ethereum blockchain discontinued by ConsenSys, Sept 2023, repos archived Feb 2024 — use Hardhat/Foundry instead https://framework.embarklabs.io/ all-in-one for dapps effectively inactive, no maintenance https://eth-brownie.readthedocs.io/en/stable/deploy.html Python-based, better than the rest? unmaintained, use Ape Framework instead
Foundry
https://onbjerg.github.io/foundry-book/index.html forge init {project} to start a new project
Misc
https://github.com/tintinweb/smart-contract-sanctuary lists all smart contracts on Etherscan? https://twitter.com/zapper_fi/status/1327035284677128192?s=09 explain why "Approve DAI", "Enable USDC"
Technical Notes
Ethereum accounts
https://ethereum.org/en/developers/docs/accounts/#an-account-examined
Ethereum accounts have four fields:
nonce– a counter that indicates the number of transactions sent from the account. This ensures transactions are only processed once. If a contract account, this number represents the number of contracts created by the accountbalance– the number of Wei owned by this address. Wei is a denomination of ETH and there are 1e+18 Wei per ETH.codeHash– All such code fragments are contained in the state database under their corresponding hashes for later retrieval. For contract accounts, this is the code that gets hashed and stored as the codeHash. For externally owned accounts, the codeHash field is the hash of the empty string.storageRoot– A 256-bit hash of the root node of a Merkle Patricia tree that encodes the storage contents of the account (a mapping between 256-bit integer values), encoded into the trie as a mapping from the Keccak 256-bit hash of the 256-bit integer keys to the RLP-encoded 256-bit integer values. This tree encodes the hash of the storage contents of this account, and is empty by default.
Your private key is what you use to sign transactions, so it grants you custody over the funds associated with your account. You never really hold cryptocurrency, you hold private keys – the funds are always on Ethereum's ledger.
Ethereum clients
https://ethereum.org/en/developers/docs/nodes-and-clients/#clients GETH: https://geth.ethereum.org/docs/ Go's Ethereum implementation OpenEthereum: https://github.com/openethereum/openethereum Rust Trinity: https://trinity.ethereum.org/ Python
Ethereum transactions
https://ethereum.org/en/developers/docs/transactions/#whats-a-transaction
A submitted transaction includes the following information:
recipient– the receiving address (if an externally-owned account, the transaction will transfer value. If a contract account, the transaction will execute the contract code)signature– the identifier of the sender. This is generated when the sender's private key signs the transaction and confirms the sender has authorised this transactionvalue– amount of ETH to transfer from sender to recipient (in WEI, a denomination of ETH)data– optional field to include arbitrary datagasLimit– the maximum amount of gas units that can be consumed by the transaction. Units of gas represent computational stepsgasPrice– the fee the sender pays per unit of gas
Ethereum node types
https://ethereum.org/en/developers/docs/nodes-and-clients/#node-types
In fact, clients can run 3 different types of node - light, full and archive. There are also options of different sync strategies which enables faster synchronization time. Synchronization refers to how quickly it can get the most up-to-date information on Ethereum's state.
Full node
- Stores full blockchain data.
- Participates in block validation, verifies all blocks and states.
- All states can be derived from a full node.
- Serves the network and provides data on request.
Light node
- Stores the header chain and requests everything else.
- Can verify the validity of the data against the state roots in the block headers.
- Useful for low capacity devices, such as embedded devices or mobile phones, which can't afford to store gigabytes of blockchain data.
Archive node
- Stores everything kept in the full node and builds an archive of historical states. Needed if you want to query something like an account balance at block #4,000,000.
- These data represent units of terabytes which makes archive nodes less attractive for average users but can be handy for services like block explorers, wallet vendors, and chain analytics.
Proto-Danksharding
https://notes.ethereum.org/@vbuterin/proto_danksharding_faq
Protocols
Lending
https://compound.finance https://app.aave.com
DEXs (Decentralized Exchanges)
AMM
Uniswap
V1
ERC20 <> ETH
V2
ERC20 <> ERC20
V3
Can add single assets as liquidity Will use a Layer-2
Concentraded liquidity
Will be possible to concentrade liquidity in a specific range
Non-fungible liquidity
LP tokens won't be ERC20 anymore but ERC721 Trading fees no longer automatically reinvested
Flexible fees
0.05% => Stablecoins pairs 0.3% => Standard pairs 1% => Exotic pairs
Oracle
TWAP past 9 days on-chain
Pricing LP positions
Arbitrage
https://github.com/ccyanxyz/uniswap-arbitrage-analysis https://github.com/libevm/subway
Sushiswap
Survived a near-collapse; new leadership took over Dec 2025, token down ~99% from ATH
Balancer
Hit by a $110-128M exploit (Nov 2025); the corporate entity behind it shut down in March 2026 citing legal exposure. Protocol/DAO continuing in some form.
Kyberswap
Repeatedly hacked ($47M in 2023, tied to an ~$80-100M USR exploit in 2026); aggregator still operating
0x
for stablecoins
Curve
AMM for stablecoins
Orderbook-based
dYdX
L2
Everything is done on L2 No gas fees once coins are deposited on L2 From time to time, L2 is synced to L1
Deversifi => rhino.fi
Rebranded to rhino.fi in July 2022; still operating as a multi-chain L2 DeFi gateway https://rhino.fi
Lighter
Aggregators
1inch
CLI Interface: https://github.com/liquiditygoblin/1inch-cli
Matcha
Dex.guru
"Hedge Funds"
Yearn
Automated on-chain hedge fund https://yearn.finance
Stake DAO
Harvest Finance
Keeper DAO => Rook
Rebranded to Rook (ROOK); original KeeperDAO brand discontinued
Formation.fi
https://formation.fi/ Yield farming optimizer
Derivates
Options
Hegic
Pods
Perpetual Futures
Cap
DECENTRALIZED PERPS Trade global markets with low fees, deep liquidity, and up to 100× leverage.
On Arbitrum L2 Status as of 2026 unclear/ambiguous (name conflated with other "Cap" projects)
Alchemix
https://app.alchemix.fi/ Deposit DAI, borrow up to 50% as alUSD Yield on DAI through YFI pays back the loan itself
sideshift
https://sideshift.ai/btc/eth Not sure I understand the appeal?
Fei
New algo stablecoin
<2021-04-07> update: looks like Fei failed miserably… https://rekt.news/fei-rekt/ Confirmed defunct: merged into Tribe DAO, wound down starting Aug 2022 after the $80M Rari/Fuse hack
APWine => Spectra Finance
Rebranded to Spectra Finance (July 2023); relaunched June 2024, active (~$20M TVL) https://www.spectra.finance/
TimeSwap
"Like Uniswap, but for lending & borrowing" https://app.timeswap.io/ Faded: token has effectively stopped trading on major exchanges
Euler
https://www.euler.finance/#/ Hacked for ~$200M in March 2023 (100% recovered); relaunched as Euler v2, TVL hit an all-time high by 2026
Other Projects
https://zapper.fi: portfolio management. Shutting down Aug 3, 2026 — site/apps/API closing after 7 years https://feed.chain.link: on-chain price reference data https://defirate.com & https://yieldfarming.info: yield rate comparison https://tornado.cash: anonymize ETH transactions. OFAC lifted sanctions March 2025 (Fifth Circuit ruled immutable contracts aren't sanctionable "property"); co-founder Alexey Pertsev separately convicted of money laundering in the Netherlands, May 2024
Flash Loans
AAVE, dYdX, Uniswap… Balancer V2: https://twitter.com/fcmartinelli/status/1461777136071716875
Resources
https://defiprime.com/flahloans-comparison https://money-legos.studydefi.com/#/dydx https://github.com/fifikobayashi this guy have some repos using flash loans
Flash Mints
https://docs.makerdao.com/smart-contract-modules/flash-mint-module
MEV
Miner Extracted Value https://www.coindesk.com/ethereum-trading-bot-strategy-miner-extracted-value-research
One can look at the waiting transactions on the Ethereum blockchains and upbid "profitable" transactions so it executes faster.
Flashbots
Resources
https://noxx.substack.com/p/dex-arbitrage-mathematical-optimisations