From b6b2db512fec114ebf308c71df0950f3a05ae2f6 Mon Sep 17 00:00:00 2001 From: writer Date: Tue, 15 Oct 2024 10:48:15 +0900 Subject: [PATCH] add the crypto anarchist manifest by timothy c. may --- 0x_protocol/README.md | 29 -- 0x_protocol/RFQ.md | 12 - MEV_and_trading/README.md | 90 ++++++ MEV_and_trading/backtesting/README.md | 20 ++ .../bridges/README.md | 16 +- MEV_and_trading/day-trading/README.md | 25 ++ .../investing_strategies/README.md | 24 ++ .../day-trading/leverage/README.md | 3 + .../day-trading/orders_types/README.md | 0 .../day-trading/technical_analysis/README.md | 45 +++ .../technical_analysis/candlestick_charts.md | 83 +++-- .../day-trading/trading_types/README.md | 12 +- MEV_and_trading/derivatives/README.md | 44 +++ MEV_and_trading/derivatives/bsm.md | 19 ++ MEV_and_trading/derivatives/futures.md | 3 + MEV_and_trading/derivatives/options.md | 93 ++++++ .../derivatives/perpetuals/README.md | 20 ++ .../derivatives/perpetuals/perpetual_swap.md | 20 ++ .../derivatives/perpetuals/synthetix.md | 18 ++ .../derivatives/perpetuals/vela.md | 16 + MEV_and_trading/high_frequency/README.md | 35 ++ MEV_and_trading/lending/README.md | 35 ++ MEV_and_trading/lending/collateralized.md | 15 + MEV_and_trading/lending/composable.md | 17 + MEV_and_trading/lending/protocols/README.md | 17 + MEV_and_trading/lending/protocols/silo.md | 11 + MEV_and_trading/lending/uncollateralized.md | 15 + MEV_and_trading/liquidity/README.md | 29 ++ MEV_and_trading/liquidity/balancer.md | 34 ++ MEV_and_trading/liquidity/tokemak.md | 34 ++ MEV_and_trading/macroeconomy/README.md | 19 ++ MEV_and_trading/macroeconomy/concepts.md | 136 ++++++++ MEV_and_trading/market_makers/README.md | 21 ++ .../professional_entities/README.md | 17 + MEV_and_trading/market_manipulation/README.md | 22 ++ .../protocols/0x_protocol/README.md | 24 ++ MEV_and_trading/protocols/0x_protocol/RFQ.md | 21 ++ MEV_and_trading/protocols/README.md | 70 ++++ MEV_and_trading/protocols/dydx.md | 22 ++ MEV_and_trading/protocols/gns.md | 20 ++ MEV_and_trading/protocols/inverse.md | 27 ++ MEV_and_trading/protocols/primitive.md | 5 + MEV_and_trading/protocols/uniswap/README.md | 48 +++ .../protocols/uniswap}/uniswap-v2/README.md | 0 .../protocols/uniswap/uniswap-v3/README.md | 51 +++ .../uniswap/uniswap-v3/just-in-time.md | 42 +++ .../protocols/uniswap/uniswap-v3/tricks.md | 16 + MEV_and_trading/protocols/yearn.md | 7 + MEV_and_trading/stablecoins/DAI.md | 17 + MEV_and_trading/stablecoins/DINERO.md | 19 ++ MEV_and_trading/stablecoins/GHO.md | 25 ++ MEV_and_trading/stablecoins/LUSD.md | 29 ++ MEV_and_trading/stablecoins/RAI.md | 15 + MEV_and_trading/stablecoins/README.md | 34 ++ MEV_and_trading/stablecoins/USDD.md | 13 + .../stablecoins/UST.md | 2 +- MEV_and_trading/stablecoins/curve/README.md | 42 +++ MEV_and_trading/stablecoins/curve/crvusd.md | 25 ++ .../stablecoins/curve/curve_wars.md | 26 +- .../stablecoins/curve/historical.md | 11 + .../stablecoins/stablecoins_101.md | 33 ++ MEV_and_trading/staking/Frax.md | 18 ++ .../staking/Lido.md | 10 +- MEV_and_trading/staking/README.md | 34 ++ MEV_and_trading/staking/RocketPool.md | 17 + MEV_and_trading/staking/Stader.md | 16 + .../staking/Stakewise.md | 16 +- MEV_and_trading/staking/dvt/README.md | 20 ++ MEV_and_trading/staking/lsds_and_mev.md | 17 + MEV_and_trading/staking/mevETH.md | 18 ++ MEV_and_trading/strategy_metrics/README.md | 72 +++++ .../vaults/ERC-4626.md | 0 .../vaults/README.md | 7 +- MEV_and_trading/vaults/openeden.md | 17 + MEV_and_trading/whales/README.md | 35 ++ MEV_by_chains/MEV_on_Arbitrum/README.md | 43 +++ .../fair_ordering_sequencing/README.md | 19 ++ MEV_by_chains/MEV_on_Arbitrum/gmx/README.md | 62 ++++ .../MEV_on_Arbitrum/gmx/glp_vaults.md | 59 ++++ .../MEV_on_Arbitrum/gmx/oracle_abuse.md | 25 ++ .../MEV_on_Arbitrum/gmx/tokenomics.md | 39 +++ MEV_by_chains/MEV_on_Avalanche/README.md | 26 ++ MEV_by_chains/MEV_on_BSC/README.md | 15 + MEV_by_chains/MEV_on_Bitcoin/README.md | 5 + MEV_by_chains/MEV_on_Cosmos/README.md | 35 ++ MEV_by_chains/MEV_on_Ethereum/README.md | 131 ++++++++ .../account_abstraction/README.md | 43 +++ .../MEV_on_Ethereum/block_builders.md | 48 +++ .../MEV_on_Ethereum}/blockspace.md | 3 +- .../MEV_on_Ethereum}/eip-1559.md | 0 .../MEV_on_Ethereum/ethereum_2.0/shapella.md | 27 ++ .../MEV_on_Ethereum}/evm-knowledge.md | 0 .../MEV_on_Ethereum}/geth_and_k8s/README.md | 4 +- .../geth_and_k8s/deployment_gcp_docker.md | 0 .../geth_and_k8s/deployment_gcp_k8s.md | 0 .../geth_and_k8s/entrypoint.sh | 0 .../geth_and_k8s/genesis.dockerfile | 0 .../geth_and_k8s/genesis.json | 0 .../geth_and_k8s/genesis_block_explanation.md | 0 .../geth_and_k8s/geth_creation_commands.md | 0 .../geth_and_k8s/k8s/certificate.yaml | 0 .../geth_and_k8s/k8s/deployment.yaml | 0 .../geth_and_k8s/k8s/ingress.yaml | 0 .../geth_and_k8s/k8s/manifest.yaml | 0 .../geth_and_k8s/k8s/service.yaml | 0 .../geth_and_k8s/running-a-node-geth.md | 0 .../geth_and_k8s/scripts/create_docker.sh | 0 .../geth_and_k8s/scripts/entrypoint.sh | 0 .../geth_and_k8s/scripts/genesis.dockerfile | 0 .../geth_and_k8s/scripts/genesis.json | 0 .../MEV_on_Ethereum/glossary.md | 120 +------ .../pos_consensus_mechanisms.md | 0 MEV_by_chains/MEV_on_Ethereum/relays.md | 42 +++ .../running-a-node-advanced.md | 9 +- .../MEV_on_Ethereum}/running-a-node.md | 0 .../README.md | 20 ++ .../MEV_on_Ethereum}/the_mempool.md | 0 MEV_by_chains/MEV_on_Optimism/README.md | 33 ++ .../MEV_on_Optimism/optimistic_rollups.md | 16 + MEV_by_chains/MEV_on_Polygon/README.md | 26 ++ MEV_by_chains/MEV_on_Solana/README.md | 26 ++ MEV_by_chains/README.md | 29 ++ MEV_on_Arbitrum/README.md | 7 - MEV_on_Avalanche/README.md | 15 - MEV_on_Binance/README.md | 7 - MEV_on_Cosmos/README.md | 19 -- MEV_on_Ethereum/block_builders.md | 18 -- MEV_on_Ethereum/relays.md | 68 ---- MEV_on_Polygon/README.md | 13 - MEV_on_Solana/README.md | 18 -- MEV_projects/README.md | 80 +++++ MEV_projects/cow_protocol/README.md | 32 ++ MEV_projects/dflow/README.md | 21 ++ MEV_projects/eden/README.md | 22 ++ MEV_projects/espresso/README.md | 3 + MEV_projects/flashbots/README.md | 55 ++++ .../flashbots}/mev-boost/README.md | 14 +- MEV_projects/flashbots/scripts/README.md | 5 + .../flashbots}/scripts/flashbots-bundle.py | 2 +- MEV_projects/flashbots/suave/README.md | 25 ++ MEV_projects/flashbots/tools/README.md | 7 + MEV_projects/history.md | 69 ++++ MEV_projects/jito/README.md | 21 ++ MEV_projects/manifold/README.md | 21 ++ MEV_projects/shutter/README.md | 23 ++ MEV_projects/skip/README.md | 23 ++ MEV_searchers/README.md | 114 +++++++ .../bots/arbers.md | 17 +- MEV_searchers/bots/backrunners.md | 16 + MEV_searchers/bots/cow-solvers.md | 24 ++ MEV_searchers/bots/frontrunners.md | 18 ++ MEV_searchers/bots/liquidators.md | 53 +++ MEV_searchers/bots/longtailors.md | 26 ++ MEV_searchers/bots/sandwichors.md | 17 + MEV_searchers/bots/snipers.md | 18 ++ MEV_searchers/bots/stat-arbers.md | 23 ++ MEV_searchers/bots/tradors.md | 25 ++ MEV_searchers/code_resources/README.md | 32 ++ .../code_resources/gas_optimization/README.md | 14 + .../code_resources/proxies/README.md | 19 ++ MEV_searchers/cross_domain_mev/README.md | 35 ++ MEV_searchers/data_and_analytics/README.md | 42 +++ MEV_searchers/disassemblers/README.md | 13 + MEV_searchers/latency/README.md | 51 +++ MEV_searchers/mempool_monitoring/README.md | 18 ++ MEV_searchers/order_flows/101.md | 30 ++ MEV_searchers/order_flows/README.md | 26 ++ .../order_flows/exclusive_order_flows.md | 31 ++ MEV_searchers/order_flows/projects.md | 13 + .../profits/2022_profits.md | 0 MEV_searchers/pvp_war/README.md | 53 +++ .../pvp_war}/malicious_tokens.md | 0 .../tx_and_signature_explorers/README.md | 25 ++ MEV_strategies/README.md | 19 ++ MEV_strategies/arbitrage/README.md | 7 + MEV_strategies/atomic_arb/README.md | 45 +++ .../atomic_arb/algorithms/README.md | 31 ++ .../algorithms/bellmann_ford/README.md | 14 + .../algorithms/ford_fulkerson/README.md | 13 + .../atomic_arb}/mev_bots_wild/README.md | 8 + MEV_strategies/atomic_arb/patterns/README.md | 31 ++ .../atomic_arb}/patterns/spatial.md | 2 + .../atomic_arb}/patterns/taxed.md | 0 .../atomic_arb/patterns/triangle.md | 19 +- MEV_strategies/backrunning/README.md | 27 ++ MEV_strategies/flashloans/README.md | 47 +++ .../smart_contracts/dydx_flashloan.sol | 0 MEV_strategies/frontrunning/README.md | 52 +++ MEV_strategies/liquidations/README.md | 45 +++ MEV_strategies/liquidations/aave.md | 37 +++ MEV_strategies/liquidations/compound.md | 22 ++ MEV_strategies/liquidations/euler.md | 24 ++ MEV_strategies/liquidations/liquity.md | 19 ++ MEV_strategies/longtails/README.md | 28 ++ MEV_strategies/oracles/README.md | 43 +++ MEV_strategies/oracles/chainlink.md | 24 ++ MEV_strategies/oracles/twamm.md | 29 ++ MEV_strategies/oracles/twap.md | 37 +++ MEV_strategies/sandwich/README.md | 51 +++ .../sandwich}/interesting_examples.md | 3 +- MEV_strategies/sniping/README.md | 33 ++ MEV_strategies/sniping/tricks.md | 11 + MEV_strategies/stat_arbs/README.md | 56 ++++ MEV_strategies/stat_arbs/aggregators/1inch.md | 13 + .../stat_arbs/aggregators/README.md | 21 ++ .../stat_arbs/convex_optimization/README.md | 27 ++ .../stat_arbs/dex-cex-arb/README.md | 26 ++ README.md | 301 +++--------------- anatomy_of_mev_bots/README.md | 53 --- anatomy_of_mev_bots/bots/101.md | 5 - anatomy_of_mev_bots/bots/backrunners.md | 4 - anatomy_of_mev_bots/bots/cow-solvers.md | 4 - anatomy_of_mev_bots/bots/frontrunners.md | 3 - anatomy_of_mev_bots/bots/liquidators.md | 6 - anatomy_of_mev_bots/bots/longtailors.md | 5 - anatomy_of_mev_bots/bots/sandwichors.md | 4 - anatomy_of_mev_bots/bots/snipers.md | 4 - anatomy_of_mev_bots/bots/stat-arbers.md | 4 - anatomy_of_mev_bots/bots/tradors.md | 3 - anatomy_of_mev_bots/deployment/2022.md | 14 - anatomy_of_mev_bots/deployment/README.md | 16 - anatomy_of_mev_bots/profits/README.md | 20 -- arbitrage/README.md | 40 --- arbitrage/patterns/triangle.md | 1 - back_running/README.md | 37 --- cow_protocol/README.md | 38 --- cow_protocol/cow_swap.md | 11 - cross_domain_mev/README.md | 18 -- defi_and_trading/README.md | 107 ------- defi_and_trading/day-trading/README.md | 16 - defi_and_trading/defi-glossary.md | 62 ---- defi_and_trading/derivatives/README.md | 69 ---- defi_and_trading/liquidity/tokemak.md | 10 - defi_and_trading/stablecoins/README.md | 45 --- defi_and_trading/staking/README.md | 14 - defi_and_trading/whales/README.md | 5 - flashbots/README.md | 43 --- flashbots/scripts/README.md | 5 - flashbots/suave/README.md | 9 - flashbots/tools/README.md | 25 -- flashbots/tools/tool.md | 1 - flashloans/README.md | 28 -- flashloans/protocols/README.md | 21 -- front_running/FaaS.md | 9 - front_running/README.md | 29 -- latency/README.md | 11 - liquidations/README.md | 39 --- nft_arbitrage/README.md | 3 - oracles/README.md | 22 -- oracles/chainlink.md | 13 - oracles/twamm.md | 21 -- oracles/twap.md | 25 -- private_order_flows/README.md | 43 --- pvp_war/README.md | 29 -- rook/README.md | 76 ----- rook/docs/MEV-at-KeeperDAO.md | 47 --- rook/docs/coordination_protocol.md | 186 ----------- rook/docs/hiding-vault-x-compound.md | 71 ----- rook/docs/hiding_game.md | 19 -- rook/docs/hiding_vault.md | 12 - rook/docs/introducing-kcompound.md | 17 - rook/docs/liquidity_pools.md | 9 - rook/docs/proposal-rooknomics.md | 28 -- rook/docs/the-mission-of-KeeperDAO.md | 28 -- rook/docs/the_new_citadel.md | 60 ---- rook/docs/treasure-growth-plan.md | 22 -- rook/docs/whitepaper-notes.md | 23 -- sandwich/README.md | 43 --- sandwich/cross_trading.md | 15 - sniping/README.md | 12 - tokenomics/README.md | 103 ------ tokenomics/voter_escrowed_tokens.md | 14 - uniswap/README.md | 32 -- uniswap/uniswap-v3/README.md | 34 -- uniswap/uniswap-v3/just-in-time.md | 39 --- 275 files changed, 4733 insertions(+), 2552 deletions(-) delete mode 100644 0x_protocol/README.md delete mode 100644 0x_protocol/RFQ.md create mode 100644 MEV_and_trading/README.md create mode 100644 MEV_and_trading/backtesting/README.md rename {defi_and_trading => MEV_and_trading}/bridges/README.md (94%) create mode 100644 MEV_and_trading/day-trading/README.md create mode 100644 MEV_and_trading/day-trading/investing_strategies/README.md rename {defi_and_trading => MEV_and_trading}/day-trading/leverage/README.md (70%) rename {defi_and_trading => MEV_and_trading}/day-trading/orders_types/README.md (100%) create mode 100644 MEV_and_trading/day-trading/technical_analysis/README.md rename defi_and_trading/day-trading/technical_analysis/README.md => MEV_and_trading/day-trading/technical_analysis/candlestick_charts.md (88%) rename {defi_and_trading => MEV_and_trading}/day-trading/trading_types/README.md (94%) create mode 100644 MEV_and_trading/derivatives/README.md create mode 100644 MEV_and_trading/derivatives/bsm.md create mode 100644 MEV_and_trading/derivatives/futures.md create mode 100644 MEV_and_trading/derivatives/options.md create mode 100644 MEV_and_trading/derivatives/perpetuals/README.md create mode 100644 MEV_and_trading/derivatives/perpetuals/perpetual_swap.md create mode 100644 MEV_and_trading/derivatives/perpetuals/synthetix.md create mode 100644 MEV_and_trading/derivatives/perpetuals/vela.md create mode 100644 MEV_and_trading/high_frequency/README.md create mode 100644 MEV_and_trading/lending/README.md create mode 100644 MEV_and_trading/lending/collateralized.md create mode 100644 MEV_and_trading/lending/composable.md create mode 100644 MEV_and_trading/lending/protocols/README.md create mode 100644 MEV_and_trading/lending/protocols/silo.md create mode 100644 MEV_and_trading/lending/uncollateralized.md create mode 100644 MEV_and_trading/liquidity/README.md create mode 100644 MEV_and_trading/liquidity/balancer.md create mode 100644 MEV_and_trading/liquidity/tokemak.md create mode 100644 MEV_and_trading/macroeconomy/README.md create mode 100644 MEV_and_trading/macroeconomy/concepts.md create mode 100644 MEV_and_trading/market_makers/README.md create mode 100644 MEV_and_trading/market_makers/professional_entities/README.md create mode 100644 MEV_and_trading/market_manipulation/README.md create mode 100644 MEV_and_trading/protocols/0x_protocol/README.md create mode 100644 MEV_and_trading/protocols/0x_protocol/RFQ.md create mode 100644 MEV_and_trading/protocols/README.md create mode 100644 MEV_and_trading/protocols/dydx.md create mode 100644 MEV_and_trading/protocols/gns.md create mode 100644 MEV_and_trading/protocols/inverse.md create mode 100644 MEV_and_trading/protocols/primitive.md create mode 100644 MEV_and_trading/protocols/uniswap/README.md rename {uniswap => MEV_and_trading/protocols/uniswap}/uniswap-v2/README.md (100%) create mode 100644 MEV_and_trading/protocols/uniswap/uniswap-v3/README.md create mode 100644 MEV_and_trading/protocols/uniswap/uniswap-v3/just-in-time.md create mode 100644 MEV_and_trading/protocols/uniswap/uniswap-v3/tricks.md create mode 100644 MEV_and_trading/protocols/yearn.md create mode 100644 MEV_and_trading/stablecoins/DAI.md create mode 100644 MEV_and_trading/stablecoins/DINERO.md create mode 100644 MEV_and_trading/stablecoins/GHO.md create mode 100644 MEV_and_trading/stablecoins/LUSD.md create mode 100644 MEV_and_trading/stablecoins/RAI.md create mode 100644 MEV_and_trading/stablecoins/README.md create mode 100644 MEV_and_trading/stablecoins/USDD.md rename {defi_and_trading => MEV_and_trading}/stablecoins/UST.md (98%) create mode 100644 MEV_and_trading/stablecoins/curve/README.md create mode 100644 MEV_and_trading/stablecoins/curve/crvusd.md rename defi_and_trading/stablecoins/Curve.md => MEV_and_trading/stablecoins/curve/curve_wars.md (79%) create mode 100644 MEV_and_trading/stablecoins/curve/historical.md create mode 100644 MEV_and_trading/stablecoins/stablecoins_101.md create mode 100644 MEV_and_trading/staking/Frax.md rename {defi_and_trading => MEV_and_trading}/staking/Lido.md (82%) create mode 100644 MEV_and_trading/staking/README.md create mode 100644 MEV_and_trading/staking/RocketPool.md create mode 100644 MEV_and_trading/staking/Stader.md rename {defi_and_trading => MEV_and_trading}/staking/Stakewise.md (75%) create mode 100644 MEV_and_trading/staking/dvt/README.md create mode 100644 MEV_and_trading/staking/lsds_and_mev.md create mode 100644 MEV_and_trading/staking/mevETH.md create mode 100644 MEV_and_trading/strategy_metrics/README.md rename {defi_and_trading => MEV_and_trading}/vaults/ERC-4626.md (100%) rename {defi_and_trading => MEV_and_trading}/vaults/README.md (54%) create mode 100644 MEV_and_trading/vaults/openeden.md create mode 100644 MEV_and_trading/whales/README.md create mode 100644 MEV_by_chains/MEV_on_Arbitrum/README.md create mode 100644 MEV_by_chains/MEV_on_Arbitrum/fair_ordering_sequencing/README.md create mode 100644 MEV_by_chains/MEV_on_Arbitrum/gmx/README.md create mode 100644 MEV_by_chains/MEV_on_Arbitrum/gmx/glp_vaults.md create mode 100644 MEV_by_chains/MEV_on_Arbitrum/gmx/oracle_abuse.md create mode 100644 MEV_by_chains/MEV_on_Arbitrum/gmx/tokenomics.md create mode 100644 MEV_by_chains/MEV_on_Avalanche/README.md create mode 100644 MEV_by_chains/MEV_on_BSC/README.md create mode 100644 MEV_by_chains/MEV_on_Bitcoin/README.md create mode 100644 MEV_by_chains/MEV_on_Cosmos/README.md create mode 100644 MEV_by_chains/MEV_on_Ethereum/README.md create mode 100644 MEV_by_chains/MEV_on_Ethereum/account_abstraction/README.md create mode 100644 MEV_by_chains/MEV_on_Ethereum/block_builders.md rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/blockspace.md (76%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/eip-1559.md (100%) create mode 100644 MEV_by_chains/MEV_on_Ethereum/ethereum_2.0/shapella.md rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/evm-knowledge.md (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/README.md (94%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/deployment_gcp_docker.md (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/deployment_gcp_k8s.md (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/entrypoint.sh (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/genesis.dockerfile (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/genesis.json (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/genesis_block_explanation.md (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/geth_creation_commands.md (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/k8s/certificate.yaml (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/k8s/deployment.yaml (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/k8s/ingress.yaml (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/k8s/manifest.yaml (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/k8s/service.yaml (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/running-a-node-geth.md (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/scripts/create_docker.sh (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/scripts/entrypoint.sh (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/scripts/genesis.dockerfile (100%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/geth_and_k8s/scripts/genesis.json (100%) rename MEV_on_Ethereum/README.md => MEV_by_chains/MEV_on_Ethereum/glossary.md (52%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/pos_consensus_mechanisms.md (100%) create mode 100644 MEV_by_chains/MEV_on_Ethereum/relays.md rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/running-a-node-advanced.md (97%) rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/running-a-node.md (100%) create mode 100644 MEV_by_chains/MEV_on_Ethereum/searcher-builder-validator-sequencer/README.md rename {MEV_on_Ethereum => MEV_by_chains/MEV_on_Ethereum}/the_mempool.md (100%) create mode 100644 MEV_by_chains/MEV_on_Optimism/README.md create mode 100644 MEV_by_chains/MEV_on_Optimism/optimistic_rollups.md create mode 100644 MEV_by_chains/MEV_on_Polygon/README.md create mode 100644 MEV_by_chains/MEV_on_Solana/README.md create mode 100644 MEV_by_chains/README.md delete mode 100644 MEV_on_Arbitrum/README.md delete mode 100644 MEV_on_Avalanche/README.md delete mode 100644 MEV_on_Binance/README.md delete mode 100644 MEV_on_Cosmos/README.md delete mode 100644 MEV_on_Ethereum/block_builders.md delete mode 100644 MEV_on_Ethereum/relays.md delete mode 100644 MEV_on_Polygon/README.md delete mode 100644 MEV_on_Solana/README.md create mode 100644 MEV_projects/README.md create mode 100644 MEV_projects/cow_protocol/README.md create mode 100644 MEV_projects/dflow/README.md create mode 100644 MEV_projects/eden/README.md create mode 100644 MEV_projects/espresso/README.md create mode 100644 MEV_projects/flashbots/README.md rename {flashbots => MEV_projects/flashbots}/mev-boost/README.md (69%) create mode 100644 MEV_projects/flashbots/scripts/README.md rename {flashbots => MEV_projects/flashbots}/scripts/flashbots-bundle.py (97%) create mode 100644 MEV_projects/flashbots/suave/README.md create mode 100644 MEV_projects/flashbots/tools/README.md create mode 100644 MEV_projects/history.md create mode 100644 MEV_projects/jito/README.md create mode 100644 MEV_projects/manifold/README.md create mode 100644 MEV_projects/shutter/README.md create mode 100644 MEV_projects/skip/README.md create mode 100644 MEV_searchers/README.md rename {anatomy_of_mev_bots => MEV_searchers}/bots/arbers.md (62%) create mode 100644 MEV_searchers/bots/backrunners.md create mode 100644 MEV_searchers/bots/cow-solvers.md create mode 100644 MEV_searchers/bots/frontrunners.md create mode 100644 MEV_searchers/bots/liquidators.md create mode 100644 MEV_searchers/bots/longtailors.md create mode 100644 MEV_searchers/bots/sandwichors.md create mode 100644 MEV_searchers/bots/snipers.md create mode 100644 MEV_searchers/bots/stat-arbers.md create mode 100644 MEV_searchers/bots/tradors.md create mode 100644 MEV_searchers/code_resources/README.md create mode 100644 MEV_searchers/code_resources/gas_optimization/README.md create mode 100644 MEV_searchers/code_resources/proxies/README.md create mode 100644 MEV_searchers/cross_domain_mev/README.md create mode 100644 MEV_searchers/data_and_analytics/README.md create mode 100644 MEV_searchers/disassemblers/README.md create mode 100644 MEV_searchers/latency/README.md create mode 100644 MEV_searchers/mempool_monitoring/README.md create mode 100644 MEV_searchers/order_flows/101.md create mode 100644 MEV_searchers/order_flows/README.md create mode 100644 MEV_searchers/order_flows/exclusive_order_flows.md create mode 100644 MEV_searchers/order_flows/projects.md rename anatomy_of_mev_bots/profits/2022.md => MEV_searchers/profits/2022_profits.md (100%) create mode 100644 MEV_searchers/pvp_war/README.md rename {pvp_war => MEV_searchers/pvp_war}/malicious_tokens.md (100%) create mode 100644 MEV_searchers/tx_and_signature_explorers/README.md create mode 100644 MEV_strategies/README.md create mode 100644 MEV_strategies/arbitrage/README.md create mode 100644 MEV_strategies/atomic_arb/README.md create mode 100644 MEV_strategies/atomic_arb/algorithms/README.md create mode 100644 MEV_strategies/atomic_arb/algorithms/bellmann_ford/README.md create mode 100644 MEV_strategies/atomic_arb/algorithms/ford_fulkerson/README.md rename {arbitrage => MEV_strategies/atomic_arb}/mev_bots_wild/README.md (84%) create mode 100644 MEV_strategies/atomic_arb/patterns/README.md rename {arbitrage => MEV_strategies/atomic_arb}/patterns/spatial.md (97%) rename {arbitrage => MEV_strategies/atomic_arb}/patterns/taxed.md (100%) rename arbitrage/patterns/README.md => MEV_strategies/atomic_arb/patterns/triangle.md (60%) create mode 100644 MEV_strategies/backrunning/README.md create mode 100644 MEV_strategies/flashloans/README.md rename flashloans/smart_contracts/dydx_flahsloan.sol => MEV_strategies/flashloans/smart_contracts/dydx_flashloan.sol (100%) create mode 100644 MEV_strategies/frontrunning/README.md create mode 100644 MEV_strategies/liquidations/README.md create mode 100644 MEV_strategies/liquidations/aave.md create mode 100644 MEV_strategies/liquidations/compound.md create mode 100644 MEV_strategies/liquidations/euler.md create mode 100644 MEV_strategies/liquidations/liquity.md create mode 100644 MEV_strategies/longtails/README.md create mode 100644 MEV_strategies/oracles/README.md create mode 100644 MEV_strategies/oracles/chainlink.md create mode 100644 MEV_strategies/oracles/twamm.md create mode 100644 MEV_strategies/oracles/twap.md create mode 100644 MEV_strategies/sandwich/README.md rename {sandwich => MEV_strategies/sandwich}/interesting_examples.md (50%) create mode 100644 MEV_strategies/sniping/README.md create mode 100644 MEV_strategies/sniping/tricks.md create mode 100644 MEV_strategies/stat_arbs/README.md create mode 100644 MEV_strategies/stat_arbs/aggregators/1inch.md create mode 100644 MEV_strategies/stat_arbs/aggregators/README.md create mode 100644 MEV_strategies/stat_arbs/convex_optimization/README.md create mode 100644 MEV_strategies/stat_arbs/dex-cex-arb/README.md delete mode 100644 anatomy_of_mev_bots/README.md delete mode 100644 anatomy_of_mev_bots/bots/101.md delete mode 100644 anatomy_of_mev_bots/bots/backrunners.md delete mode 100644 anatomy_of_mev_bots/bots/cow-solvers.md delete mode 100644 anatomy_of_mev_bots/bots/frontrunners.md delete mode 100644 anatomy_of_mev_bots/bots/liquidators.md delete mode 100644 anatomy_of_mev_bots/bots/longtailors.md delete mode 100644 anatomy_of_mev_bots/bots/sandwichors.md delete mode 100644 anatomy_of_mev_bots/bots/snipers.md delete mode 100644 anatomy_of_mev_bots/bots/stat-arbers.md delete mode 100644 anatomy_of_mev_bots/bots/tradors.md delete mode 100644 anatomy_of_mev_bots/deployment/2022.md delete mode 100644 anatomy_of_mev_bots/deployment/README.md delete mode 100644 anatomy_of_mev_bots/profits/README.md delete mode 100644 arbitrage/README.md delete mode 100644 arbitrage/patterns/triangle.md delete mode 100644 back_running/README.md delete mode 100644 cow_protocol/README.md delete mode 100644 cow_protocol/cow_swap.md delete mode 100644 cross_domain_mev/README.md delete mode 100644 defi_and_trading/README.md delete mode 100644 defi_and_trading/day-trading/README.md delete mode 100644 defi_and_trading/defi-glossary.md delete mode 100644 defi_and_trading/derivatives/README.md delete mode 100644 defi_and_trading/liquidity/tokemak.md delete mode 100644 defi_and_trading/stablecoins/README.md delete mode 100644 defi_and_trading/staking/README.md delete mode 100644 defi_and_trading/whales/README.md delete mode 100644 flashbots/README.md delete mode 100644 flashbots/scripts/README.md delete mode 100644 flashbots/suave/README.md delete mode 100644 flashbots/tools/README.md delete mode 100644 flashbots/tools/tool.md delete mode 100644 flashloans/README.md delete mode 100644 flashloans/protocols/README.md delete mode 100644 front_running/FaaS.md delete mode 100644 front_running/README.md delete mode 100644 latency/README.md delete mode 100644 liquidations/README.md delete mode 100644 nft_arbitrage/README.md delete mode 100644 oracles/README.md delete mode 100644 oracles/chainlink.md delete mode 100644 oracles/twamm.md delete mode 100644 oracles/twap.md delete mode 100644 private_order_flows/README.md delete mode 100644 pvp_war/README.md delete mode 100644 rook/README.md delete mode 100644 rook/docs/MEV-at-KeeperDAO.md delete mode 100644 rook/docs/coordination_protocol.md delete mode 100644 rook/docs/hiding-vault-x-compound.md delete mode 100644 rook/docs/hiding_game.md delete mode 100644 rook/docs/hiding_vault.md delete mode 100644 rook/docs/introducing-kcompound.md delete mode 100644 rook/docs/liquidity_pools.md delete mode 100644 rook/docs/proposal-rooknomics.md delete mode 100644 rook/docs/the-mission-of-KeeperDAO.md delete mode 100644 rook/docs/the_new_citadel.md delete mode 100644 rook/docs/treasure-growth-plan.md delete mode 100644 rook/docs/whitepaper-notes.md delete mode 100644 sandwich/README.md delete mode 100644 sandwich/cross_trading.md delete mode 100644 sniping/README.md delete mode 100644 tokenomics/README.md delete mode 100644 tokenomics/voter_escrowed_tokens.md delete mode 100644 uniswap/README.md delete mode 100644 uniswap/uniswap-v3/README.md delete mode 100644 uniswap/uniswap-v3/just-in-time.md diff --git a/0x_protocol/README.md b/0x_protocol/README.md deleted file mode 100644 index 116ca7a..0000000 --- a/0x_protocol/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# šŸ 0x protocol - -
- -### tl; dr - -* 0x request-for-quote (rfq), mev proof + zero slippage trades -* all communication happens off-chain until settlement, making the system extremely gas efficient for market makers -* trades are impossible to front-run or sandwich: no mev -* trades have zero slippage, zero fees (aside from gas), and are settled at a predetermined price -* highly capital efficient (max trade size = balance of market marker) -* rfq liquidity is composable -* off-chain orders, on-chain settlement -* the `txOrigin` field must be set and enforces that the order can only be filled by the specified address - it is impossible for any other trader or bot to front-run the trade. - - - -
- ----- - -### resources - -
- -* [matcha.xyz](https://matcha.xyz/) -* [RFQ orders official guide](https://protocol.0x.org/en/latest/basics/orders.html#rfq-orders) -* [0xv4 RFQ order guide](https://gist.github.com/lampshade9909/cf16b2aa198e4df8d00702ffd7bf506a) -* [0x at mev.wtf](https://docs.google.com/presentation/d/1kde_3RPgHJP0vOP8GG92mlA7VtdGdHiGdrEGhFhx-5U/edit#slide=id.g465c39fec5_0_1309) diff --git a/0x_protocol/RFQ.md b/0x_protocol/RFQ.md deleted file mode 100644 index 6a191b4..0000000 --- a/0x_protocol/RFQ.md +++ /dev/null @@ -1,12 +0,0 @@ -## Request-for-Quote (RFQ) - -### tl; dr - - -
- ---- - -### resources - -* [0xv4 RFQ order guide in python](https://gist.github.com/lampshade9909/cf16b2aa198e4df8d00702ffd7bf506a) diff --git a/MEV_and_trading/README.md b/MEV_and_trading/README.md new file mode 100644 index 0000000..2983b1f --- /dev/null +++ b/MEV_and_trading/README.md @@ -0,0 +1,90 @@ +## trading and defi + +
+ +### tl; dr + +
+ +* in november/2018, uniswap v1 was published to ethereum mainnet as the first amm for defi. +* in july/2019, synthetix creates a sETH/ETH liquidity pool on uniswap, enabling users to earn yield by adding liquidity. +* in 2020, eth drops more than 30% due to the pandemic, with a wave of liquidations by users' ETH collateral losing value, but it ignites the defi summer and all the nice things after. + + + +
+ +---- + +### in this dir + +
+ + + + +* [day trading](day-trading) +* [derivatives](derivatives) +* [stablecoins](stablecoins) +* [liquidity](liquidity) +* [staking](staking) +* [lending](lending) +* [vaults](vaults) +* [whales](whales) +* [bridges](bridges) +* [protocols](protocols) +* [backtesting](backtesting) +* [macroeconomy](macroeconomy) +* [market makers](market_makers) +* [high frequency trading](high_frequency) +* [trading strategy metrics](strategy_metrics) +* [market manipulation techniques](market_manipulation) + +
+ +--- + +### basics for traders + +
+ +* [nested.fi explorer](https://app.nested.fi/explorer) +* [how to profit from cults in crypto](https://twitter.com/TyrogueD/status/1630331151515615232) + + +
+ +--- + + +### resources + +
+ + +* [anatomy of trador bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/bots/tradors.md) +* [defi and trading glossary](https://docs.cyph3rs.xyz/resources/defi-and-mev-glossary) +* [defi helper](https://app.defihelper.io/protocols?filter=All) +* [indexcoop](https://indexcoop.com/) +* [defi pulse](https://www.defipulse.com/) +* [defi prime](https://defiprime.com/) +* [defi llama](https://defillama.com/) +* [dex screener](https://dexscreener.com/) +* [l2 beat](https://l2beat.com/scaling/tvl/) +* [token analyzor](https://dune.com/defimochi/token-god-mode) +* [defi tokens wiki](https://github.com/defi-wikis/defi-tokens-wiki) +* [token unlocks 2023](https://twitter.com/karl_0x/status/1605832705848971264) +* [impermanent loss simulator](https://baller.netlify.app/) +* [insight over several protocols](https://defi-mochi.notion.site/d2cf08cb79254dcf8f30e08cc38761f4?v=81df8226157849ee94a1c859c1e13329) +* [crypto market by capitalization charts](https://cryptomarketpool.com/crypto-market-charts/) +* [top crypto spot exchanges](https://coinmarketcap.com/rankings/exchanges/) + + +
+ +--- + +### tools + +* [into the cryptoverse](https://intothecryptoverse.com/) +* [trading view](https://www.tradingview.com/) diff --git a/MEV_and_trading/backtesting/README.md b/MEV_and_trading/backtesting/README.md new file mode 100644 index 0000000..8255748 --- /dev/null +++ b/MEV_and_trading/backtesting/README.md @@ -0,0 +1,20 @@ +## backtesting + +
+ +### tl; dr + +
+ +* backtesting is a critical component of any trading strategy, allowing traders to evaluate the performance of their trading algorithm with historical data. + +
+ +--- + +### external resources + +
+ +* [using mont carlo for backtesting](https://tradingstrategy.ai/blog/why-you-should-use-a-monte-carlo-simulation-for-backtesting) +* [historical data and api for backstesting](https://tradingstrategy.ai/trading-view/backtesting) diff --git a/defi_and_trading/bridges/README.md b/MEV_and_trading/bridges/README.md similarity index 94% rename from defi_and_trading/bridges/README.md rename to MEV_and_trading/bridges/README.md index e7b1454..7b07662 100644 --- a/defi_and_trading/bridges/README.md +++ b/MEV_and_trading/bridges/README.md @@ -1,9 +1,11 @@ -## Bridges +## bridges
-### Centralized Bridge +### centralized + +
* Centralized bridges are essentially hot wallets straddling the fence between multiple chains. * They hold a user’s assets on one chain and issue them a corresponding amount of tokens on another chain. @@ -12,8 +14,11 @@ * The security risks of a centralized bridge are the same security risks that exist for exchanges and custodians. * Their primary responsibility is securing private keys (key management), and as a result centralized bridges have proven to be pretty secure. +
-### Proof of Stake Bridge +### proof-of-stake bridge + +
* Proof of Stake bridges are like little blockchain networks narrowly focused on facilitating cross-chain activity. * Whereas centralized bridges are managed by a single entity, proof of stake bridges are managed by a group. @@ -21,8 +26,11 @@ * Because POS bridges involve both smart contracts and a group of centralized gatekeepers, they inherit all the code risk of Web 3 and the traditional security risks of Web 2 (key management, access controls). * POS bridges have the most attack vectors, and have unfortunately been the victims of most of the major exploits. +
-### Decentralized Bridge +### decentralized bridge + +
* Decentralized bridges take a proof of deposit from one chain and validate it on the other chain (ex: Polygon Plasma Bridge). * Decentralized bridges are all code. They don’t rely on centralized signers/validators, so while there’s more code risk, they don’t have to worry about the traditional security risks that POS bridges deal with. diff --git a/MEV_and_trading/day-trading/README.md b/MEV_and_trading/day-trading/README.md new file mode 100644 index 0000000..01eadaa --- /dev/null +++ b/MEV_and_trading/day-trading/README.md @@ -0,0 +1,25 @@ +## trading + +
+ +### in this dir + +
+ +* [leverage](leverage) +* [order types](orders_types) +* [trading types](trading_types) +* [techical analysis](technical_analysis) +* [investing strategies](investing_strategies) + +
+ +--- + +### resources + +
+ +* [strategy simulator](https://simulatooor.streamlit.app/) +* [how to read candlesticks charts](https://www.youtube.com/watch?v=9fqBykOBeCg) +* [are market efficient, by chicago booth](https://www.youtube.com/watch?v=bM9bYOBuKF4) diff --git a/MEV_and_trading/day-trading/investing_strategies/README.md b/MEV_and_trading/day-trading/investing_strategies/README.md new file mode 100644 index 0000000..4f451cd --- /dev/null +++ b/MEV_and_trading/day-trading/investing_strategies/README.md @@ -0,0 +1,24 @@ +## investing strategies + +
+ +#### portifolio overview + +
+ +* stables: 25% +* btc, eth: 25% (small/mid ports), 50% (larger ports) - x5 to x10 upside in the next 5 years +* exposures: 25% to top 200 market cap for n10-x100 usage +* small caps: allocate a small amount to (possible rugs) giving x100-x1000 +* make a plan for take profits (TP) and an exit plan +* move big wins/profits to a hardware wallet + +
+ +#### alpha finding + +* defillama +* smart/whale wallets +* some private telegram, discord, twitters +* tools such as arkham, nansen, token terminal + diff --git a/defi_and_trading/day-trading/leverage/README.md b/MEV_and_trading/day-trading/leverage/README.md similarity index 70% rename from defi_and_trading/day-trading/leverage/README.md rename to MEV_and_trading/day-trading/leverage/README.md index b804be8..f3c4b94 100644 --- a/defi_and_trading/day-trading/leverage/README.md +++ b/MEV_and_trading/day-trading/leverage/README.md @@ -1,5 +1,7 @@ ## trading with leverage +
+ ### tl;dr * you need to know what you are doing. @@ -8,4 +10,5 @@ ### resources +* [leverage by coindataschool](https://coindataschool.substack.com/p/leverage) * [introducing arcadia finance](https://arcadiafinance.medium.com/introducing-arcadia-finance-8bb004a39b4d) diff --git a/defi_and_trading/day-trading/orders_types/README.md b/MEV_and_trading/day-trading/orders_types/README.md similarity index 100% rename from defi_and_trading/day-trading/orders_types/README.md rename to MEV_and_trading/day-trading/orders_types/README.md diff --git a/MEV_and_trading/day-trading/technical_analysis/README.md b/MEV_and_trading/day-trading/technical_analysis/README.md new file mode 100644 index 0000000..d9c2769 --- /dev/null +++ b/MEV_and_trading/day-trading/technical_analysis/README.md @@ -0,0 +1,45 @@ +## technical analysis + +
+ +### tl; dr + +* uses trading data to analyse and predict price patterns +* gives us data points to compare and contrast +* uses chart patterns, price data, trading volume and indicators +* allows us to follow a systematic strategy that can be improved + + +
+ + + +#### šŸ‘‰šŸ¼ [reading candlestick charts](candlestick_charts.md) + + +
+ +---- + +### resources + +
+ +* [bull market indicators](https://twitter.com/Phoenix_Ash3s/status/1645654858106634242) + + +
+ + +--- + +### tools + +
+ +* [tradingview](https://www.tradingview.com/) +* [tokenmetrics](https://tokenmetrics.com/) + + + + diff --git a/defi_and_trading/day-trading/technical_analysis/README.md b/MEV_and_trading/day-trading/technical_analysis/candlestick_charts.md similarity index 88% rename from defi_and_trading/day-trading/technical_analysis/README.md rename to MEV_and_trading/day-trading/technical_analysis/candlestick_charts.md index 2e6bfff..e34c52e 100644 --- a/defi_and_trading/day-trading/technical_analysis/README.md +++ b/MEV_and_trading/day-trading/technical_analysis/candlestick_charts.md @@ -1,26 +1,17 @@ -## technical analysis - -### tl; dr - -* uses trading data to analyse and predict price patterns -* gives us data points to compare and contrast -* uses chart patterns, price data, trading volume and indicators -* allows us to follow a systematic strategy that can be improved -* cannot predict the future - +## candlestick charts
---- +### tl; dr -### candlestick charts +
-* data rich trading analysis -* time and price details -* traders use candlestick chat patterns to antecipate the future -* show market high and low for a given time period -* each candle is a period in time -* tells: open/close (body) high/low (wick) for a period of time + +* candlestick andlestick charts are used by traders to determine possible price movement based on past patterns, where each candle is a period of time +* data rich trading analysis: + * time and price details + * show market high and low for a given time period + * open/close (body) high/low (wick) for a period of time
@@ -32,7 +23,11 @@
-##### hammer pattern +---- + +### hammer pattern + +
* bullish pattern * sellers drove price lower during the day @@ -49,7 +44,11 @@
-##### shooting star pattern +---- + +### shooting star pattern + + * bearish pattern * buyers drove price high @@ -63,7 +62,13 @@


-##### bullish engulfing pattern +
+ +---- + +### bullish engulfing pattern + + * bullish pattern * bullish candlestick "engulfed" the bearish candlestick @@ -74,9 +79,15 @@

+ +
-##### bearish engulfing pattern +---- + +### bearish engulfing pattern + +
* bearish pattern * bearish candlestick engulfed the bullish candlestick @@ -92,7 +103,9 @@ ---- -### chart patterns +### chart momenta + +
* used in conjuction with candlestick charts * longer-term analysis of market movements @@ -100,9 +113,12 @@ * used with day trading and swing trading * dont tell about longer term trends +
+ ##### double top + * bearish pattern * buyers tried wtice to push price higher * buyers unable to push price higher @@ -116,10 +132,14 @@

+
+ ##### double bottom +
+ * bullish pattern * sellers came in twice * price found support of buyers twice @@ -139,6 +159,8 @@ ##### asceding triangle +
+ * charts never trade in a straight line * charts trend * highs and lows are important @@ -148,6 +170,7 @@
+

@@ -161,6 +184,7 @@ ### trends +
* we can't trade from patterns all the time, they are quite rare * trends patterns will guide us more often @@ -169,6 +193,7 @@
+ ##### asceding wedge - higher lows @@ -236,6 +261,8 @@ ### how to trade with trends +
+ 1. Identify the market trends 2. Ask where are the main areas of trade - where is support and resistance? @@ -246,13 +273,3 @@
- ---- - -### resources - -* [tradingview](https://www.tradingview.com/) -* [tokenmetrics](https://tokenmetrics.com/) - - - diff --git a/defi_and_trading/day-trading/trading_types/README.md b/MEV_and_trading/day-trading/trading_types/README.md similarity index 94% rename from defi_and_trading/day-trading/trading_types/README.md rename to MEV_and_trading/day-trading/trading_types/README.md index 9cf3d11..981c8ba 100644 --- a/defi_and_trading/day-trading/trading_types/README.md +++ b/MEV_and_trading/day-trading/trading_types/README.md @@ -1,9 +1,11 @@ -## Types of trading +## trading types
-### Swing trading +### swing trading + +
* short-medium term trades * open trades for days-weeks @@ -19,7 +21,9 @@ --- -### Breakout trading +### breakout trading + +
* short term trades * oepn trades for hours-days @@ -60,6 +64,8 @@ ### dollar cost averaging +
+ * long-term strategy * price agnostic * fundamental analysis diff --git a/MEV_and_trading/derivatives/README.md b/MEV_and_trading/derivatives/README.md new file mode 100644 index 0000000..08964fa --- /dev/null +++ b/MEV_and_trading/derivatives/README.md @@ -0,0 +1,44 @@ +## derivatives + +
+ +### tl; dr + +
+ + +* **derivatives** are financial contracts that derive their values from underlying assets. +* **[futures](futures.md)**: + - contracts are proxy tools to speculate on the future prices of cryptocurrencies or to be used to hedge against their price changes. +* **[perpetuals](perpetuals)**: + - derivative contracts with no expiration date. +* **[options](options.md)**: + - derivatives that give the buyer the right to buy or sell the underlying asset at a stated price within a specified period. + +
+ +--- + +### theory + +
+ +* [bsm](bsm.md) + + +
+ +--- + +### links + +
+ +* [defi derivative landscape](https://github.com/0xperp/defi-derivatives) +* [put-call parity](https://www.investopedia.com/terms/p/putcallparity.asp) +* [spin.fi, on near](https://trade.spin.fi/) +* [orderly, on near](https://orderly.network/) +* [metronome risk assessment](https://cryptorisks.substack.com/p/risk-assessment-metronome) +* [what's open interest, by perpetual protocol](https://perpprotocol.mirror.xyz/ntYaYXMFJJQ2Fr8QFXBX1P16w76q1Nd-eBHn_1-AAV0) + + diff --git a/MEV_and_trading/derivatives/bsm.md b/MEV_and_trading/derivatives/bsm.md new file mode 100644 index 0000000..f170113 --- /dev/null +++ b/MEV_and_trading/derivatives/bsm.md @@ -0,0 +1,19 @@ +## black-sholes model + +
+ +### tl; dr + +
+ +* mathematical equations that estimates the theoretical value of derivatives based on other investiment instruments +* widely used to price options contracts +* requires five input variables: the strike price of an option, the current stock price, the time to expiration, the risk-free rate, and the volatility +* it posits that these instruments will have a lognormal distribution of prices following a random walk with constant drift and volatility +* it derives the price of a european-style call option +* assumptions: no dividents are paid out during the life of the options, markets are random, no transaction costs in buying the option, risk-free rate and volatility of the underlying assets are known and constant, the returns of the underlying assets are normally distributed. + + +
+ + diff --git a/MEV_and_trading/derivatives/futures.md b/MEV_and_trading/derivatives/futures.md new file mode 100644 index 0000000..5cc8ca9 --- /dev/null +++ b/MEV_and_trading/derivatives/futures.md @@ -0,0 +1,3 @@ +## futures + +
diff --git a/MEV_and_trading/derivatives/options.md b/MEV_and_trading/derivatives/options.md new file mode 100644 index 0000000..aae2735 --- /dev/null +++ b/MEV_and_trading/derivatives/options.md @@ -0,0 +1,93 @@ +## options + +
+ +### tl; dr + +
+ +* **options can be used to speculate on the future price and volatility of an asset, and to manage risks in a portfolio.** +* options can be thought of as "insurance-like" contracts where one pays a premium upfront. profits come from "disaster events", with **capped losses** and **unlimited upsides**. +* purchasers of options receive the **right** to buy or sell the underlying asset at a predetermined **strike price**. **option chains** list **calls** (ability to buy the asset) and **puts** (ability to sell the asset) for a given expiration across a variety of **strikes**. +* options also gives leverage by chasing cheaper premiums (e.g. shortening expirations). +* options contracts contain the following information: + - nature of the right: from the option buyers’ perspective, to buy (call) or sell (put) the asset. + - specification and quantity of underlying asset (e.g., 1 BTC). + - strike (or exercise) price: the price paid or received for the asset if the option is exercised. + - expiration date: the last date the option can be exercised. + - rules for exercise and settlement. + +
+ + + + + + +
+ +--- + +### protocols + +
+ +#### [thales](https://thalesmarket.io/) + + + +* decentralized binary options protocol that a group of Synthetix community members spun in 2020. +* if held until expiry, binary options have only two payoff possibilities: a predetermined amount of profit or nothing. +* relies on Synthetix's sUSD stablecoin for minting its binary options tokens and as the platform's unit of account. + +
+ + + +#### [lyra.finance](https://www.lyra.finance/) + +* chains: arbitrum, optimism, ethereum +* decentralized options trading protocol powered by a specialized AMM system. +* it uses synthetix's sUSD stablecoin as its exclusive quote asset, so traders pay for opening long positions or closing short positions with sUSD. +* uses synthetix as a one-stop protocol for getting long and short exposure on its markets' base assets (delta hedging). +* [guide to trade on lyra](https://newsletter.banklesshq.com/p/a-guide-to-options-on-lyra) + +
+ +#### [hegic](https://www.hegic.co/app#/arbitrum/trade/new) + +* chains: arbitrum, ethereum + + +
+ +#### [siren](https://siren.xyz/) + +* chain: polygon + +
+ +#### [whiteheart](https://www.whiteheart.finance/#/swap-wrap/wrap?from=WBTC&to=WHBTC) + +* chains: ethereum + +
+ +#### [premia](https://app.premia.finance/options) + +* chains: ethereum, arbitrum, fantom, optimism + +
+ +#### [kwenta](https://mirror.xyz/kwenta.eth/nPp4epdHb1OZlta1YXfPVeBNL89P_jpQGgruC9daOdc) + + +
+ +--- + +### external resources + +
+ +* [options for beginners, by defi educations](https://defieducation.substack.com/p/options-for-beginners) diff --git a/MEV_and_trading/derivatives/perpetuals/README.md b/MEV_and_trading/derivatives/perpetuals/README.md new file mode 100644 index 0000000..165a872 --- /dev/null +++ b/MEV_and_trading/derivatives/perpetuals/README.md @@ -0,0 +1,20 @@ +## perpetuals + +
+ +### protocols + +
+ +* [perpetual swap](perpetual_swap.md) +* [synthetix](synthetix.md) +* [vela](vela.md) + + + + +
+ +---- + +### resources diff --git a/MEV_and_trading/derivatives/perpetuals/perpetual_swap.md b/MEV_and_trading/derivatives/perpetuals/perpetual_swap.md new file mode 100644 index 0000000..992f7cc --- /dev/null +++ b/MEV_and_trading/derivatives/perpetuals/perpetual_swap.md @@ -0,0 +1,20 @@ +## [perpetual swap](https://app.laevitas.ch/altsderivs/GMX/perpetualswaps) + +
+ +### tl; dr + +
+ +* trading product first introduced in 2016 by bitmex +* has become popular with trading volumes of over $180 mi +* offer traders a chance to take on large positions with little money down +* like other types of derivatives such as futures and options, perpetual swaps provide a means to speculate on the value of the assets while the contract is held +* unlike future contracts, perpetual swaps do not have expiration dates +* [hot tub by perpetual swap](https://perpprotocol.mirror.xyz/8C0shiFg0YbhkGOF3i9jFVmyCumKncdsgviDE4qQtjQ) + +
+ +---- + +### resources diff --git a/MEV_and_trading/derivatives/perpetuals/synthetix.md b/MEV_and_trading/derivatives/perpetuals/synthetix.md new file mode 100644 index 0000000..b429b71 --- /dev/null +++ b/MEV_and_trading/derivatives/perpetuals/synthetix.md @@ -0,0 +1,18 @@ +## [synthetix](https://synthetix.io/) + +
+ +### tl; dr + +
+ +* one of ethereum's ecosystem's leading derivatives projects. +* a derivative liquidity protocol that powers the creation of "synths" (synthetic assets) that can be traded in a decentralized and permissionless manner. +* synths let traders capitalize on exposure to assets without having to directly own the assets in question. +* some of Synthetix's most popular synths are its forex synths: sUDS and sEUR. +* a foundational element of Synthetix is SNX staking, which is used for collateralizing the derivatives protocol and for creating deep liquidity for synths. +* SNX stakers earn inflationary SNX rewards and a cut of sUSD fees generated by protocols that work on top of Synthetix. +* [kwenta perp trading platform on synthetix](https://mirror.xyz/kwenta.eth) + * The primary DEX in the Synthetix ecosystem. + * Designed to facilitate zero-slippage synth trading. + * it does not rely on an orderbook or liquidity pool model, but instead the DEX employs a peer-to-contract system in which synths are traded against a smart contract informed by Chainlink price feeds. diff --git a/MEV_and_trading/derivatives/perpetuals/vela.md b/MEV_and_trading/derivatives/perpetuals/vela.md new file mode 100644 index 0000000..e35c63b --- /dev/null +++ b/MEV_and_trading/derivatives/perpetuals/vela.md @@ -0,0 +1,16 @@ +## vela + +
+ +### tl; dr + +
+ +* vela is a decentralized exchange with advanced perpetuals trading capabilities, community-focused incentives, and scalable infrastructure. +* vela exchange is supported by a robust token infrastructure, $VELA, which is the primary utility token, and $VLP, the liquidity provider token that provides holders and stakers with rewards and incentives. + +
+ +--- + +### resourcesi diff --git a/MEV_and_trading/high_frequency/README.md b/MEV_and_trading/high_frequency/README.md new file mode 100644 index 0000000..63d8da9 --- /dev/null +++ b/MEV_and_trading/high_frequency/README.md @@ -0,0 +1,35 @@ +## high frequency trading (HFT) + +
+ +### tl; dr + +
+ +* algorithmic financial trading with high speeds, turnover rates, order-to-trade rates, leveraging high-frequency financial data and tools. +* this strategy was first made popular by renaissance technologies (from Jim Simons, "father of quant), who use both HFT and quantitative aspects in their trading. + +
+ +##### the efficient market hypothesis. + +
+ +* the efficient-market hypothesis (EMH) is a hypothesis in financial economics that states that asset prices reflect all available information. +* an implication is that it is impossible to "beat the market" consistently on a risk-adjusted basis since market prices should only react to new information. +* however, the market may take months, years or decades to adjust šŸ˜‰ + +
+ +--- + +### references + +
+ +* [this repo on stat arb for searchers](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/stat_arbs) +* [go-ouside-labs on htf-autonomous-agents](https://github.com/go-outside-labs/ml-htf-autonomous-agents) +* [building a scalable event scanner for ethereum, by dr. m. steinkirch](https://mirror.xyz/steinkirch.eth/vSF18xcLyfXLIWwxjreRa3I_XskwgnjSc6pScegNJWI) +* [latency wars and mev, by blocknative](https://www.youtube.com/watch?v=xp6EIvSbDSs) + +
diff --git a/MEV_and_trading/lending/README.md b/MEV_and_trading/lending/README.md new file mode 100644 index 0000000..fa7d238 --- /dev/null +++ b/MEV_and_trading/lending/README.md @@ -0,0 +1,35 @@ +## lending + +
+ +### tl; dr + +
+ +* alice and bob deposit funds into a lending contract (e.g., aave, maker, compound). while bob leaves his original collateral locked in the protocol, he can withdraw ~50% or more (depending on the protocol and asset) at some algorithmic rate that gets paid to alice (for providing the funds). +* bob can then create a short position, reinvest for a levered long position, or withdraw money (without selling the underlying and being taxed). alice, on the other hand, generates a return on her capital. +* liquidation is paid to the address that flags loans that crossed collateralization threshold (anyone monitoring the mempool and external oracles). + +
+ +--- + +### in this dir + +
+ +* [protocols](protocols) +* [collateralized](collateralized.md) +* [uncollateralized](uncollateralized.md) +* [composable leverage](composable.md) + +
+ +--- + +### resources + +
+ +* [survey of defi lending](https://timroughgarden.github.io/fob21/reports/r5.pdf) +* [leveraged lending, by defillama](https://defillama.com/yields/loop) diff --git a/MEV_and_trading/lending/collateralized.md b/MEV_and_trading/lending/collateralized.md new file mode 100644 index 0000000..b555bd3 --- /dev/null +++ b/MEV_and_trading/lending/collateralized.md @@ -0,0 +1,15 @@ +## uncollateralized lending + +
+ +### tl;dr + +
+ +- + +
+ +--- + +### resources diff --git a/MEV_and_trading/lending/composable.md b/MEV_and_trading/lending/composable.md new file mode 100644 index 0000000..a00ab49 --- /dev/null +++ b/MEV_and_trading/lending/composable.md @@ -0,0 +1,17 @@ +## composable leverage + +
+ +### tl;dr + +
+ +
+ +--- + +### resources + +
+ +* [gearbox protocol](https://gearbox.fi/) diff --git a/MEV_and_trading/lending/protocols/README.md b/MEV_and_trading/lending/protocols/README.md new file mode 100644 index 0000000..2a0d231 --- /dev/null +++ b/MEV_and_trading/lending/protocols/README.md @@ -0,0 +1,17 @@ +## protocols + +
+ +* [aave](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_strategies/liquidations/aave.md) +* [compound](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_strategies/liquidations/compound.md) +* [silo](silo.md) + +
+ +---- + +### resources + +
+ +* [comparisons of flashloans on ethereum](https://github.com/go-outside-labs/blockchain-science-rs/tree/main/foundry-flashloans) diff --git a/MEV_and_trading/lending/protocols/silo.md b/MEV_and_trading/lending/protocols/silo.md new file mode 100644 index 0000000..f4a524e --- /dev/null +++ b/MEV_and_trading/lending/protocols/silo.md @@ -0,0 +1,11 @@ +## silo + +
+ +### tl; dr + +
+ +* as opposed to shared-pool protocols such as aave or compound, silo uses an isolated-pool approach where every token asset has its own lending market and is paired against the bridge assets ETH and silo's overcollaterized stablecoin XAI. +* lenders in all protocols are exposed to the risk of eth and xai. since all tokens are paired with eth or xai, there is only a single market for every token asset, preventing fractured liquidity and allowing protocol efficiency. +* diff --git a/MEV_and_trading/lending/uncollateralized.md b/MEV_and_trading/lending/uncollateralized.md new file mode 100644 index 0000000..b555bd3 --- /dev/null +++ b/MEV_and_trading/lending/uncollateralized.md @@ -0,0 +1,15 @@ +## uncollateralized lending + +
+ +### tl;dr + +
+ +- + +
+ +--- + +### resources diff --git a/MEV_and_trading/liquidity/README.md b/MEV_and_trading/liquidity/README.md new file mode 100644 index 0000000..8a25b0d --- /dev/null +++ b/MEV_and_trading/liquidity/README.md @@ -0,0 +1,29 @@ +## liquidity + +
+ +### tl; dr + +
+ + +
+ +--- + +### in this dir + +
+ +* [balancer](balancer.md) +* [tokemak](tokemak.md) + +
+ +---- + +### resources + +
+ +* [probabilistic liquidity attacks, by t. chitra et al](https://drive.google.com/file/d/1kCsmC52Jbhj8bpQMMo3-Z92P6L5E5hxl/view) diff --git a/MEV_and_trading/liquidity/balancer.md b/MEV_and_trading/liquidity/balancer.md new file mode 100644 index 0000000..7db4a3c --- /dev/null +++ b/MEV_and_trading/liquidity/balancer.md @@ -0,0 +1,34 @@ +## balancer + +
+ +### tl; dr + +* liquidity infrastructure + +
+ +--- + + +### composable stable pools + +* contribute more than $640M to balancer's tvl +* one of the many technical components of balancer's flexible amm framework and essential for token like stables or lsds +* these pools are designed for assets that are either expected to consistently trade at near parity, or at a known exchange rate +* pools use stable math, based on stableswap (populatized by curve finance) +* reinforced by balancer's nested pool v2 infrastructure, metastable pools have a myriad of benefits compared to a standard pool 2: correlated token liquidity utilization, reduced liquidity fragmentation of like-assets, capital efficiency. +* use cases include: bb-g-USD, wstETH, and bb-i-USD. +* protocols like gearbox, lido, and idle continue to expand on the capabilities of metastable pools. +* best assets are either pegged or correlated (e.g rETH and boosted pools like bb-g-USD). +* token swaps can occur between any and all nested pools within balancer (e.g. aave boosted pools and rocket pool lsd eth). +* each pool has a function known as a rate provider that updates tokens to the correct ratio any time a trade takes place. this function means that liquid staked yield flows to liquidity providers rather than arbers. + +
+ +--- + +## resources + + +* [balancer $veBAL halving](https://twitter.com/Balancer/status/1640716383939104770) diff --git a/MEV_and_trading/liquidity/tokemak.md b/MEV_and_trading/liquidity/tokemak.md new file mode 100644 index 0000000..b1ad59a --- /dev/null +++ b/MEV_and_trading/liquidity/tokemak.md @@ -0,0 +1,34 @@ +## [tokemak](https://www.tokemak.xyz/) + +
+ +### tl; dr + +
+ + +* decentralized market making platform that allows liquidity flow, designed to generate liquidity for defi and future tokenized dapps. +* reactors are 2 pools: host staked assets on each side of the pools, one reactor is the pair reactor, the other is the token reactor. participants are LP (providing assets), liquidity directors (direct assets), and pricers (third party pricers for non-AMM venues). +* tokemak locks up $ETH and $USDC which are base tokens that any pool could be built on, users deposit these base assets for APR paid out in $TOKE. +* tokemak protocol is called C.o.R.E (Collateralization of Reactors Event) secure token reactors on the platform by placing bribes using a bribe marketplace called hidden hand. $TOKE holders secure their share of the bribes by using their voting power to vote on particular reactors. $TOKE can be thought of as tokenized liquidity. +* impermanent loss protection through a mitigation waterfall: the protocol pulls the required asset from its reserve and ensures 1:1 withdrawals for the asset and the asset's t token. in the pair reactors, the protocol pulls the asset from their "treasure" from either fees or swapping. + +
+ +### tokenomics + +
+ + + + + +
+ +--- + +### resources + +
+ +* [hidden hand docs](https://hiddenhand.finance/) diff --git a/MEV_and_trading/macroeconomy/README.md b/MEV_and_trading/macroeconomy/README.md new file mode 100644 index 0000000..5fcdacc --- /dev/null +++ b/MEV_and_trading/macroeconomy/README.md @@ -0,0 +1,19 @@ +## macroeconomy + +
+ +### tl; dr + +
+ +##### šŸ‘‰šŸ¼ [macroeconomy concepts](concepts.md) + +
+ +--- + +### resources + +* [2023 crypto market outlook, by coinbase](https://malleable-viola-235.notion.site/2023-Crypto-Market-Outlook-38f55249c1464496b1ee30b60f76c040) +* [euridollar academy, by jeff snider](https://www.eurodollar.university/) +* [investiment strategy, by lyn alden](https://www.lynalden.com/) diff --git a/MEV_and_trading/macroeconomy/concepts.md b/MEV_and_trading/macroeconomy/concepts.md new file mode 100644 index 0000000..2b825ce --- /dev/null +++ b/MEV_and_trading/macroeconomy/concepts.md @@ -0,0 +1,136 @@ +## macroeconomy concepts + +
+ +#### unrealized losses + +
+ + +Unrealized losses refer to losses that an investor or trader is currently holding on an investment but has not yet sold or realized. These losses are based on the current market value of the investment and can fluctuate as the market value changes. + +For example, if an investor purchased a stock for $50 per share and it is currently trading at $40 per share, the investor would have an unrealized loss of $10 per share. However, if the investor continues to hold onto the stock and the price eventually goes back up to $50 per share or higher, the unrealized loss would be eliminated, and the investor would not have actually realized a loss. + +Unrealized losses are important to consider when making investment decisions because they can impact an investor's overall portfolio performance and risk level. + + + +
+ +#### bonds + +
+ +Bonds are debt securities issued by companies, municipalities, or governments to raise capital. When an investor buys a bond, they are essentially loaning money to the issuer of the bond, who agrees to pay the investor interest on the borrowed funds for a specified period of time, usually until the bond matures. + +Bonds typically have a fixed interest rate, also known as the coupon rate, which is paid out to the bondholder periodically (usually semi-annually). At maturity, the issuer pays back the face value of the bond to the bondholder. + +Bonds are a popular investment choice for investors who seek a fixed-income stream and want to diversify their portfolio. Bonds are generally considered less risky than stocks, but they still carry some level of risk depending on the issuer's creditworthiness and the overall economic and market conditions. Bonds are also traded in the financial markets and their prices can fluctuate based on changes in interest rates, inflation, and the issuer's credit rating. + + + +
+ +#### defaulting mean + +
+ +Defaulting refers to a situation in which a borrower fails to repay a debt as per the agreed-upon terms and conditions. When a borrower defaults on a loan or bond, it means they have failed to make payments on the principal amount, interest, or both, and have violated the terms of the loan agreement. + +Defaulting on a loan or bond can have serious consequences for the borrower, such as penalties, higher interest rates, legal action, and damage to their credit score. For bondholders, default can mean a loss of income and principal, and a decline in the value of their investment. + +In the context of sovereign debt, default means that a country has failed to make payments on its government bonds or loans, leading to a financial crisis that can have serious economic and social implications for the country and its citizens. Default by a sovereign borrower can also trigger broader market turmoil and affect the global financial system. + + + + +
+ +#### quantitative tightening + +
+ + +Quantitative tightening is a contractionary monetary policy tool used by central banks to reduce the money supply and control inflation. It involves the sale of assets, such as government bonds, from the central bank's balance sheet, thereby decreasing the amount of money in circulation and increasing the cost of borrowing. + +During quantitative tightening, the central bank reduces the amount of money in the economy by reversing its earlier asset purchase programs, which are part of quantitative easing. The central bank sells the bonds it purchased during quantitative easing, which reduces the amount of reserves held by banks, and thereby reduces the amount of credit available for lending. + +Quantitative tightening is used to prevent or reduce inflation, as too much money in circulation can lead to inflationary pressures. It can also be used to stabilize the currency exchange rate and reduce the risk of asset bubbles forming in the economy. + +However, quantitative tightening can also have negative effects on the economy, such as slowing down economic growth, reducing liquidity in the financial markets, and increasing the cost of borrowing, which can discourage investment and consumption. Therefore, central banks use quantitative tightening cautiously and only when necessary. + + + + + +
+ +#### t-bills + +
+ + +T-bills, or Treasury bills, are short-term debt securities issued by the United States Department of the Treasury to finance the government's short-term borrowing needs. T-bills are considered to be one of the safest investments as they are backed by the full faith and credit of the U.S. government. + +T-bills are issued with maturities of four, eight, 13, 26, or 52 weeks and are sold at a discount to their face value. For example, a $10,000 T-bill with a 13-week maturity might be sold for $9,950. At maturity, the investor receives the full face value of the bill. + +T-bills are popular with investors who seek low-risk investments with short-term maturities. They are also used as a benchmark for other short-term interest rates, such as the prime rate, and are traded in the secondary market. + +Because T-bills are backed by the U.S. government, they are considered to be virtually risk-free. However, they typically offer lower returns than other types of investments, such as stocks or corporate bonds, which carry more risk. + + + + + +
+ +#### ust + +
+ + +UST stands for United States Treasury, which is the department of the U.S. government that is responsible for issuing and managing the government's debt securities. UST securities include U.S. Treasury bonds, bills, and notes, which are sold to finance the government's borrowing needs and fund its operations. + +UST securities are considered to be one of the safest investments in the world, as they are backed by the full faith and credit of the U.S. government. This means that the government guarantees the timely payment of principal and interest on UST securities, even if it has to borrow more money to do so. + +UST securities are also used as a benchmark for other types of investments, such as corporate bonds, and are considered a safe haven during times of economic uncertainty or market volatility. Because UST securities are considered to be virtually risk-free, they typically offer lower returns than other types of investments, such as stocks or corporate bonds. + +UST securities are issued with different maturities, ranging from 1 month to 30 years, and are sold through public auctions and on the secondary market. They are also widely traded on global financial markets, making them an important part of the global financial system. + + + + +
+ +#### interest rates + +
+ + +Interest rates are the cost of borrowing money or the compensation for lending money. They are expressed as a percentage of the principal amount and are usually calculated on an annual basis, although they can also be calculated for shorter or longer periods. + +When a borrower takes out a loan, they are typically required to pay interest on the amount borrowed, in addition to repaying the principal. The interest rate on a loan is determined by a number of factors, including the creditworthiness of the borrower, the duration of the loan, and prevailing market interest rates. + +Interest rates also play an important role in monetary policy. Central banks use interest rates to control the money supply and influence economic activity. When the central bank raises interest rates, it makes borrowing more expensive, which can slow down economic growth and inflation. When the central bank lowers interest rates, it makes borrowing cheaper, which can stimulate economic activity and inflation. + +Interest rates also affect investments, as they determine the rate of return on bonds, savings accounts, and other fixed-income investments. When interest rates are low, investors may seek higher returns by investing in riskier assets, such as stocks or real estate. When interest rates are high, fixed-income investments become more attractive, as they offer higher returns with less risk. + + + + +
+ +#### reserve repos + +
+ + +A reserve repurchase agreement (repo) is a short-term transaction in which a financial institution, such as a bank or a securities dealer, borrows money from the central bank, pledging securities as collateral. The transaction is structured as a sale of securities with an agreement to buy them back at a later date at a slightly higher price. + +The purpose of a reserve repo is to provide liquidity to financial institutions that may have a temporary need for funds, such as to meet reserve requirements or to manage short-term cash flows. Reserve repos also allow the central bank to control the money supply and influence interest rates. + +In a reserve repo transaction, the financial institution sells securities to the central bank and receives cash, which it can use to meet its liquidity needs. The financial institution also agrees to repurchase the securities at a later date at a slightly higher price, effectively paying interest on the loan. The difference between the sale price and the repurchase price is the interest earned by the central bank. + +Reserve repos are usually very short-term transactions, with maturities ranging from overnight to a few weeks. They are typically used by financial institutions that need to borrow money for a very short period of time and have securities that they can use as collateral. Reserve repos are an important tool for managing the money supply and ensuring the stability of the financial system. + + diff --git a/MEV_and_trading/market_makers/README.md b/MEV_and_trading/market_makers/README.md new file mode 100644 index 0000000..d10d255 --- /dev/null +++ b/MEV_and_trading/market_makers/README.md @@ -0,0 +1,21 @@ +## market makers + +
+ +### tl; dr + +
+ +### in this dir + +
+ +* [professional entities](professional_entities.md) + +
+ +### resources + +
+ +* [economics of money and banking](https://www.coursera.org/learn/money-banking#syllabus) diff --git a/MEV_and_trading/market_makers/professional_entities/README.md b/MEV_and_trading/market_makers/professional_entities/README.md new file mode 100644 index 0000000..9eda169 --- /dev/null +++ b/MEV_and_trading/market_makers/professional_entities/README.md @@ -0,0 +1,17 @@ +## professional market makers entities + +
+ +### tl; dr + +
+ +* alameda +* wintermute +* scp +* jane st + + +
+ +### resources diff --git a/MEV_and_trading/market_manipulation/README.md b/MEV_and_trading/market_manipulation/README.md new file mode 100644 index 0000000..19324bf --- /dev/null +++ b/MEV_and_trading/market_manipulation/README.md @@ -0,0 +1,22 @@ +## market manipulation techniques + +
+ +### tl; dr + +
+ +* market manipulation techniques are designed to deceive investors by artificially controlling or affecting the prices of assets. +* **wash trading**: investors simultaneoulsy sell and buy the same assets to create misleading activity in the market and confuse retail investors (green candle -> read candle -> green candle -> šŸ¤”) +* **pump and dump**: tricky investors start spreading misleading information through social media increading buying pressure so they can sell at inflated price. +* **bear raid**: investors take big short positions and spreadh negativity around assets. +* **spoofing**: investors place fake orders and cancell them before execution (never rely on a single source of information!) + + + +
+ +---- + +### resources + diff --git a/MEV_and_trading/protocols/0x_protocol/README.md b/MEV_and_trading/protocols/0x_protocol/README.md new file mode 100644 index 0000000..5890683 --- /dev/null +++ b/MEV_and_trading/protocols/0x_protocol/README.md @@ -0,0 +1,24 @@ +# 0x protocol + +
+ +### tl; dr + +
+ +* DEX aggregator integrating both on- and off-chain liquidity: + - on-chain liquidity is sourced by sampling smart contract liquidity pools, such as uniswap and curve. + - off-chain liquidity is sourced from professional market makers via the [0x Request-for-Quote (ā€œRFQā€) system](RFQ.md) + + +
+ +---- + +### resources + +
+ +* [matcha.xyz](https://matcha.xyz/) +* [RFQ orders official guide](https://protocol.0x.org/en/latest/basics/orders.html#rfq-orders) +* [0x at mev.wtf](https://docs.google.com/presentation/d/1kde_3RPgHJP0vOP8GG92mlA7VtdGdHiGdrEGhFhx-5U/edit#slide=id.g465c39fec5_0_1309) diff --git a/MEV_and_trading/protocols/0x_protocol/RFQ.md b/MEV_and_trading/protocols/0x_protocol/RFQ.md new file mode 100644 index 0000000..bef7ded --- /dev/null +++ b/MEV_and_trading/protocols/0x_protocol/RFQ.md @@ -0,0 +1,21 @@ +## request-for-quote (RFQ) + +
+ +### tl; dr + +
+ +* rfq-based exchanges work similar to central limit order books (clobs), as users submit orders using signed messages and market makers execute them on-chain (assuming the role of both lps and searchers). + + + +
+ +--- + +### links + +
+ +* [hashflow](https://www.hashflow.com/) diff --git a/MEV_and_trading/protocols/README.md b/MEV_and_trading/protocols/README.md new file mode 100644 index 0000000..aff36c9 --- /dev/null +++ b/MEV_and_trading/protocols/README.md @@ -0,0 +1,70 @@ +## trading protocols in-depth + +
+ +### in this dir + +
+ +* [gns](gns.md) +* [gmx](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_by_chains/MEV_on_Arbitrum/gmx) +* [dydx](dydx.md) +* [yearn](yearn.md) +* [inverse](inverse.md) +* [uniswap](uniswap) +* [0x protocol](0x_protocol) +* [primitive](primitive.md) + +
+ +---- + +### basic definitions + +
+ +* **protocol fees**: fees generated by users using a dapp as a form of income for the protocol +* **supply-side fees**: the cost for the protocol (amount used for expenses) +* **revenue**: protocol fees minus supply side fees +* **token emissions**: value/cost of native tokens being inflated by the protocol (for instance, to attract users) +* **earnings**: revenue minus token emissions (how much money the protocol has earned) + +
+ + +---- + +### resources + +
+ +* [buffer.finances](https://buffer.finance/) +* [drift.trade](https://www.drift.trade/) +* [stader labs](https://staderlabs.com/) +* [hop](https://app.hop.exchange/#/send?token=ETH) +* [popsicle finance](https://popsicle.finance/) +* [matcha](https://matcha.xyz/) +* [maple](https://www.maple.finance/) +* [oasis.app](https://oasis.app/) +* [euler](https://www.euler.finance/) +* [elementifi](https://app.element.fi/fixedrates) +* [fodl](https://app.fodl.finance/nft) +* [traderJoe](https://traderjoexyz.com/farm#/) +* [vesta](https://vestafinance.xyz/) +* [tracerDAO](https://github.com/tracer-protocol) +* [step.finance](https://app.step.finance/#/dashboard) +* [orca staking](https://www.orca.so/staking) +* [solidly](https://solidly.exchange/liquidity) +* [rose](https://app.rose.fi/#/) +* [bancor](https://app.bancor.network/pools) +* [augur](https://augur.net/) +* [CREAM](https://app.cream.finance/) +* [paraswap](https://www.paraswap.io/) +* [arch finance](https://beta.archfinance.io/) +* [tokensets](https://www.tokensets.com/) +* [fracium](https://francium.io/) +* [rotki](https://rotki.com/) +* [crystal](https://defi.krystal.app/) +* [hotbit](https://www.hotbit.io) +* [slingshot](https://app.slingshot.finance/trade/m/MATIC) +* [zapper](https://zapper.fi/invest) diff --git a/MEV_and_trading/protocols/dydx.md b/MEV_and_trading/protocols/dydx.md new file mode 100644 index 0000000..e937ee3 --- /dev/null +++ b/MEV_and_trading/protocols/dydx.md @@ -0,0 +1,22 @@ +## dydx + +
+ +### tl; dr + + +
+ + +* founded in 2017, dydx is the most popular dex for trading perps and utilizes a central limit orderbook model (rather amm). +* the oracle price is an aggregate price calculated using on-chain price oracles. collateralization and liquidations on dydx are determined using the oracle prices of each asset. +* the index price is an aggregate price based on price data from multiple exchanges and is used to trigger stop orders. +* the mid-market price is determined by the orderbook as tge midpoint or average between the lowest ask (sell price) and the highest bid (buy price). +* funding rate is the fee paid between longs and shorts for each perpetual market. longs pay shorts if the funding rate is positive and vice versa. +* it on starkware's L2 (migrated from ethereum in 2021) and soon moving to their own standalone cosmos chain (dydx v4). + +
+ +--- + +### resources diff --git a/MEV_and_trading/protocols/gns.md b/MEV_and_trading/protocols/gns.md new file mode 100644 index 0000000..889f370 --- /dev/null +++ b/MEV_and_trading/protocols/gns.md @@ -0,0 +1,20 @@ +## [gains network](https://gainsnetwork.io/) + +
+ +### tl; dr + +
+ +* gtrade exchange gives users the ability to take up to 30-150x leverage on alts, blueships, stocks, and 1000x leverage on forex pairs, on polygon and arbitrum + + +
+ +--- + +### resources + +
+ +* [arbitrum trading context](https://gains.trade/contest) diff --git a/MEV_and_trading/protocols/inverse.md b/MEV_and_trading/protocols/inverse.md new file mode 100644 index 0000000..09d17a9 --- /dev/null +++ b/MEV_and_trading/protocols/inverse.md @@ -0,0 +1,27 @@ +## inverse finance + +
+ + +### tl; dr + + +
+ +* [inverse finance](https://www.inverse.finance/) is building a suite of DeFi tools that are governed by the inverse finance dao. +* the first product was DCA (dollar cost average) vaults, but the DAO decided to put all resources toward anchor and their synthetic stablecoin DOLA. xDOLA has liquidity pools on curve, balancer, velodrome (optimism), and Sushi. curve and balancer amms are the most significant ā€œstability mechanismsā€, as there is almost no exogenous collateral backing the stablecoin. +* anchor (later renamed to Frontier) is a lending market (mostly a fork of Compound). +* now, fixed-rate money market (FiRM) is an improved version of frontier with additional features, increased security, and a new primitive to facilitate fixed-rate borrowing of DOLA. +* inverse suffered from two exploits in 2022 (~$15.6M and ~$5.8M) 2022, due to oracle price manipulation. + + +
+ +--- + +### resources + +
+ +* [inverse finance, by cryptorisks](https://cryptorisks.substack.com/p/asset-risk-assessment-dola) +* [inverse finance oracle hack](https://twitter.com/peckshield/status/1510234162183041024) diff --git a/MEV_and_trading/protocols/primitive.md b/MEV_and_trading/protocols/primitive.md new file mode 100644 index 0000000..06b90fd --- /dev/null +++ b/MEV_and_trading/protocols/primitive.md @@ -0,0 +1,5 @@ +## primitive finance + +
+ +* [financial virtual machine paper](https://www.primitive.xyz/papers/yellow.pdf) diff --git a/MEV_and_trading/protocols/uniswap/README.md b/MEV_and_trading/protocols/uniswap/README.md new file mode 100644 index 0000000..c229222 --- /dev/null +++ b/MEV_and_trading/protocols/uniswap/README.md @@ -0,0 +1,48 @@ +## [uniswap](https://uniswap.org/) + +
+ +### tl,dr + + +
+ +* **AMMs** replace the buy and sell orders in an order book market with a liquidity pool of two assets, both valued relative to each other. as one asset is trader for the other, the relative prices of the two assets shift, and the new market rate for both is determined. +* uniswwap is a peer-to-peer system designed for exchanging ERC20 tokens on the ethereum blockchain. +* the protocol is implemented as a set of persistent, non-upgradable smart contracts; designed to prioritize censorship, resistance, security, self-custody. + + +
+ +--- + +### in this dir + +
+ +* [uniswap v2](uniswap-v2) +* [uniswap v3](uniswap-v3) + + +
+ +--- + +### resources + +
+ + +* [what's an amm, by coindesk](https://www.coindesk.com/learn/what-is-an-automated-market-maker/) +* [uniswap docs](https://docs.uniswap.org/protocol) +* [uniswap arb analysis](https://github.com/ccyanxyz/uniswap-arbitrage-analysis) +* [uniswap extractooor](https://www.uniswap.shippooor.xyz/) +* [dune for total uniswap users over time](https://dune.com/queries/2740) +* [understanding amms by hasu](https://www.paradigm.xyz/2021/04/understanding-automated-market-makers-part-1-price-impact) +* [mev's impact on uniswap](https://eigenphi.io/report/mev-impact-on-uniswap) +* [quantifying the cost of providing liquidity to amms, by a16z](https://a16zcrypto.com/lvr-quantifying-the-cost-of-providing-liquidity-to-automated-market-makers/) +* [automated market making and loss-versus-balancing, by j. milionis et al](https://arxiv.org/abs/2208.06046) +* [sushiguardrouterv01 with manifold](https://snapshot.org/#/sushigov.eth/proposal/bafkreigjjhjx2j2b526d3poeg23w2xan4rcgnzvcxinsssv7n37lu5p7s4) +* [the value of nontoxic orderflow to the uniswap protocol, by m. holloway](https://xenophonlabs.com/papers/uniswap_valuing_orderflow.pdf) +* [dune board on mev on uniswap](https://dune.com/jhackworth/mevmevmev) + diff --git a/uniswap/uniswap-v2/README.md b/MEV_and_trading/protocols/uniswap/uniswap-v2/README.md similarity index 100% rename from uniswap/uniswap-v2/README.md rename to MEV_and_trading/protocols/uniswap/uniswap-v2/README.md diff --git a/MEV_and_trading/protocols/uniswap/uniswap-v3/README.md b/MEV_and_trading/protocols/uniswap/uniswap-v3/README.md new file mode 100644 index 0000000..ba8f371 --- /dev/null +++ b/MEV_and_trading/protocols/uniswap/uniswap-v3/README.md @@ -0,0 +1,51 @@ +## uniswap v3 + +
+ +### tl; dr + +
+ +- uniswap v3 introduced: + + * **concentrated liquidity** and **non-fungible liquidity**: + * replacing fungible ERC20 liquidity positions with non-fungible ERC-721 liquidity positions. + * individual LPs get granular control over what price ranges their capital is allocated to. + * individual positions are aggregated together into a single pool, forming one combined curve for users to trade against. + * **multiple fee tiers**: allowing LPs to be appropriately compensated for taking on varying degrees of risk. + * **range orders**: lps can deposit a single token in a custom price range, above or below the current price. + * **improvements to the TWAP oracle**: possible to calculate any recent TWAP within ~9 days in a single on-call chain. + +- new strategies: + * creating and closing LP positions can be a form of trading. range orders can be used as either buy-limit or take-profit orders. + + +
+ +--- + +### in this dir + +
+ +* [just in time liquidity mev](just-in-time.md) + +
+ +--- + +### resources + +
+ + +* [uniswap v3 whitepaper](https://uniswap.org/whitepaper-v3.pdf) +* [jit liquidity, by chainsight](https://twitter.com/ChainsightLabs/status/1457958811243778052) +* [uniswap v3 book, by jeiwan](https://github.com/Jeiwan/uniswapv3-book) +* [liquidity mining on uniswap v3, by paradigm](https://www.paradigm.xyz/2021/05/liquidity-mining-on-uniswap-v3) +* [uniswap v3 twap oracle simulator, by euler](https://oracle.euler.finance/) +* [conceptualizing uniswap v3 lp profit and loss](https://atise.medium.com/conceptualizing-uniswap-v3-lp-profit-and-loss-ecbae6e09644) +* [on why lp-ing on uniswap is a losing game](https://twitter.com/thiccythot_/status/1589022227437039616) +* [usage of markout to calculate LP profitability in uniswap v3, by crocswap](https://crocswap.medium.com/usage-of-markout-to-calculate-lp-profitability-in-uniswap-v3-e32773b1a88e) +* [ETH USDC retroactive data Aaalysis, by flipside](https://science.flipsidecrypto.xyz/ethusdc_results/eth_usdc_analysis.html) +* [markouts and stat analysis in uniswap v3](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_strategies/stat_arbs/README.md) diff --git a/MEV_and_trading/protocols/uniswap/uniswap-v3/just-in-time.md b/MEV_and_trading/protocols/uniswap/uniswap-v3/just-in-time.md new file mode 100644 index 0000000..56909fb --- /dev/null +++ b/MEV_and_trading/protocols/uniswap/uniswap-v3/just-in-time.md @@ -0,0 +1,42 @@ +## just-in-time (jit) liquidity + +
+ +### tl; dr + +
+ +* **uniswap v3** comes with just-in-time (jit) liquidity, allowing LPs to provide concentrated liquidity within smaller price ranges, i.e., to specify a range of prices their liquidity is active for. this allows capital efficiency for correlated tokens. + +* the **liquidity range** determines the share of fees. however, the tighter the tick range, the greater the risk of impermanence loss (the greater the likelihood that the price of the asset pair will move out of the tick range to volatility), which would generate no fees). + +* a **strategy** is to scan the mempool for substantial pending trades, provide liquidity where a LP mints and burns a concentrated position immediately before and after a swap. no impermanent loss happens because everything happens within the same block. + +* because provision has **high costs**, it's usually only used against very large swaps (i.e., it's a non-atomic strategy). + +* [*"their strategies mainly allocate liquidity in a narrow range and adjust the tick intervals to track market price based on quantitative indicators such as bollinger bands"*](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34/wr9JWZ_MIroWnXeze_tXG1R7nSsoTkp7IvqK5BsWYhA) + + +
+ +--- + +### in this dir + +
+ +* [tricks](tricks.md) + +
+ +---- + +
+ +### links + +
+ +* [uniswap on jit liquidity](https://uniswap.org/blog/jit-liquidity) +* [just-in-time mev dune board](https://dune.com/ChainsightAnalytics/Uniswap-v3-Just-in-Time-(JIT)-Liquidity-MEV) +* [uniswap v3 lp by rekt](https://rekt.news/uniswap-v3-lp-rekt/) diff --git a/MEV_and_trading/protocols/uniswap/uniswap-v3/tricks.md b/MEV_and_trading/protocols/uniswap/uniswap-v3/tricks.md new file mode 100644 index 0000000..b81fe49 --- /dev/null +++ b/MEV_and_trading/protocols/uniswap/uniswap-v3/tricks.md @@ -0,0 +1,16 @@ +## tricks + +
+ +### example cex + dex + +
+ +1. consider a JIT LP that has ETH and USDC both in a wallet and in a CEX. +2. when the LP observes a large ETH -> USDC swap in the mempool, they deploy a LP position on Uniswap, and at the same time submit an ETH buy order on the CEX. +3. after both trades, the LP has the same total amount of ETH and USDC as before. +4. assuming that the following holds, the LP are also profitable: + +``` + fees_DEX + price_impact_DEX > fees_CEX + price_impact_CEX +``` diff --git a/MEV_and_trading/protocols/yearn.md b/MEV_and_trading/protocols/yearn.md new file mode 100644 index 0000000..6b2059d --- /dev/null +++ b/MEV_and_trading/protocols/yearn.md @@ -0,0 +1,7 @@ +## yearn finance + +
+ + +* [yearn finance](https://yearn.finance/#/portfolio) +* [permissionless yearn vaults](https://medium.com/iearn/permissionless-yearn-vaults-dd4880116022) diff --git a/MEV_and_trading/stablecoins/DAI.md b/MEV_and_trading/stablecoins/DAI.md new file mode 100644 index 0000000..9a2f79d --- /dev/null +++ b/MEV_and_trading/stablecoins/DAI.md @@ -0,0 +1,17 @@ +## dai + +
+ +### tl; dr + +
+ +
+ +--- + +### resources + +
+ +* [markerdao technical docs](https://docs.makerdao.com/) diff --git a/MEV_and_trading/stablecoins/DINERO.md b/MEV_and_trading/stablecoins/DINERO.md new file mode 100644 index 0000000..e7e204d --- /dev/null +++ b/MEV_and_trading/stablecoins/DINERO.md @@ -0,0 +1,19 @@ +## dinero + +
+ +### tl; dr + +* [Redacted] Cartel started as an OHM-fork, generating +$100MM in treasure, and then creating an ecosystem of products. +* $DINERO is their upcoming stablecoin with collateralized debit position (cdp) and peg stability module (psm). +* this means you can deposit $ETH or $pxETH (ther LSD) to take out loans in $DINERO (ie, CDP). with PSM, the protocol will always sell or buy $DINERO for $1 and arbitrageurs will maintain the peg. +* redacted cartel is building their own relayer with 2 features: protect from mev and accept $DINERO as gas payment. +* the relayers can be validated by dinero protocol validators (where their lsd strategy comes in). + +
+ +---- + +### resources + +* [whitepaper](https://github.com/redacted-cartel/dinero-litepaper/blob/master/Dinero%20Protocol%20litepaper%20-%2020230406%20-%20v1.0.pdf) diff --git a/MEV_and_trading/stablecoins/GHO.md b/MEV_and_trading/stablecoins/GHO.md new file mode 100644 index 0000000..e57b5bf --- /dev/null +++ b/MEV_and_trading/stablecoins/GHO.md @@ -0,0 +1,25 @@ +## aave's gho + +
+ +### tl; dr + +
+ +* GHO is a decentralized stablecoin issued by aave. +* it's overcollaterized as it's backed by deposits in aave v3 (users mint directly into the money market) +* rather than having interest rates determined algorithmically like other assets in aave, its borrow rate will be manually set by governance, giving aave total control over the cost to mint/borrow gho. + +
+ + + + + + + +
+ +--- + +### resources diff --git a/MEV_and_trading/stablecoins/LUSD.md b/MEV_and_trading/stablecoins/LUSD.md new file mode 100644 index 0000000..838c05b --- /dev/null +++ b/MEV_and_trading/stablecoins/LUSD.md @@ -0,0 +1,29 @@ +## LUSD + +
+ +### tl; dr + +* issued by [liquity protocol](https://twitter.com/LiquityProtocol), $LUSD has zero governance, fully decentralized collateral, instant liquidation, lower liquidity level than $DAI, and no loss to holders since launch. +* **redemption**: $LUSD uses CDP model where 1 $LUSD is minted via deposit of at least $1.1 worth of $ETH, so that 1 $LUSD is always backed by > $$1.1 worth of $ETH + - during arbs, $LUSD received will pay back the debt of troves with the lowest collateral ratio (CR) + - troves with low CR's are incentivized to improve CR (either top-up their collateral or repay loans) + - redemption reduces debtors' $ETH exposure, and the fee makes it unattractive for arb +* **stability pool**: pooling a $LUSD reservoir for instant liquidation of troves with low CR. those depositing $LUSD into it become liquidators, and profit from liquation is ~10%. + - $LUSD premium in times of market turmoil. + - like DCA into $ETH at prices lower than usual by buying liquidations. e.g., provide $LUSD into the stability pool. +* **redistribution**: in case there is 0 $LUSD left in the stability pool, the system redistributes both the debt and collateral from liquidated troves to all other existing troves, based on a portion of collateral of each trove vs. total collateral of all troves. + - retribution causes individual troves' CR to decrease and be more prone to liquidation (but for each 1 $LUSD they can get > $1 $ETH). + - buy the dip of $ETH: deposit $ETH into the stability pool when 1) $ETH market price is ~ prices troves are liquidated, or 2) when TCR is almost < 150%. + + + +
+ +--- + +### resources + +
+ +* [thread on chicken bonds](https://twitter.com/korpi87/status/1575899279071186944) diff --git a/MEV_and_trading/stablecoins/RAI.md b/MEV_and_trading/stablecoins/RAI.md new file mode 100644 index 0000000..978e6ba --- /dev/null +++ b/MEV_and_trading/stablecoins/RAI.md @@ -0,0 +1,15 @@ +## rai + +
+ +### tl; dr + +
+ +* decentralized and non-pegged stable asset by [reflexer.finance](https://reflexer.finance/) + +
+ +--- + +### resources diff --git a/MEV_and_trading/stablecoins/README.md b/MEV_and_trading/stablecoins/README.md new file mode 100644 index 0000000..c479b97 --- /dev/null +++ b/MEV_and_trading/stablecoins/README.md @@ -0,0 +1,34 @@ +## stablecoins + +
+ +* **[101](stablecoins_101.md)** +* **[$CURVE](curve)** +* **[$DAI](DAI.md)** +* **[$RAI](RAI.md)** +* **[$GHO](GHO.md)** +* **[$USDD](USDD.md)** +* **[$LUSD](LUSD.md)** +* **[$DINERO](DINERO.md)** +* **[(rip) $UST](UST.md)** + + +
+ +
+ + + + +
+ +--- + +### resources + +
+ +* **[stablecoins, by the ef](https://ethereum.org/en/stablecoins/)** +* **[a money view of stablecoins, by aldasoro et al.](https://www.bis.org/publ/work1146.pdf)** +* **[the rising of protocol native stablecoins, by easonwu](https://easonwu.substack.com/p/the-rise-of-protocol-native-stablecoins?utm_source=tldrnewsletter)** + diff --git a/MEV_and_trading/stablecoins/USDD.md b/MEV_and_trading/stablecoins/USDD.md new file mode 100644 index 0000000..0050eec --- /dev/null +++ b/MEV_and_trading/stablecoins/USDD.md @@ -0,0 +1,13 @@ +## usdd stablecoin + +
+ +* usdd is an over-collaterized stablecoin issued on the tron blokchain +* initially a copycat of ust, pivoted to an over-collateralization model after terra's crash +* it's not permissionless or decentralized +* it can only enter circulation via a 5-of-7 multsig controlled by members of the tron dao reserve (tdr) +* circulation supply ($725M) hasn't changed since july 2022 +* trx backing the circulating usdd accounts for 85% of its value, and it has added reserves in btc, usdt, and usdc +* usdd has two stability mechanisms: a peg stability module (psm) and four monetary policy instruments (mpi) +* the team behind usdd is anonymous +* for cross-chain transactions, usdd uses the BitTorrent network, a cross-chain bridge protocol (bought by justin sun in 2018) diff --git a/defi_and_trading/stablecoins/UST.md b/MEV_and_trading/stablecoins/UST.md similarity index 98% rename from defi_and_trading/stablecoins/UST.md rename to MEV_and_trading/stablecoins/UST.md index 12cdbc2..7f6a944 100644 --- a/defi_and_trading/stablecoins/UST.md +++ b/MEV_and_trading/stablecoins/UST.md @@ -1,4 +1,4 @@ -## LUNA, UST, and The Terra Blockchain +## [RIP] LUNA, UST, and The Terra Blockchain
diff --git a/MEV_and_trading/stablecoins/curve/README.md b/MEV_and_trading/stablecoins/curve/README.md new file mode 100644 index 0000000..2d63721 --- /dev/null +++ b/MEV_and_trading/stablecoins/curve/README.md @@ -0,0 +1,42 @@ +## curve + +
+ +### tl; dr + +
+ +* curve is a decentralised exchange for stablecoins, with lowĀ slippageĀ in swapping, and featuring a 3-token pool. +* curve supports 3 categories of exchanges: stablecoins, stable pegged assets, and non-stable pegged assets. +* CRV is the native token, whose main utility is governance. veCRVĀ is locked to vote decisions and rewards. monthly CRV unlocks from theĀ release scheduleĀ and the trading fees generated on the platform are distributed to each pool's liquidity provider. +* a new stablecoin design called lending-liquidation amm algorithm (LLAMMA) is being [github-ed](https://github.com/curvefi/curve-stablecoin-js). +* for mev, volume is the key factor in influencing price slippage due to the slippage design of curve +* curve pools serve as sources of deep liquidity for stablecoins, as they are attractive to LPs due to the low risk of impairment loss in like-asset pools and the ability to earn CRV emissions (and if pools become imbalanced, it can indicate what assets LPs view as more or + + +
+ +---- + +### in this dir + +
+ +* [curve wars](curve_wars.md) +* [historical analysis](historical.md) +* [crvUSD](crvusd.md) + +
+ + +--- + +### resources + +
+ + +* [curve whitepaper](https://github.com/curvefi/curve-stablecoin/blob/master/doc/curve-stablecoin.pdf) +* [curve mev report](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34/iyBEOpngdSrVzlWjWf6eHVwOBuj2pEVxtbwyCNqlAyA) +* [cleaning up of the battlefield of avi and curve](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34/MVIdkzGOWx70ap0uA9Nuh7GHXtO1jGopEaIeAK2coC8) + diff --git a/MEV_and_trading/stablecoins/curve/crvusd.md b/MEV_and_trading/stablecoins/curve/crvusd.md new file mode 100644 index 0000000..71fbcb8 --- /dev/null +++ b/MEV_and_trading/stablecoins/curve/crvusd.md @@ -0,0 +1,25 @@ +## crvUSD + +
+ +### tl; dr + +
+ +* decentralized stablecoin issued by curve, with a novel mechanism known as lending-liquidating amm algorithm (llama) +* llama employs a kinder liquidation design that swaps a user's collateral into crvUSD as its value decreases (rather than fully liquidating a user's position in one fell swoop) + +
+ + + + +
+ +---- + +### resources + +
+ +* [curve stablecoin whitepaper](https://github.com/curvefi/curve-stablecoin/blob/master/doc/curve-stablecoin.pdf?ref=bankless.ghost.io) diff --git a/defi_and_trading/stablecoins/Curve.md b/MEV_and_trading/stablecoins/curve/curve_wars.md similarity index 79% rename from defi_and_trading/stablecoins/Curve.md rename to MEV_and_trading/stablecoins/curve/curve_wars.md index 250d54b..130a16d 100644 --- a/defi_and_trading/stablecoins/Curve.md +++ b/MEV_and_trading/stablecoins/curve/curve_wars.md @@ -1,18 +1,12 @@ -## Curve - -### tl; dr - -* Curve, whose unique feature is the lowĀ slippageĀ in swapping, is a decentralised exchange (DEX) for stablecoins to swap pairs like USDT/UST or USDC/BUSD.Ā  -* CRV is the native token, whose main utility is governance. -* People need to lock CRV to getĀ veCRVĀ to vote on decisions. The most important one is voting on allocation of rewards. -* Additionally, veCRV holders can vote on proposals and pool parameters. -* Monthly CRV unlocks from theĀ release scheduleĀ and the trading fees generated on the platform are distributed to each pool's liquidity provider. +## curve liquid wrappers war
--- -### curve liquid wrappers war +### 2022 + +
* veToken model allows users to lock CRV for up 4 years, receive admin fees (paid in stables), and allows them to vote for CRV emissions for the pool. * protocols seeking liquidity have the option to bribe ve CRV holders to stream CRV emissions to their pools (nother source of revenue besides admin fees). @@ -20,8 +14,12 @@ * liquid wrappers allow CRV holders to receive fees and/or bribes without locking it for 4 years and provide a chance to exit the position. * trade-offs for liquid wrappers are: protocol fees, peg maintenance, and voting power. +
+ ##### cvxCRV +
+ * by stacking cvxCRV, holders earn 3crv fees plus a share of 10% of the Convex LPs' boosted CRV earnings, plus CVX tokens. * the bribe revenue (voting power which can be sold) is distributed among vote-locked CVX. * the normal revenue from veCRV (fees + bribes) is split between cvxCRV and CVX. @@ -33,6 +31,8 @@ ##### sdCRV +
+ * sdCRV is distributing 3crv fees and keeping voting powers with stakers. * voting power can be delegated to the StakeDAO, it combines market and OTC bribes in order to get the best return. * users can access the bribes from palarding and votium. @@ -60,9 +60,3 @@
- ---- - -### resources - -* [10M Revenue Drain in 5 Months: MEV impact on Curve](https://medium.com/@eigenphi/10m-revenue-drain-in-5-months-mev-impact-on-curve-fd5214a0667) diff --git a/MEV_and_trading/stablecoins/curve/historical.md b/MEV_and_trading/stablecoins/curve/historical.md new file mode 100644 index 0000000..f70d15f --- /dev/null +++ b/MEV_and_trading/stablecoins/curve/historical.md @@ -0,0 +1,11 @@ +## notes on historical performance for curve + +
+ +#### march'23 USDC crisis + +
+ +* LPs fled to USDT during the height of the panic, seeking to reduce their exposure to USDC and DAI: + + diff --git a/MEV_and_trading/stablecoins/stablecoins_101.md b/MEV_and_trading/stablecoins/stablecoins_101.md new file mode 100644 index 0000000..6dd4dd5 --- /dev/null +++ b/MEV_and_trading/stablecoins/stablecoins_101.md @@ -0,0 +1,33 @@ +## stablecoins 101 + +
+ +#### fiat-collateralized stablecoins + +
+ +* fiat-collateralized stablecoins are stablecoins that are backed by fiat currencies like the US dollar. +* their reserves are held by a central entity. The most popular fiat-backed stablecoins at this time are USDC, USDT, and BUSD.Ā  +* their main weakness is centralization as the collateral of a fiat-collateralized stablecoin is held by one independent party. +* e.g., Circle's USDC, iFinex's USDT, and Binances BUSD + +
+ +#### cryptocurrency-backed stablecoins + +
+ +* while crypto-backed stablecoins are good for their decentralization, they are capital inefficient (overcollaterized) +* eg: MakerDAO's DAI, Synthetix's sUSD, and Liquity's LUSD + +
+ +#### decentralized (algorithmic) stablecoins + +
+ +* they maintain their peg without having to directly collateralize the issuance. +* they rely on supply-and-demand algorithms to maintain price stability 😬. +* e.g., FRAX, RAI and rip FEI and UST + +
diff --git a/MEV_and_trading/staking/Frax.md b/MEV_and_trading/staking/Frax.md new file mode 100644 index 0000000..a94e033 --- /dev/null +++ b/MEV_and_trading/staking/Frax.md @@ -0,0 +1,18 @@ +## [frax finance]() + +
+ +### tl; dr + +
+ +* total eth staked ~128k +* q1/23 stats: inflow of 82k eth, market share gone to 1.6%, fees generated: $1.7m, $FXSUSD +122% +* frax offes the highest staking apr via their dual token model with frxETH and srfxETH +* frax v3 is about making $FRAX safe, being pegged directly to USD (rather than stablecoins) + +
+ +--- + +### resources diff --git a/defi_and_trading/staking/Lido.md b/MEV_and_trading/staking/Lido.md similarity index 82% rename from defi_and_trading/staking/Lido.md rename to MEV_and_trading/staking/Lido.md index 95e2176..e3abd51 100644 --- a/defi_and_trading/staking/Lido.md +++ b/MEV_and_trading/staking/Lido.md @@ -1,4 +1,8 @@ -## Notes on Lido Finance +## lido + +
+ +### tl; dr
@@ -8,6 +12,7 @@ * Lido uses a single token model, stETH that represents users' staking deposits. stETH is minted at 1:1 ratio of ether deposited into the Lido platform. * Staking rewards accrue to the stETH token through a daily rebasing mechanism. * 10% fee on accrued staking rewards that is evenly split between the Lido DAO and node operators. +* q1/23 stats: inflow of 1.09mil eth staked, market share to 72.3%, fees generated: $117mil, $LDOUSD + 152% (second largest fee generating protocol after uniswap)
@@ -15,3 +20,6 @@
+---- + +### resources diff --git a/MEV_and_trading/staking/README.md b/MEV_and_trading/staking/README.md new file mode 100644 index 0000000..d0f4add --- /dev/null +++ b/MEV_and_trading/staking/README.md @@ -0,0 +1,34 @@ +## staking + +
+ + +### in this repo + +
+ +* **[lido](Lido.md)** +* **[stakewise](Stakewise.md)** +* **[rocket pool](RocketPool.md)** +* **[stater labs](Stader.md)** +* **[frax finance](Frax.md)** +* **[manifold's mevETH](mevETH.md)** +* **[lsds and mev](lsds_and_mev.md)** +* **[distributed validator technology](dvt)** + + +
+ +--- + +### external resources + +
+ +* **[ether.fi](https://ether.fi/)** +* **[stakeus](https://staked.us/)** +* **[staking rewards](https://www.stakingrewards.com/)** +* **[bitcoin suisse](https://www.bitcoinsuisse.com/staking)** +* **[dune dashboard for staking as a service](https://dune.com/subinium/staking-as-a-service)** +* **[proof of stake economic security via MEV redistribution, by t. chitra et al](http://people.eecs.berkeley.edu/~ksk/files/MEV_Redistribution.pdf)** +* **[awesome staking resources](https://hackmd.io/qSzUlW7qQ-WD95H7bbmMcw)** diff --git a/MEV_and_trading/staking/RocketPool.md b/MEV_and_trading/staking/RocketPool.md new file mode 100644 index 0000000..d945632 --- /dev/null +++ b/MEV_and_trading/staking/RocketPool.md @@ -0,0 +1,17 @@ +## [rocket pool](https://rocketpool.net/) + +
+ +### tl; dr + +
+ +* total ETH staked ~441k +* q1/23: inflow of 90k ETH, market share of 5.3%, $RPLUSD +137% +* when running a node/minipool, users must lock between 10%-150% of the staked ETH in $RPL as a collateral (protocol insurance). + +
+ +--- + +### resources diff --git a/MEV_and_trading/staking/Stader.md b/MEV_and_trading/staking/Stader.md new file mode 100644 index 0000000..0a06243 --- /dev/null +++ b/MEV_and_trading/staking/Stader.md @@ -0,0 +1,16 @@ +## stader + +
+ +### tl; dr + +
+ +* q1 stats: $120m in TVL staked accross multiple chains (polygon, fantom, bnb) +* one of the core features is the ability to run a node with just 4 eth + +
+ +--- + +### resources diff --git a/defi_and_trading/staking/Stakewise.md b/MEV_and_trading/staking/Stakewise.md similarity index 75% rename from defi_and_trading/staking/Stakewise.md rename to MEV_and_trading/staking/Stakewise.md index a9e18fa..30df055 100644 --- a/defi_and_trading/staking/Stakewise.md +++ b/MEV_and_trading/staking/Stakewise.md @@ -1,14 +1,19 @@ -## Stakewise +## stakewise
+### tl; dr + * Liquid ETH2 platform. * You don't need 32 ETH so anyone can benefit from the beacon chain. * Deposits into the staking pool are tokenised so users can participate in the wider ETH landscape. +* q1/23 stats: inflow of 10k eth staked, market share to 1.18%, fees generated: $1.68m, $SWISEUSD +128%
-### Tokenomics +---- + +### tokenomics
@@ -16,3 +21,10 @@ * The other token, sETH2. represents the ETH deposit and acts as an interest-bearinng wrapped ETH. * Holders of sETH2 tokens earn daily rETH2 rewards. * Stakewise has a flat fee of 10% on rewards earned by their pools. + +
+ +---- + +### resources + diff --git a/MEV_and_trading/staking/dvt/README.md b/MEV_and_trading/staking/dvt/README.md new file mode 100644 index 0000000..9f38861 --- /dev/null +++ b/MEV_and_trading/staking/dvt/README.md @@ -0,0 +1,20 @@ +## distributed validator technology + +
+ +### tl; dr + +
+ +* enables a group stacking through multi-part computation (mpc), letting a group of individuals share one private key (like a multisig) and run a "distributed validator" together. +* it makes node validation an overall more robust process. + +
+ +--- + +### resources + +
+ +* [obol](https://obol.tech/) diff --git a/MEV_and_trading/staking/lsds_and_mev.md b/MEV_and_trading/staking/lsds_and_mev.md new file mode 100644 index 0000000..2ef2768 --- /dev/null +++ b/MEV_and_trading/staking/lsds_and_mev.md @@ -0,0 +1,17 @@ +## LSDs and MEV + +
+ +### tl; dr + +
+ +* with the shapella update, LSDs can be withdrawn, creating trading volume and MEV opportunities. most staking protocols will allow users to trade LSD tokens at a higher ETH price than the market, thus creating the opportunity for the market to arbitrage. +* according to eigeinphi, the total revenue from MEV (arb, liquidation, sandwich attacks) surpassed $4.84 mil (most coming from arb, with a rising frequency of arb trades and decline of average arb revenue). + + +
+ +--- + +### resources diff --git a/MEV_and_trading/staking/mevETH.md b/MEV_and_trading/staking/mevETH.md new file mode 100644 index 0000000..6455910 --- /dev/null +++ b/MEV_and_trading/staking/mevETH.md @@ -0,0 +1,18 @@ +## fold finance + +
+ +### tl; dr + +
+ +* manifold finance offers defi middleware solutions with mev optimization and block building for ursers & validators +* they have just announced their own liquid staking protocol +* mevETH will be an omnichain token using layerzero tech and aims to offer high staking yield by increasing revenue through mev opportunities +* they have securred 25k eth from cream finance + +
+ +--- + +### resources diff --git a/MEV_and_trading/strategy_metrics/README.md b/MEV_and_trading/strategy_metrics/README.md new file mode 100644 index 0000000..a9de6ef --- /dev/null +++ b/MEV_and_trading/strategy_metrics/README.md @@ -0,0 +1,72 @@ +## trading strategy metrics + +
+ +### tl; dr + +* metrics to optimize when developing trading algorithms + +
+ +--- + +### net profit and loss (net PnL) + +
+ +* how much money an algorithm makes and loses over a period, minus trading free. + +
+ +--- + +### alpha and beta + +
+ +* **alpha**: how much better, in terms of profit, is the strategy compared to an alternative risk-free investment. +* **beta**: how volatile the strategy is compared to the market. + +
+ +---- + +### sharpe ratio + +
+ +* measure the excess return per unit of risk you are taking. +* it's the return on capital over the standard deviation adjusted for risk. + +
+ +--- + +### maximum drawdown + +
+ +* maximum difference between a local maximum and the subsequent local minimum as a measure of risk. + +
+ +---- + +### value at risk (VaR) + +
+ +* risk metric that qualifies how much capital is at a loss over a given time frame with some probability (assuming normal market conditions). + +
+ +--- + + + + + + + + + diff --git a/defi_and_trading/vaults/ERC-4626.md b/MEV_and_trading/vaults/ERC-4626.md similarity index 100% rename from defi_and_trading/vaults/ERC-4626.md rename to MEV_and_trading/vaults/ERC-4626.md diff --git a/defi_and_trading/vaults/README.md b/MEV_and_trading/vaults/README.md similarity index 54% rename from defi_and_trading/vaults/README.md rename to MEV_and_trading/vaults/README.md index c40902b..79b07dc 100644 --- a/defi_and_trading/vaults/README.md +++ b/MEV_and_trading/vaults/README.md @@ -1,4 +1,6 @@ -## Vaults +## vaults + +
### tl; dr @@ -11,9 +13,12 @@ * [ERC-4626](ERC-4626.md) +* [openeden, smart contract t-bills vault](openeden.md)
--- ### resources + +
diff --git a/MEV_and_trading/vaults/openeden.md b/MEV_and_trading/vaults/openeden.md new file mode 100644 index 0000000..1569449 --- /dev/null +++ b/MEV_and_trading/vaults/openeden.md @@ -0,0 +1,17 @@ +## open eden + +
+ +### tl; dr + +
+ +* TBILL vault: first smart contract vault managed by a regulated financial instituion, offering 24/7 direct access to us tresuries +* why t-bills: aaa-rated soverign debt backed by full faith and credit of the us goverment; subdued defi yields, sticky inflation, fed terminal rate ~5%, ~130B of outstanding coin supply + + +
+ +--- + +### resources diff --git a/MEV_and_trading/whales/README.md b/MEV_and_trading/whales/README.md new file mode 100644 index 0000000..106860a --- /dev/null +++ b/MEV_and_trading/whales/README.md @@ -0,0 +1,35 @@ +## whale watching + +
+ +### tl; dr + +
+ + +
+ +--- + +### list of whale wallets + +
+ +* [50+ whale wallets, by thorHhrtvigsen](https://twitter.com/ThorHartvigsen/status/1622632955939287043) +* [list of whale wallets, by debank](https://debank.com/whales) +* [smart money watchlist, by nansen](https://pro.nansen.ai/smart-money) +* [coingator whale wallets, by go outside labs](https://github.com/go-outside-labs/searcher-coingator-rs/blob/main/data/whales.txt) +* [token analyzoor, by mochi](https://dune.com/defimochi/token-god-mode) +* [lsd whale watcher-shangai update](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_and_trading/whales) + + +
+ +---- + +### links + +
+ + +* [return analysis, by defi_mochi](https://twitter.com/defi_mochi/status/1616649547350151169) diff --git a/MEV_by_chains/MEV_on_Arbitrum/README.md b/MEV_by_chains/MEV_on_Arbitrum/README.md new file mode 100644 index 0000000..a734bd0 --- /dev/null +++ b/MEV_by_chains/MEV_on_Arbitrum/README.md @@ -0,0 +1,43 @@ +## mev on arbitrum + +
+ +### tl; dr + +
+ +* remember that optimistic rollups publish batches of txs in the calldata on ethereum, but it needs to wait for a dispute period to pass to ensure the sequencer is not publishing invalid txs before withdrawing. +* avm architecture: arbitrum is fully compatible with the evm, but it also has its vm called arbitrum virtual machine: + * execution flow and structure: arbitrum has an operating system and its core called arbos, which ensures the solitary existence, optimal performance and efficient analytics of smart contracts. + * dispute settlement speed: the avm has a custom protocol for dispute management, so that it can be acquired out on a standard vm. + * natives tuples: the avm uses tuples to define and references types in its merkle tree. the tuples can be referenced in looking up the merkle root of any tx on the evm merkle tree. +* optimistic rollup, with no mempool for bots to frontrun, but searchers can listen the queue through websockets and backrun, etc... +* currently has a centralized sequencer and whitelisted proof validation while having upgradable contracts +* faster tx processing: ethereum is operating under 15-20 tps, while the arbitrum network can process ~40 tps +* lower tx fees: in ethereum, a significant percentage of validators need to confirm the genuineness of a tx; arbitrum average fee is $~.2 compared to $6.5 (source: [nansen](https://pro.nansen.ai/multichain/eth-vs-arbitrum)) + +
+ +---- + +### in this dir + +
+ +* [gmx and glp vaults](gmx) +* [fair order sequencing](fair_ordering_sequencing) + +
+ +--- + +### resources + +
+ +* [transaction ordering policy](https://research.arbitrum.io/t/transaction-ordering-policy/127) +* [arbitrum bridge tutorial](https://arbitrum.io/bridge-tutorial/) +* [arbitrum gas fee, by dune](https://dune.com/blog/fueling-gas-spells-arbitrum) +* [time boost: a new tx ordering policy proposal](https://research.arbitrum.io/t/time-boost-a-new-transaction-ordering-policy-proposal/8173) +* [a closer look at the sequencer's role and mev, by p. mccorry](https://docs.google.com/presentation/d/1bU01VT7YyLXT0Bzxo0dRNYSEohmuKxY8ziErTviIsng/edit#slide=id.g1255a01e809_0_0) +* [arbtrium latency war drama, feb/23](https://twitter.com/snoopy_mev/status/1629283898453811200?s=20) diff --git a/MEV_by_chains/MEV_on_Arbitrum/fair_ordering_sequencing/README.md b/MEV_by_chains/MEV_on_Arbitrum/fair_ordering_sequencing/README.md new file mode 100644 index 0000000..b2267dd --- /dev/null +++ b/MEV_by_chains/MEV_on_Arbitrum/fair_ordering_sequencing/README.md @@ -0,0 +1,19 @@ +## fair ordering sequencing + +
+ +### tl; dr + +
+ +* users pay for the right to extract MEV over a period through the opportunity cost per block times the number of blocks staked + +
+ +### resources + +
+ +* [fair sequencing and chaninlink](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_strategies/oracles/chainlink.md) +* [can first come first served tx ordering prevent frontrunning, by robert annessi](https://collective.flashbots.net/t/can-first-come-first-served-based-transaction-ordering-prevent-front-running/892) +* [why fair ordering is fatally flawed, by t. chitra](https://docs.google.com/presentation/d/1nw-mjr8u4xEGX3HGhWtw44MOFJOd8VMolTZ1BSOSL3E/edit#slide=id.p) diff --git a/MEV_by_chains/MEV_on_Arbitrum/gmx/README.md b/MEV_by_chains/MEV_on_Arbitrum/gmx/README.md new file mode 100644 index 0000000..0fef964 --- /dev/null +++ b/MEV_by_chains/MEV_on_Arbitrum/gmx/README.md @@ -0,0 +1,62 @@ +## gmx + +
+ +### tl; dr + +
+ + + +* gmx is a decentralized spot and perpetual futures exchange built on arbitrum and avalanche chains. it exploded after the ftx fall, and just this week it seems to have become the top defi project on fee profit, and one of the top projects by fee and revenue in defillama. they are winning by offering perks such as no slippage, low swap fees, and zero price impact trades (i.e., large trades are set at the mark price). + +* gmx offers zero slippage on trades via an oracle price update system (chainlink + aggregate of prices from leading volume exchanges), while amms rely on arb bots to balance prices in the pools. + +* gmx’s swap trades are performed based on a combination of two oracles: + - the primary oracle is fed by chainlink, and it takes the last three samples (picking the worst price for the user). + - the secondary oracle is the ā€œfast price feedā€, which overrides the price whenever it is within 2.5% of the primary oracle price value. + +* gmx enables traders to open up to 50x leverage swaps for long or short positions by borrowing from glp, a multi-asset pool containing $btc, $eth, $uni, $link, and stablecoins. the vault allows swapping of the tokens it holds. funds are deposited into the vault by minting glp tokens and can be withdrawn by burning these tokens. glp works as the counterparty in the protocol, as it accrues values when traders loses, and devalues when traders win. glp is also emerging as a form of collateral, with lending protocols integrating this liquidity provider token into their product offerings (e.g., rage, unami, sentiment). + +* gmx’s native token, $gmx, functions as a governance, utility, and value-accrual token. glp accrues 70% of all trading fees, while stakers of gmx earn 30%. a floor price fund helps ensure liquidity in the glp pool, plus a reliable stream of $eth rewards for $gmx stakers. + +* the protocol's revenues come from swap fees, trading fees, execution fees, liquidation fees, and borrow fees. + + +
+ +---- + +### in this dir + +
+ +* [tokenomics](tokenomics.md) +* [oracle abuse](oracle_abuse.md) +* [delta neutral and vaults](glp_vaults.md) + + +
+ +--- + +### resources + +
+ +* [gmx docs](https://gmxio.gitbook.io/gmx/) +* [gmx stats](https://stats.gmx.io/) +* [gmx hedge](https://www.gmxhedge.com/) +* [building gmx and synths, by coinflipcanada](https://alphapls.substack.com/p/the-buildooooooor-coinflipcanada) +* [gmx general dune board](https://dune.com/gmxtrader/gmx-dashboard-insights) +* [post on x4 protocol](https://medium.com/@gmx.io/x4-protocol-controlled-exchange-c931cd9a1ae9) +* [gmx in-depth dune board](https://dune.com/lako/lako-labs-gmx) +* [gmx trader bias dune board](https://dune.com/steinkirch/gmx-trading-bias) +* [synapse bridge](https://synapseprotocol.com/) +* [contracts](https://gmxio.gitbook.io/gmx/contracts) +* [gmx, by flood capital](https://twitter.com/FloodCapital/status/1562856005259902976) +* [gmx oracle, by pressiemoomboy](https://twitter.com/PressieMoonBoy/status/1562905337723748352) +* [gmx transfer account](https://app.gmx.io/#/begin_account_transfer) +* [pirex gmx, by redacted](https://mirror.xyz/0xE90c74145245B498fef924fAdC7bb34253c7cF90/H15743T6tNvIW1xzOcL5_JBkQilZLdWgdqhD5AZPryI) +* [magicglp, by abracadaba](https://mirror.xyz/0x5744b051845B62D6f5B6Db095cc428bCbBBAc6F9/EUr60EjAX6h4muLqUxeygljMWTmi5b9pxJWlX7Qt3yc) + diff --git a/MEV_by_chains/MEV_on_Arbitrum/gmx/glp_vaults.md b/MEV_by_chains/MEV_on_Arbitrum/gmx/glp_vaults.md new file mode 100644 index 0000000..e7e0993 --- /dev/null +++ b/MEV_by_chains/MEV_on_Arbitrum/gmx/glp_vaults.md @@ -0,0 +1,59 @@ +## delta neutral strategies and glp vaults + +
+ +### vaults + +
+ +* vaults are suites of trustless defi strategies to generate delta-minimized returns on $GLP assets (gmx's lp token, which receives 70% of gmx's fee revenue). +* vaults can provide liquidity on gmx to collect yield from $GLP. they are also the counterparty to margin traders (benefiting from trader losses). +* vault should be backtested against months of real-world market data (including edge cases), usually with a baseline such as a standalone usdc vault +* hedges are algorithmically rebalanced at regular intervals. hedging on gmx incurs fees for minting and burning of $GLP, opening and closing positions, and funding for open interest. + +
+ +### delta neutral strategies + +
+ +* delta neutral strategies offset volatility so that GLP owners win yields while also not having to worry about price changes. +* this is usally achieved with shorting its underlying assets or hedging the positions, and the positions must be constantly changed based on the weight of the assets. + + +
+ +### pool exposures + +
+ +* the first component of a pool are the available assets, which are the vault assets minus reserved assets (assets set aside to cover longs). +* by covering longs, a reserved $BTC that would move with $BTC is used to cover a long position by surrendering all the upside gains to the counterparty (but also taking all collaterals of the counterparty when the price of $BTC goes down). +* conversely, a short against the pool becomes a synthetic long as its credit gains to the pool when the price goes up (but takes money from the pool when the price goes down). +* hedging $GLP means taking short positions, either on GMX or on a CEX. The short pays when the directional asset goes down, and loses when the opposite happens. +* the spread of hedged $GLP over $ETH is a good measure of $GLP's performance, and why a hedged strategy might be a better holding strategy that minimises volatility. + +
+ + + +### resources + +
+ +* [rage-gmx vaults](https://mirror.xyz/0x507c7777837B85EDe1e67f5A4554dDD7e58b1F87/KztyQ37Nfq7QT1BWrLz30jfqdtV23TtilJK1cbyXpxk0) +* [sentiment.xyz](https://www.sentiment.xyz/) +* [stfx](https://twitter.com/STFX_IO) +* [gmd protocol](https://twitter.com/GMDprotocol) +* [yield yak](https://twitter.com/yieldyak_) +* [vesta finance](https://twitter.com/vestafinance) +* [jones dao](https://twitter.com/DAOJonesOptions) +* [dopex](https://twitter.com/dopex_io) +* [olive app](https://oliveapp.finance/trade/options/zero-capital-risk/glp-glp?chainID=42161) +* [vovo finance](https://twitter.com/VovoFinance) +* [perpy finance](https://twitter.com/PerpyFinance) +* [lyra finance](https://twitter.com/lyrafinance) +* [neutra finance](https://twitter.com/Neutrafinance) +* [tender.fi](https://twitter.com/tender_fi) +* [gml vault tech overview](https://gmx-io.notion.site/gmx-io/GMX-Technical-Overview-47fc5ed832e243afb9e97e8a4a036353) +* [dune board on protocol strategies on top of $GLP](https://dune.com/dbustos20/protocol-strategies-on-top-of-glp) diff --git a/MEV_by_chains/MEV_on_Arbitrum/gmx/oracle_abuse.md b/MEV_by_chains/MEV_on_Arbitrum/gmx/oracle_abuse.md new file mode 100644 index 0000000..770127e --- /dev/null +++ b/MEV_by_chains/MEV_on_Arbitrum/gmx/oracle_abuse.md @@ -0,0 +1,25 @@ +## gmx oracle abuse + + +
+ +### tl; dr + +
+ + +* october'22 oracle abuse: [the thesis](https://twitter.com/joshua_j_lim/status/1571554171395923968) was that while the gmx team runs bots to update prices by making calls to SetPriceWithBit(), mev operators can observe these price updates in the mempool before they are on-chain. +* also in october'22, a [new oracle was deployed (XGET)](https://twitter.com/Kalcrypto1/status/1576977723016085505), allowing for information to be verified on-chain while providing frontrunning resistance (by having nodes sign a combination of blockhashes and values). + + +
+ +--- + +### resources + +
+ +* [chainsight twitter](https://twitter.com/ChainsightLabs/status/1580208615654584321?s=20&t=-FG5kQ_7kAKhLnbuk05wSg) +* [another twitter](https://twitter.com/wilburforce_/status/1571891338097860608) +* [a gmx oracle manipulator bot](https://mirror.xyz/steinkirch.eth/e-gsChe2GxfadHeBnMDsWe_4eQar9JJHJKlWqIE-jKY) diff --git a/MEV_by_chains/MEV_on_Arbitrum/gmx/tokenomics.md b/MEV_by_chains/MEV_on_Arbitrum/gmx/tokenomics.md new file mode 100644 index 0000000..a626baa --- /dev/null +++ b/MEV_by_chains/MEV_on_Arbitrum/gmx/tokenomics.md @@ -0,0 +1,39 @@ +### tokenomics + +
+ +* $GMX: + * participate in 30% of protocol fees + * earn escrowed $GMX ($esGMX) + * earn multiple points that boost yields + + +* $esGMX + * escrowed tokens are earned by staking $GMX or $GLP and can be vested + * participate in 30% of protocol fees + * earn escrowed $GMX ($esGMX) + * earn multiple points that boost yields + +* $GLP + * community-owned multi-asset liquidity pool + * the amm uses the pool to serve the decentralized spot exchange (swap) and perpetual contract services + * no impermanent loss + * earn 70% of protocol fees + * earn escrowed $GMX ($esGMX) + * close positions (withdraw of collateral) triggers $GLP burn mechanism + +
+ +##### initial token distribution + +* 45.28% (6.000.000 $GMX) allocated to XVIX and Gambit migration +* 15.09% (2.000.000 $GMX) allocated to the Floor Price Fund +* 15.09% (2.000.000 $GMX) allocated to reserve (for vesting from esGMX rewards) +* 15.09% (2.000.000 $GMX) allocated to liquidity (paired with ETH for liquidity on Uniswap) +* 7.55% (1.000.000 $GMX) allocated to the presale round +* 1.89% (250.000 $GMX) allocated to marketing & partnership (distributed to contributors linearly over two years) + + +
+ + diff --git a/MEV_by_chains/MEV_on_Avalanche/README.md b/MEV_by_chains/MEV_on_Avalanche/README.md new file mode 100644 index 0000000..9884398 --- /dev/null +++ b/MEV_by_chains/MEV_on_Avalanche/README.md @@ -0,0 +1,26 @@ +## mev on avalanche + +
+ + +### tl; dr + +
+ + + +
+ + + +--- + +### resources + +
+ +* [gmx resources](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_by_chains/MEV_on_Arbitrum/gmx) +* [chainsight on avax mev](https://avax.chainsight.dev/) +* [all fair in arb and mev on avalanche](https://www.ddmckinnon.com/2022/11/27/all-is-fair-in-arb-and-mev-on-avalanche-c-chain/) +* [avalanche blockchain consensus](https://docs.avax.network/overview/getting-started/avalanche-consensus) + diff --git a/MEV_by_chains/MEV_on_BSC/README.md b/MEV_by_chains/MEV_on_BSC/README.md new file mode 100644 index 0000000..798dea0 --- /dev/null +++ b/MEV_by_chains/MEV_on_BSC/README.md @@ -0,0 +1,15 @@ +## mev on bsc chain + +
+ + +
+ +### resources + + +
+ + +* [sandwich attack on bsc chain](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34/CIUNKP5rXRG2MTydySxjoAMml7txySxVEzAhTHwdfB8) +* [mev-bsc bot](https://github.com/0x2mev/mev-bsc) diff --git a/MEV_by_chains/MEV_on_Bitcoin/README.md b/MEV_by_chains/MEV_on_Bitcoin/README.md new file mode 100644 index 0000000..afef205 --- /dev/null +++ b/MEV_by_chains/MEV_on_Bitcoin/README.md @@ -0,0 +1,5 @@ +## MEV on Bitcoin + +
+ +* [The Spectre of MEV on Bitcoin, by blockspace.media](https://blockspace.media/insight/the-spectre-of-mev-on-bitcoin/) diff --git a/MEV_by_chains/MEV_on_Cosmos/README.md b/MEV_by_chains/MEV_on_Cosmos/README.md new file mode 100644 index 0000000..54afb84 --- /dev/null +++ b/MEV_by_chains/MEV_on_Cosmos/README.md @@ -0,0 +1,35 @@ +## mev on cosmos + +
+ +### tl; dr + +
+ +* tendermint clients using fifo ordering by default. +* mekatek: + * zenith creates an open market for block building within the cosmos. +* skip: + * mev-tenderminr is a modified version of tendermint to allow validators to accept tx bundles and introduces a seal bid auction for inclusion at the top of the block. + * skip secure is a version of flashbots protect (private tx RPC). +ā€ * proto-rev are custom-built modules for enshrining certain mev preferences into the core protocol. the first implementation was proposed to help Osmosis capture arbitrage-based mev rewards. + + + +
+ +---- + + +### resources + +
+ +* [meka.tech](https://meka.tech/thesis) +* [skip.money](https://skip.money) +* [thyborg twitter thread](https://twitter.com/Thyborg_/status/1547898785933639684) +* [l3 as real competitors to cosmos](https://malleable-viola-235.notion.site/2023-Crypto-Thesis-3d945fb15c8648be9983ec505cd2459b) +* [satellite mev dashboard on cosmos](https://satellite.skip.money/) +* [cosmos and tendermint, by maven11](https://maven11.substack.com/p/the-application-specific-chain-thesis) +* [osmosis protorev by skip protocol](https://osmosis.zone/blog/osmosis-protorev-by-skip-protocol-on-chain-app-directed-arbitrage) +* [fairblock, frontrunning protection](https://github.com/pememoni/FairBlock) diff --git a/MEV_by_chains/MEV_on_Ethereum/README.md b/MEV_by_chains/MEV_on_Ethereum/README.md new file mode 100644 index 0000000..1a20633 --- /dev/null +++ b/MEV_by_chains/MEV_on_Ethereum/README.md @@ -0,0 +1,131 @@ +## mev and proof-of-state ethereum + +
+ +

+

+ +
+
+ + +* **[running nodes and validators](running-a-node.md)** +* **[advanced resources on running nodes and validators](running-a-node-advanced.md)** +* **[searcher builder validator/sequencer](searcher-builder-validator-sequencer/)** +* **[pos consensus mechanisms](pos_consensus_mechanisms.md)** +* **[dets and specs for relays](relays.md)** +* **[geth on kubernetes](geth_and_k8s)** +* **[account abstraction](account_abstraction)** +* **[blockspaces](blockspace.md)** +* **[basic evm](evm-knowledge.md)** +* **[the mempool](the_mempool.md)** +* **[eip-1559](eip-1559.md)** +* **[glossary](glossary.md)** + + +
+ +--- + +### nodes and validators stats + +
+ +* **[ethereum.org launchpad](https://launchpad.ethereum.org/en/)** +* **[official beacon chain explorer](https://beaconscan.com/)** +* **[another beacon chain explorer](https://beaconcha.in/)** +* **[prater/goerli beacon chain explorer](https://prater.beaconcha.in/)** +* **[beacon chain validator ratings](https://www.rated.network/)** +* **[list of nodes as a service](https://ethereumnodes.com/)** +* **[node watch](https://www.nodewatch.io/)** +* **[archive node access](https://archivenode.io/)** +* **[list of nodes as a service](https://ethereum.org/en/developers/docs/nodes-and-clients/nodes-as-a-service/)** +* **[economics post-merge](https://docs.google.com/spreadsheets/d/15tmPOvOgi3wKxJw7KQJKoUe-uonbYR6HF7u83LR5Mj4/edit#gid=1018097491)** +* **[the first 1k epochs of eth](https://ethereum.github.io/rig/posdata/notebooks/mainnet_explore.html)** +* **[mev panda: data for mev-boost ecosystem](https://www.mevpanda.com/)** + + +
+ +#### consensus layer + +* **[client diversity vs. prysm usage](https://pools.invis.cloud/)** +* **[consensus clients comparisons](https://www.slashed.info/)** + +
+ +#### execution layer + +* **[ethereum mainnet stats](https://ethernodes.org/)** +* **[execution clients tracker](https://etherscan.io/nodetracker)** + +
+ +#### both layers + +* **[project sunshine](https://ethsunshine.com/)** +* **[clients diversity](https://clientdiversity.org/)** + +
+ +---- + +### clients + +
+ +#### execution layer + +* **[geth](https://geth.ethereum.org/)** +* **[nethermind](https://nethermind.io/)** +* **[besu](https://besu.hyperledger.org/en/stable/)** +* **[erigon](https://github.com/ledgerwatch/erigon)** +* **[akula](https://akula.app/)** +* **[execution api specification](https://github.com/ethereum/execution-apis)** + +
+ +#### consensus layer + +* **[prysm](https://github.com/prysmaticlabs/prysm)** +* **[lighthouse](https://github.com/sigp/lighthouse)** +* **[teku](https://github.com/ConsenSys/teku)** +* **[nimbus](https://nimbus.team/)** +* **[lodestar](https://lodestar.chainsafe.io/)** + + +
+ +#### engine api + +* **[engine api docs](https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md)** +* **[ethereum json-rpc api](https://ethereum.org/en/developers/docs/apis/json-rpc/)** + + +
+ + + +--- + + ### resources + +
+ +* **[multidimensional gas pricing, by vitalik](https://vitalik.eth.limo/general/2024/05/09/multidim.html)** +* **[resources on private order flows](https://github.com/go-outside-labs/mev-toolkit/tree/main/private_order_flows)** +* **[proposer/block builder separation-friendly fee market designs](https://ethresear.ch/t/proposer-block-builder-separation-friendly-fee-market-designs/9725)** +* **[mev on eth2 talk by vitalik](https://www.youtube.com/watch?v=OD54WfVuDWw&list=PLRHMe0bxkuel3w3C7P_WVvp9ShLi3HKRI&index=30)** +* **[updates on pbs video by barnabe monnot](https://archive.devcon.org/archive/watch/6/updates-on-proposer-builder-separation/?tab=YouTube)** +* **[Ethereum Proof-of-Stake Consensus Specifications](https://github.com/ethereum/consensus-specs/tree/dev/specs)** +* **[Increasing censorship resistance of transactions under proposer/builder separation (PBS), by Vitalik et al](https://notes.ethereum.org/@vbuterin/pbs_censorship_resistance)** +* **[Weak Subjectivity in Eth2.0](https://notes.ethereum.org/@adiasg/weak-subjectvity-eth2)** +* **[Ethereum Proof-of-Stake Consensus Specifications](https://github.com/ethereum/consensus-specs)** +* **[order flow, auctions, and centralization (flashbots)](https://collective.flashbots.net/t/order-flow-auctions-and-centralisation-i-a-warning/258)** +* **[awesome rpc endpoints](https://github.com/arddluma/awesome-list-rpc-nodes-providers)** +* **[seeing like a protocol, by barnabe](https://barnabe.substack.com/p/seeing-like-a-protocol)** +* **[pbs links, by domothy, ef](https://notes.ethereum.org/@domothy/pbs_links)** +* **[local bundle simulation with anvil](https://www.degencode.com/p/local-bundle-simulation-with-anvil)** +* **[ethereum dashboards](https://github.com/superphiz/dashboards)** +* **[lib.mev](https://libmev.com/dashboard)** +* **[we are all building the same thing, by dba](https://dba.xyz/were-all-building-the-same-thing/)** diff --git a/MEV_by_chains/MEV_on_Ethereum/account_abstraction/README.md b/MEV_by_chains/MEV_on_Ethereum/account_abstraction/README.md new file mode 100644 index 0000000..ae50298 --- /dev/null +++ b/MEV_by_chains/MEV_on_Ethereum/account_abstraction/README.md @@ -0,0 +1,43 @@ +## ERC-4337: account abstraction + +
+ +### tl; dr + +
+ +* this change implements censorship-resistant account abstraction without making any changes to the consensus layer of ethereum, by creating a new mempool, a smart contract wallet standard, and a shared entry point contract for managing user operations. +* this enables wallets to have multi-sigs, social recovery, hardware enclaves, etc. +* **UserOperations** are pseudo-transactions objects that represent a user's intent. +* **Bundlers** are new actors that are either block builders, or users that can send transactions to block builders through a bundle marketplace. they package up a set of objects into a tx making a call to a special contract and sending objects to a separate mempool. +* the **EntryPoint** is a smart contract that receives **UserOperations** from **Bundlers**. +* Aggregators combines multiple signatures into a single signature, to validate multiple **UserOperatons** in one step. +* **Smart contract account** are the target of the **UserOperation** and will validate and execute the **UserOperation**. +* **Paymaster** create flexibility for how gas is paid and by whom. + +
+ +### resources + +
+ +* **[erc-4337 is on mainnet](https://twitter.com/erc4337/status/1631087958949531648)** +* **[account abstraction, by safe](https://safe.mirror.xyz/9KmZjEbFkmI79s28d9xar6JWYrE50F5AHpa5CR12YGI)** +* **[erc-4337 contract deployment](https://etherscan.io/address/0x0576a174D229E3cFA37253523E645A78A0C91B57#code)** +* **[unpacking erc-4337, by a. chiplunkar](https://frontier.tech/unpacking-erc-4337)** +* **[account abstraction series, by alchemy](https://www.alchemy.com/blog/account-abstraction)** +* **[erc-4337 bundler implementation in rust](https://github.com/Vid201/aa-bundler)** +* **[erc-4337: account abstraction using alt mempool](https://eips.ethereum.org/EIPS/eip-4337)** +* **[account abstraction gas benchmakrs, by eth-infinitism](https://github.com/eth-infinitism/account-abstraction/blob/develop/reports/gas-checker.txt)** + + +
+ +###### protocols that don't use erc-4337 + +
+ +* [gnosis safe](https://safe.global/) +* [argent]() + + diff --git a/MEV_by_chains/MEV_on_Ethereum/block_builders.md b/MEV_by_chains/MEV_on_Ethereum/block_builders.md new file mode 100644 index 0000000..2d693c8 --- /dev/null +++ b/MEV_by_chains/MEV_on_Ethereum/block_builders.md @@ -0,0 +1,48 @@ +## block builders on ethereum + +
+ +### tl; dr + +
+ +* block builders have the same 3 sources of tx as validators did before the merge. they can: + 1. act as searchers and include their own MEV-extracting transactions. + 2. include txs submitted to them privately, including those submitted by external searchers (through a "bribe" through either coinbase payments or `txsFees`). + 3. include pending tx broadcasted in the public mempool +* `blockValue` = `txFees` + MEV +* builders will aggregate txs from users, MEV searchers, and own private order flow to make the highest value blocks possible +* builders having its blocks included consistently incentivizes more private order flow (searchers want their tx included) +* builder can be selling future blockspace upfront so market makers or protocols can secure block space for their transactions or users + + +
+ + + + + +
+ +---- + +### resources + +
+ + +* [builder specs, by the ef](https://github.com/ethereum/builder-specs) +* [builder opens source, by flashbots](https://github.com/flashbots/builder) +* [flashbots block building algorithm](https://writings.flashbots.net/searching-post-merge#blockbuilding-algorithm) +* [etherscan blocks](https://etherscan.io/blocks), [mev blocks](https://etherscan.io/blocks/label/mev-block), and [mev builders](https://etherscan.io/accounts/label/mev-builder) +* [builder69.io endpoint for searchers (bundle/tx)](https://builder0x69.io) +* [mev-rs - gateway to a network of block builders](https://github.com/ralexstokes/mev-rs) +* [mev order flow, the king of block builders](https://coinyuppie.com/mev-order-flow-the-king-of-block-builders/) +* [fat stats for builders through mev-boost](https://www.mevpanda.com/) +* [decentralizing the builder role, by vitalik](https://hackmd.io/@vbuterin/distributed_builders#/) +* [mev and the rise of builders, by galaxy](https://www.galaxy.com/research/whitepapers/mev-the-rise-of-the-builders/) +* [block builder decentralization is coming, but maybe not so soon, by ballsyalchemist](https://bittokoin.substack.com/p/block-builder-decentralization-is) +* [the role of block building in the future of ethereum, by d. der werff](https://frontier.tech/beyond-extraction) +* [running geth within sgx, by flashbots](https://writings.flashbots.net/geth-inside-sgx) +* [rated.network's builders dashboard](https://www.rated.network/builders?network=mainnet&timeWindow=1d&page=1) + diff --git a/MEV_on_Ethereum/blockspace.md b/MEV_by_chains/MEV_on_Ethereum/blockspace.md similarity index 76% rename from MEV_on_Ethereum/blockspace.md rename to MEV_by_chains/MEV_on_Ethereum/blockspace.md index e721812..1e7f8df 100644 --- a/MEV_on_Ethereum/blockspace.md +++ b/MEV_by_chains/MEV_on_Ethereum/blockspace.md @@ -21,4 +21,5 @@ - [ethereum blockspace by paradigm](https://research.paradigm.xyz/ethereum-blockspace) - [ethereum blockspace by alkimiya](https://www.aniccaresearch.tech/blog/ethereum-blockspace-who-gets-what-and-why) - [structuring blockspace derivatives by julian ma](https://mirror.xyz/0x03c29504CEcCa30B93FF5774183a1358D41fbeB1/WKa3GFC03uY34d2MufTyD0c595xVRUEZi9RNG-dHNKs) -- [slot space vc. block space](https://mirror.xyz/0x03c29504CEcCa30B93FF5774183a1358D41fbeB1/CPYI91s98cp9zKFkanKs_qotYzw09kWvouaAa9GXBrQ) +- [slot space vc. blockspace](https://mirror.xyz/0x03c29504CEcCa30B93FF5774183a1358D41fbeB1/CPYI91s98cp9zKFkanKs_qotYzw09kWvouaAa9GXBrQ) +- [builders buying empty blocks and relaying through flashbots](https://twitter.com/MevRefund/status/1573416023998578703) diff --git a/MEV_on_Ethereum/eip-1559.md b/MEV_by_chains/MEV_on_Ethereum/eip-1559.md similarity index 100% rename from MEV_on_Ethereum/eip-1559.md rename to MEV_by_chains/MEV_on_Ethereum/eip-1559.md diff --git a/MEV_by_chains/MEV_on_Ethereum/ethereum_2.0/shapella.md b/MEV_by_chains/MEV_on_Ethereum/ethereum_2.0/shapella.md new file mode 100644 index 0000000..b6f327a --- /dev/null +++ b/MEV_by_chains/MEV_on_Ethereum/ethereum_2.0/shapella.md @@ -0,0 +1,27 @@ +## shangai updates + +
+ +### tl; dr + +
+ +* the [shapella upgrade](https://blog.ethereum.org/2023/03/28/shapella-mainnet-announcement) is a hard fork that happened on april/12/2023 and added changed to the execution layer (shanghai), consensus layer (capella), and the engine API, being the last piece of the puzzle that marks the completion of ethereum’s transition to pos. +* To make it possible to unlock their staked ETH, shapella introduces `BLSToExecutionChange` (BTEC) message to the consensus layer, which allows validators to set the execution address for withdrawals. the beacon chain can only process a maximum of 16 withdrawals per block, with the limit in place to maintain network security. +* EIPS: EIP-3651, EIP-3855, EIP-3860, EIP-4895, EIP-6049 +* Boards: [nansen](https://twitter.com/nansen_ai/status/1645696820348321793), [dune by 21 shares](https://dune.com/21shares_research/shanghai-upgrade-coundown), [token unlocks](https://token.unlocks.app/ethereum-shanghai) + + + +
+ +--- + +### resources + +
+ +* [staking rewards](https://www.stakingrewards.com/) +* [the ultimate guide for shapella, by perpetual](https://perpprotocol.mirror.xyz/Ng0NmBHmMgOKfrZhtR_lDv1JG-Out79NUB5b0OfLDB8) +* [shangai updates and warm fees, by min](https://www.livemint.com/market/cryptocurrency/ethereum-insiders-to-get-fee-cuts-that-others-won-t-in-upgrade-11667749979740.html) + diff --git a/MEV_on_Ethereum/evm-knowledge.md b/MEV_by_chains/MEV_on_Ethereum/evm-knowledge.md similarity index 100% rename from MEV_on_Ethereum/evm-knowledge.md rename to MEV_by_chains/MEV_on_Ethereum/evm-knowledge.md diff --git a/MEV_on_Ethereum/geth_and_k8s/README.md b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/README.md similarity index 94% rename from MEV_on_Ethereum/geth_and_k8s/README.md rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/README.md index b72f3eb..be05448 100644 --- a/MEV_on_Ethereum/geth_and_k8s/README.md +++ b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/README.md @@ -102,7 +102,9 @@ Chain ID: 137
-### references +### rsources * [geth commands](https://geth.ethereum.org/docs/interface/command-line-options) +* [geth with mev seacher additions, by code0x2) +* [graphql server on geth node](https://twitter.com/libevm/status/1467376978697211904) diff --git a/MEV_on_Ethereum/geth_and_k8s/deployment_gcp_docker.md b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/deployment_gcp_docker.md similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/deployment_gcp_docker.md rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/deployment_gcp_docker.md diff --git a/MEV_on_Ethereum/geth_and_k8s/deployment_gcp_k8s.md b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/deployment_gcp_k8s.md similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/deployment_gcp_k8s.md rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/deployment_gcp_k8s.md diff --git a/MEV_on_Ethereum/geth_and_k8s/entrypoint.sh b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/entrypoint.sh similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/entrypoint.sh rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/entrypoint.sh diff --git a/MEV_on_Ethereum/geth_and_k8s/genesis.dockerfile b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/genesis.dockerfile similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/genesis.dockerfile rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/genesis.dockerfile diff --git a/MEV_on_Ethereum/geth_and_k8s/genesis.json b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/genesis.json similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/genesis.json rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/genesis.json diff --git a/MEV_on_Ethereum/geth_and_k8s/genesis_block_explanation.md b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/genesis_block_explanation.md similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/genesis_block_explanation.md rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/genesis_block_explanation.md diff --git a/MEV_on_Ethereum/geth_and_k8s/geth_creation_commands.md b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/geth_creation_commands.md similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/geth_creation_commands.md rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/geth_creation_commands.md diff --git a/MEV_on_Ethereum/geth_and_k8s/k8s/certificate.yaml b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/certificate.yaml similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/k8s/certificate.yaml rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/certificate.yaml diff --git a/MEV_on_Ethereum/geth_and_k8s/k8s/deployment.yaml b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/deployment.yaml similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/k8s/deployment.yaml rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/deployment.yaml diff --git a/MEV_on_Ethereum/geth_and_k8s/k8s/ingress.yaml b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/ingress.yaml similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/k8s/ingress.yaml rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/ingress.yaml diff --git a/MEV_on_Ethereum/geth_and_k8s/k8s/manifest.yaml b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/manifest.yaml similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/k8s/manifest.yaml rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/manifest.yaml diff --git a/MEV_on_Ethereum/geth_and_k8s/k8s/service.yaml b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/service.yaml similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/k8s/service.yaml rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/k8s/service.yaml diff --git a/MEV_on_Ethereum/geth_and_k8s/running-a-node-geth.md b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/running-a-node-geth.md similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/running-a-node-geth.md rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/running-a-node-geth.md diff --git a/MEV_on_Ethereum/geth_and_k8s/scripts/create_docker.sh b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/scripts/create_docker.sh similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/scripts/create_docker.sh rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/scripts/create_docker.sh diff --git a/MEV_on_Ethereum/geth_and_k8s/scripts/entrypoint.sh b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/scripts/entrypoint.sh similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/scripts/entrypoint.sh rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/scripts/entrypoint.sh diff --git a/MEV_on_Ethereum/geth_and_k8s/scripts/genesis.dockerfile b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/scripts/genesis.dockerfile similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/scripts/genesis.dockerfile rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/scripts/genesis.dockerfile diff --git a/MEV_on_Ethereum/geth_and_k8s/scripts/genesis.json b/MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/scripts/genesis.json similarity index 100% rename from MEV_on_Ethereum/geth_and_k8s/scripts/genesis.json rename to MEV_by_chains/MEV_on_Ethereum/geth_and_k8s/scripts/genesis.json diff --git a/MEV_on_Ethereum/README.md b/MEV_by_chains/MEV_on_Ethereum/glossary.md similarity index 52% rename from MEV_on_Ethereum/README.md rename to MEV_by_chains/MEV_on_Ethereum/glossary.md index 96e5a73..9f9585e 100644 --- a/MEV_on_Ethereum/README.md +++ b/MEV_by_chains/MEV_on_Ethereum/glossary.md @@ -1,112 +1,7 @@ -# šŸ„ mev and proof-of-state ethereum - -
- - -Screen Shot 2022-11-17 at 3 47 49 PM - - -
- -### in this dir - -
- -* [running nodes and validators](running-a-node.md) -* [advanced resources on running nodes and validators](running-a-node-advanced.md) -* [geth on kubernetes](geth_and_k8s) -* [dets and specs for relays](relays.md) -* [pos consensus mechanisms](pos_consensus_mechanisms.md) -* [blockspaces](blockspace.md) -* [basic evm](evm-knowledge.md) -* [eip-1559](eip-1559.md) -* [the mempool](the_mempool.md) - - -
- ---- - -## nodes and validators stats - -
- -* [ethereum.org launchpad](https://launchpad.ethereum.org/en/) -* [official beacon chain explorer](https://beaconscan.com/) -* [another beacon chain explorer](https://beaconcha.in/) -* [prater/goerli beacon chain explorer](https://prater.beaconcha.in/) -* [beacon chain validator ratings](https://www.rated.network/) -* [list of nodes as a service](https://ethereumnodes.com/) -* [node watch](https://www.nodewatch.io/) -* [archive node access](https://archivenode.io/) -* [list of nodes as a service](https://ethereum.org/en/developers/docs/nodes-and-clients/nodes-as-a-service/) -* [economics post-merge](https://docs.google.com/spreadsheets/d/15tmPOvOgi3wKxJw7KQJKoUe-uonbYR6HF7u83LR5Mj4/edit#gid=1018097491) -* [exploring the first 1k epochs of eth, by barnabe.eth](https://ethereum.github.io/rig/posdata/notebooks/mainnet_explore.html) - - -
- -### consensus layer - -* [client diversity vs. prysm usage](https://pools.invis.cloud/) -* [consensus clients comparisons](https://www.slashed.info/) - -
- -### execution layer - -* [ethereum mainnet stats](https://ethernodes.org/) -* [execution clients tracker](https://etherscan.io/nodetracker) - -
- -### both layers - -* [project sunshine](https://ethsunshine.com/) -* [clients diversity](https://clientdiversity.org/) - -
- ----- - -## clients - -
- -### execution layer - -* [geth](https://geth.ethereum.org/) -* [nethermind](https://nethermind.io/) -* [besu](https://besu.hyperledger.org/en/stable/) -* [erigon](https://github.com/ledgerwatch/erigon) -* [akula](https://akula.app/) -* [execution api specification](https://github.com/ethereum/execution-apis) - -
- -### consensus layer - -* [prysm](https://github.com/prysmaticlabs/prysm) -* [lighthouse](https://github.com/sigp/lighthouse) -* [teku](https://github.com/ConsenSys/teku) -* [nimbus](https://nimbus.team/) -* [lodestar](https://lodestar.chainsafe.io/) - - -
- -### engine api - -* [engine api docs](https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md) -* [ethereum json-rpc api](https://ethereum.org/en/developers/docs/apis/json-rpc/) - - -
- ----- ### terminology +
* **attestation**: at designated times, each validator is responsible for publishing different attestations that formally declare this validator's view of the chain, including the last finalized checkpoint and the current head of the chain. @@ -171,16 +66,3 @@ Proposer Builder Separation, see: State of research: increasing censorship resis
- - --- - - ### resources - - * [proposer/block builder separation-friendly fee market designs](https://ethresear.ch/t/proposer-block-builder-separation-friendly-fee-market-designs/9725) - * [mev on eth2 talk by vitalik](https://www.youtube.com/watch?v=OD54WfVuDWw&list=PLRHMe0bxkuel3w3C7P_WVvp9ShLi3HKRI&index=30) - * [updates on pbs video by barnabe monnot](https://archive.devcon.org/archive/watch/6/updates-on-proposer-builder-separation/?tab=YouTube) - * [Ethereum Proof-of-Stake Consensus Specifications](https://github.com/ethereum/consensus-specs/tree/dev/specs) -* [Increasing censorship resistance of transactions under proposer/builder separation (PBS), by Vitalik et al](https://notes.ethereum.org/@vbuterin/pbs_censorship_resistance) -* [Weak Subjectivity in Eth2.0](https://notes.ethereum.org/@adiasg/weak-subjectvity-eth2) -* [Ethereum Proof-of-Stake Consensus Specifications](https://github.com/ethereum/consensus-specs) -* [order flow, auctions, and centralization (flashbots)](https://collective.flashbots.net/t/order-flow-auctions-and-centralisation-i-a-warning/258) diff --git a/MEV_on_Ethereum/pos_consensus_mechanisms.md b/MEV_by_chains/MEV_on_Ethereum/pos_consensus_mechanisms.md similarity index 100% rename from MEV_on_Ethereum/pos_consensus_mechanisms.md rename to MEV_by_chains/MEV_on_Ethereum/pos_consensus_mechanisms.md diff --git a/MEV_by_chains/MEV_on_Ethereum/relays.md b/MEV_by_chains/MEV_on_Ethereum/relays.md new file mode 100644 index 0000000..2526f9c --- /dev/null +++ b/MEV_by_chains/MEV_on_Ethereum/relays.md @@ -0,0 +1,42 @@ +## pbs tx and/or mev-boost relays + +
+ +### tl; dr + +* relays are a bundle propagation service that receives bundles from searchers, simulate each txs, and forwards them to block producers. +* validators can use relays to outsource their block production to entities specialized in extracting extra revenue. + + +
+ +### resources + +* **[mev relay list](https://github.com/eth-educators/ethstaker-guides/blob/main/MEV-relay-list.md)** +* **[everything mev-boost](https://github.com/MEV-WAIFU-LABS/mev_toolkit/blob/main/flashbots/mev-boost/README.md)** +* **[fb relay api](https://flashbots.notion.site/Relay-API-Spec-5fb0819366954962bc02e81cb33840f5)** +* **[uptime monitor for relays](https://mev-relays.beaconstate.info/)** +* **[mev relay ofac watch](https://www.mevwatch.info/)** +* **[mev-boost relay data](https://mevboost.pics/)** +* **[SushiGuardRouterV01 (with Manifold relay)](https://snapshot.org/#/sushigov.eth/proposal/bafkreigjjhjx2j2b526d3poeg23w2xan4rcgnzvcxinsssv7n37lu5p7s4)** +* **[relayscan.io](https://www.relayscan.io/)** +* **[malicious validator $20 from mev bots](https://eigenphi.substack.com/p/how-did-a-malicious-validator-steal)** +* **[optimistic relays, by frontier.tech](https://frontier.tech/optimistic-relays-and-where-to-find-them)** +* **[rated analytics on relays](https://www.rated.network/relays?network=mainnet)** +* **[ethsaker relay list ](https://github.com/remyroy/ethstaker/blob/main/MEV-relay-list.md)** +* **[beaconcha.in relay list and stats](https://beaconcha.in/relays)** +* **[ultrasound money](https://relay.ultrasound.money/)** + +
+ +##### on building a relay + +* **[fork mev-boost relay](https://github.com/flashbots/mev-boost-relay)** +* **[blocknative dreamboat](https://github.com/blocknative/dreamboat)** +* **[join lido call for relays](https://research.lido.fi/t/lido-on-ethereum-call-for-relay-providers/2844/10)** +* **[add label to beaconcha.in](https://beaconcha.in/relays)** +* **[join fb boost relays tg](https://t.me/+E-HTvTDIsdI3MjM1)** +* **[understanding mev-boost liveness risk, by hasu](https://writings.flashbots.net/writings/understanding-mev-boost-liveness-risks/)** +* **[keeping relays honest](https://notes.ethereum.org/@yoav/BJeOQ8rI5)** +* **[optimistic relay proposal](https://github.com/michaelneuder/optimistic-relay-documentation/blob/main/proposal.md)** + diff --git a/MEV_on_Ethereum/running-a-node-advanced.md b/MEV_by_chains/MEV_on_Ethereum/running-a-node-advanced.md similarity index 97% rename from MEV_on_Ethereum/running-a-node-advanced.md rename to MEV_by_chains/MEV_on_Ethereum/running-a-node-advanced.md index 180771e..80b4e4c 100644 --- a/MEV_on_Ethereum/running-a-node-advanced.md +++ b/MEV_by_chains/MEV_on_Ethereum/running-a-node-advanced.md @@ -192,10 +192,17 @@ openssl rand -hex 32 > jwtsecret ---- -### further resources +### resources
+ + + + +
+ + * [code for bootnodes.go](https://github.com/ethereum/go-ethereum/blob/master/params/bootnodes.go) * [consensus specs for networking](https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#the-gossip-domain-gossipsub) * [consensus + execution mechanism](https://ethresear.ch/t/eth1-eth2-client-relationship/7248) diff --git a/MEV_on_Ethereum/running-a-node.md b/MEV_by_chains/MEV_on_Ethereum/running-a-node.md similarity index 100% rename from MEV_on_Ethereum/running-a-node.md rename to MEV_by_chains/MEV_on_Ethereum/running-a-node.md diff --git a/MEV_by_chains/MEV_on_Ethereum/searcher-builder-validator-sequencer/README.md b/MEV_by_chains/MEV_on_Ethereum/searcher-builder-validator-sequencer/README.md new file mode 100644 index 0000000..2b1818e --- /dev/null +++ b/MEV_by_chains/MEV_on_Ethereum/searcher-builder-validator-sequencer/README.md @@ -0,0 +1,20 @@ +## Notes on Searcher-Builder-Validator/Sequencer (SBV) + +
+ +### tl; dr + +* cooperation between proposers seems unlike in an unfair market, especially in a semi-permissionless half-centralized sequencer setup +* considering slashing risks, the incentives to become a sequencer (despite tx fees) are unclear +* having a Searcher-Builder-Validator/Sequencer supply chain could lead to trusted social contracts between all actors +* should MEV be addressed on the application layer? this generate security concerns on the underlying protocol +* a fair marketplace would let searchers to look for predictable MEV state changes with profitable actions, with the security of the protocol (with the sequencer itself) + + +
+ +--- + +### resources + +* [decentralizing sequencers, by maven11](https://maven11.substack.com/i/100501772/decentralizing-sequencers) diff --git a/MEV_on_Ethereum/the_mempool.md b/MEV_by_chains/MEV_on_Ethereum/the_mempool.md similarity index 100% rename from MEV_on_Ethereum/the_mempool.md rename to MEV_by_chains/MEV_on_Ethereum/the_mempool.md diff --git a/MEV_by_chains/MEV_on_Optimism/README.md b/MEV_by_chains/MEV_on_Optimism/README.md new file mode 100644 index 0000000..c724e8b --- /dev/null +++ b/MEV_by_chains/MEV_on_Optimism/README.md @@ -0,0 +1,33 @@ +## mev on optimism + +
+ +### tl; dr + +
+ +* optimism's mempool is not public, disallowing re-order transactions (including after the [bedrock update](https://dev.optimism.io/introducing-optimism-bedrock/)) + +
+ + +--- + +### in this dir + +
+ +* [optimistic rollups](optimistic_rollups.md) + +
+ + +
+ +--- + +### resources + +
+ +* [intro to mev auctions](https://www.mev.wiki/solutions/faas-or-meva/optimism) diff --git a/MEV_by_chains/MEV_on_Optimism/optimistic_rollups.md b/MEV_by_chains/MEV_on_Optimism/optimistic_rollups.md new file mode 100644 index 0000000..ea0eeee --- /dev/null +++ b/MEV_by_chains/MEV_on_Optimism/optimistic_rollups.md @@ -0,0 +1,16 @@ +## optimistic rollups + +
+ +### tl; dr + + +
+ + +* in optimistic rollups, txs are batched up and the state root (same as zkrs) alongside the calldata (the tx state) is sent to the l2 contract on ethereum +* dispute period can cause actual finality of txs to not happen until around a week later + +
+ +Screen Shot 2023-02-07 at 10 57 12 AM diff --git a/MEV_by_chains/MEV_on_Polygon/README.md b/MEV_by_chains/MEV_on_Polygon/README.md new file mode 100644 index 0000000..2eb534c --- /dev/null +++ b/MEV_by_chains/MEV_on_Polygon/README.md @@ -0,0 +1,26 @@ +## polygon + +
+ + +### tl; dr + +
+ +* reduced gas fees resulted in large bot-spamming attacks +* for frontrunning, backrunning, or sandwiching to succeed, the bot's tx needs to land right before or behind the victim's, respectively. bots cannot choose the ordering so they need to set gas fees in a way the txs land in the right place (usually by spamming). + + + +
+ +--- + +### resources + + +
+ +* [arbitrage smart contract](https://github.com/OnlyF0uR/Polygon-Arbitrage-Contract) +* [flashloan on polygon](https://github.com/yuichiroaoki/poly-flash) +* [bookmark relevant for zk researchers](https://collective.flashbots.net/t/bookmarks-relevant-for-zk-researchers/1241) diff --git a/MEV_by_chains/MEV_on_Solana/README.md b/MEV_by_chains/MEV_on_Solana/README.md new file mode 100644 index 0000000..940b639 --- /dev/null +++ b/MEV_by_chains/MEV_on_Solana/README.md @@ -0,0 +1,26 @@ +## mev on solana + +
+ +* **[solana-mev-literature](https://github.com/urani-trade/solana-mev-literature)** +* **[jito: mev on solana in the infrastructure layer](https://jito.wtf/)** + +* **[jito mev.go](https://github.com/weeaa/jito-go)** + +
+ +--- + +### more resources + +
+ +* **[solana mev literature, by urani labs](https://github.com/urani-labs/solana-mev-literature)** +* **[mev 2.0: the rise of MPSVs](https://www.recvc.com/mev-2-0-the-rise-of-mpsvs/)** +* **[solana network statistics](https://jito.retool.com/embedded/public/7e37389a-c991-4fb3-a3cd-b387859c7da1)** +* **[mev bots on more than $2 million in less than an minute](https://twitter.com/oraprotocol/status/1539664843816333312?s=20&t=Hdo4irxrDiatM4LKA3FbhA)** +* **[solana mev Outlook](https://medium.com/chorus-one/analyzing-mev-instances-on-solana-part-3-6376bcf40b6b)** +* **[MEV-ARB-90-0322 on Misaka](https://github.com/0xMisaka/MEV-data-solana/blob/main/MEV-ARB-90-0322.ipynb0)** +* **[mango market liquidator bot](https://github.com/blockworks-foundation/liquidator-v3)** +* **[jito's thread on sol stakers fighting mev bots](https://twitter.com/jito_sol/status/1630584599352082434)** +* **[solana arb bot](https://github.com/0xNineteen/solana-arbitrage-bot)** diff --git a/MEV_by_chains/README.md b/MEV_by_chains/README.md new file mode 100644 index 0000000..0a2e53c --- /dev/null +++ b/MEV_by_chains/README.md @@ -0,0 +1,29 @@ +## mev on chains + +
+ +* [solana](MEV_on_Solana) +* [ethereum](MEV_on_Ethereum) +* [bitcoin](MEV_on_Bitcoin) +* [arbitrum](MEV_on_Arbitrum) +* [avalanche](MEV_on_Avalance) +* [binance](MEV_on_Binance) +* [optimism](MEV_on_Optimism) +* [polygon](MEV_on_Polygon) +* [cosmos](MEV_on_Cosmos) + + +
+ +--- + +### external resources + +
+ +- [mev on l2s, by ha et. al](https://timroughgarden.github.io/fob21/reports/r11.pdf) +- [the gmx oracle manipoolator](https://mirror.xyz/steinkirch.eth/e-gsChe2GxfadHeBnMDsWe_4eQar9JJHJKlWqIE-jKY) +- [multi-block mev, by jensen et al](https://arxiv.org/pdf/2303.04430.pdf) +- [random half-baked thoughts on mev redistribution](https://mirror.xyz/apriori.eth/0Y2hpGnFpBY08ALM6gc-E3hLtss9KXhY8LKCo4WSZFQ) +- [ mevconomics for modular blockchain stacks, john addler](https://docs.google.com/presentation/d/14WxM6KmTF14cY382XhNe_DOHczj4N4SRMv5waz2Lxy4/edit#slide=id.p) + diff --git a/MEV_on_Arbitrum/README.md b/MEV_on_Arbitrum/README.md deleted file mode 100644 index 40a3af8..0000000 --- a/MEV_on_Arbitrum/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## mev on arbitrum - -
- -### resources - -* [Transaction ordering policy](https://research.arbitrum.io/t/transaction-ordering-policy/127) diff --git a/MEV_on_Avalanche/README.md b/MEV_on_Avalanche/README.md deleted file mode 100644 index b7a32d1..0000000 --- a/MEV_on_Avalanche/README.md +++ /dev/null @@ -1,15 +0,0 @@ -## mev on avalanche - - -### tl; dr - - -
- ---- - -### resources - -* [chainsight](https://avax.chainsight.dev/) -* [gmx price oracle abuse](https://twitter.com/ChainsightLabs/status/1580208615654584321?s=20&t=-FG5kQ_7kAKhLnbuk05wSg) -* [all fair in arb and mev on avalanche](https://www.ddmckinnon.com/2022/11/27/all-is-fair-in-arb-and-mev-on-avalanche-c-chain/) diff --git a/MEV_on_Binance/README.md b/MEV_on_Binance/README.md deleted file mode 100644 index 529cdd4..0000000 --- a/MEV_on_Binance/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## mev on binance - -
- -### resources - -* [mev-bsc](https://github.com/0x2mev/mev-bsc) diff --git a/MEV_on_Cosmos/README.md b/MEV_on_Cosmos/README.md deleted file mode 100644 index 1008537..0000000 --- a/MEV_on_Cosmos/README.md +++ /dev/null @@ -1,19 +0,0 @@ -## šŸ« mev on cosmos - - -### tl; dr - - -
- ----- - - -### resources - - - -* [skip.money](https://skip.money) -* [satellite mev dashboard on cosmos](https://satellite.skip.money/) -* [thyborg twitter thread](https://twitter.com/Thyborg_/status/1547898785933639684) -* [FairBlock, frontrunning protection](https://github.com/pememoni/FairBlock) diff --git a/MEV_on_Ethereum/block_builders.md b/MEV_on_Ethereum/block_builders.md deleted file mode 100644 index a19ca6a..0000000 --- a/MEV_on_Ethereum/block_builders.md +++ /dev/null @@ -1,18 +0,0 @@ -## block builders - -### tl; dr - - -* `blockValue` = `txFees` + MEV -* block bidding is carried out as a sealed bid auction -* however, searchers can pay the builder through either coinbase payments and `txsFees` ----- - -### resources - -* [ef builder specs](https://github.com/ethereum/builder-specs) -* [flashbots builder](https://github.com/flashbots/builder) -* [etherscan blocks](https://etherscan.io/blocks), [mev blocks](https://etherscan.io/blocks/label/mev-block), and [mev builders](https://etherscan.io/accounts/label/mev-builder) -* [builder69.io endpoint for searchers (bundle/tx)](https://builder0x69.io) -* [mev-rs - gateway to a network of block builders](https://github.com/ralexstokes/mev-rs) -* [mev order flow, the king of block builders](https://coinyuppie.com/mev-order-flow-the-king-of-block-builders/) diff --git a/MEV_on_Ethereum/relays.md b/MEV_on_Ethereum/relays.md deleted file mode 100644 index e48d0d4..0000000 --- a/MEV_on_Ethereum/relays.md +++ /dev/null @@ -1,68 +0,0 @@ -## pbs tx and/or mev-boost relays - -
- -### tl; dr - -* relays are a bundle propagation service that receives bundles from searchers, simulate each txs, and forwards them to block producers. -* validators can use relays to outsource their block production to entities specialized in extracting extra revenue. - - -
- -### mainnet (mev-boost) relay list - -* [flashbots]() - - The Flashbots team worked very closely with the Ethereum foundation as its founders were researchers who saw the threat that MEV posed to blockchains. Since then, they’ve developed MEV-Geth and MEV-Boost to prevent the centralization of MEV searchers and validators. -* [blocknative](https://docs.blocknative.com/mev-relay-instructions-for-ethereum-validators) - - Blocknative provides one MEV relay, Dreamboat, that validators can connect to. This relay is open sourced and publicly available. Blocknative has APIs that allow developers and data analysts to identify proposer payloads, blocks received, and validator registration. Notably, Dreamboat is not a Flashbots Relay fork. -* [bloXroute MEV relay](https://bloxroute.max-profit.blxrbdn.com/) - - BloXroute has been known to provide traders with information services. Traders that receive information quickly have an edge in capturing the next opportunity. Imagine a block contains information that will change the price of an asset. If the trader sees this information, they can quickly calculate how this information will change the spread between two liquidity pools. -* [eden](https://relay.edennetwork.io/info) - - Eden is a permissioned system for block builders. They are accepting applications for block builders, but they also run their own. They capitalize on orderflow sent to their builder via their private RPC. -* [manifold]() - - Manifold has a focus on trade execution quality and end user settlement. They support blocks that are not OFAC compliant. -* [ultrasound money](https://relay.ultrasound.money/) - - not OFAC compliant -* [aestus](https://www.aestus.live/) - - not OFAC compliant -* [ethsaker relay list ](https://github.com/remyroy/ethstaker/blob/main/MEV-relay-list.md) -* [beaconcha.in relay list and stats](https://beaconcha.in/relays) -* [rated analytics on relays](https://www.rated.network/relays?network=mainnet) - -
- -### goerli relay list - -* [flashbots](https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@builder-relay-goerli.flashbots.net) -* [bloxroute](https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.max-profit.builder.goerli.blxrbdn.com) -* [eden](https://0xaa1488eae4b06a1fff840a2b6db167afc520758dc2c8af0dfb57037954df3431b747e2f900fe8805f05d635e9a29717b@relay-goerli.edennetwork.io) -* [blocknative](https://0x8f7b17a74569b7a57e9bdafd2e159380759f5dc3ccbd4bf600414147e8c4e1dc6ebada83c0139ac15850eb6c975e82d0@builder-relay-goerli.blocknative.com) -* [manifold]( https://0x8a72a5ec3e2909fff931c8b42c9e0e6c6e660ac48a98016777fc63a73316b3ffb5c622495106277f8dbcc17a06e92ca3@goerli-relay.securerpc.com/) - - -
- -### resources - -* [everything mev-boost](https://github.com/MEV-WAIFU-LABS/mev_toolkit/blob/main/flashbots/mev-boost/README.md) -* [fb relay api](https://flashbots.notion.site/Relay-API-Spec-5fb0819366954962bc02e81cb33840f5) -* [uptime monitor for relays](https://mev-relays.beaconstate.info/) -* [mev relay ofac watch](https://www.mevwatch.info/) -* [mev-boost relay data](https://mevboost.pics/) -* [SushiGuardRouterV01 (with Manifold relay)](https://snapshot.org/#/sushigov.eth/proposal/bafkreigjjhjx2j2b526d3poeg23w2xan4rcgnzvcxinsssv7n37lu5p7s4) -* [relayscan.io](https://www.relayscan.io/) - - -
- -##### on building a relay - -* [fork mev-boost relay](https://github.com/flashbots/mev-boost-relay) -* [blocknative dreamboat](https://github.com/blocknative/dreamboat) -* [join lido call for relays](https://research.lido.fi/t/lido-on-ethereum-call-for-relay-providers/2844/10) -* [add label to beaconcha.in](https://beaconcha.in/relays) -* [join fb boost relays tg](https://t.me/+E-HTvTDIsdI3MjM1) -* [understanding mev-boost liveness risk by hasu](https://writings.flashbots.net/writings/understanding-mev-boost-liveness-risks/) -* [keeping relays honest](https://notes.ethereum.org/@yoav/BJeOQ8rI5) - diff --git a/MEV_on_Polygon/README.md b/MEV_on_Polygon/README.md deleted file mode 100644 index 430fca1..0000000 --- a/MEV_on_Polygon/README.md +++ /dev/null @@ -1,13 +0,0 @@ -## MEV on Polygon - -### tl; dr - - -
- ---- - -### resources - -* [arbitrage smart contract for polygon](https://github.com/OnlyF0uR/Polygon-Arbitrage-Contract) -* [flashloan on polygon](https://github.com/yuichiroaoki/poly-flash) diff --git a/MEV_on_Solana/README.md b/MEV_on_Solana/README.md deleted file mode 100644 index 73ca532..0000000 --- a/MEV_on_Solana/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## šŸ mev on solana - -### tl; dr - - - -
- ---- - -### resources - -* [Jito.wtf](https://jito.wtf/) -* [MEV 2.0: the rise of MPSVs](https://www.recvc.com/mev-2-0-the-rise-of-mpsvs/) -* [Solana network statistics](https://jito.retool.com/embedded/public/7e37389a-c991-4fb3-a3cd-b387859c7da1) -* [MEV bots on more than $2 Million in less than an minute](https://twitter.com/oraprotocol/status/1539664843816333312?s=20&t=Hdo4irxrDiatM4LKA3FbhA) -* [Solana MEV Outlook](https://medium.com/chorus-one/analyzing-mev-instances-on-solana-part-3-6376bcf40b6b) -* [MEV-ARB-90-0322 on Misaka](https://github.com/0xMisaka/MEV-data-solana/blob/main/MEV-ARB-90-0322.ipynb0) diff --git a/MEV_projects/README.md b/MEV_projects/README.md new file mode 100644 index 0000000..723c63f --- /dev/null +++ b/MEV_projects/README.md @@ -0,0 +1,80 @@ +## projects and research + +
+ +### tl; dr + +
+ + +* public discussion around MEV started by [pmcgooohan](https://twitter.com/pmcgoohancrypto?lang=en) on [e/ethereum](https://www.reddit.com/r/ethereum/comments/2d84yv/miners_frontrunning/), and it was formalized by [phildaiann et. al](https://twitter.com/phildaian)'s paper [flash boys 2](https://arxiv.org/abs/1904.05234). [here are the main essays and papers from the last years](history.md). + +
+ +---- + +### what's the future of mev rewards? + +
+ +here are some ideas (and below are some of the projects working on specific problems and solutions): + +
+ +#### mev burning + +* instead of having to deal with certain centralized actors, the network would put in place mechanism to burn mev (inspired by the burn mechanism found within EIP-1559). +* targets the centralizing potential that mev can have on validators, but removing the economic incentives of mev for validators. +* in this [ethresear.ch](https://ethresear.ch/t/burning-mev-through-block-proposer-auctions/14029/11) discussion, domothy recommends implementing an auction for the "right to build a block" on the network (happening at the validator level). network’s slot times would change from 12 seconds to 16 seconds to allow for the period of bidding on block proposal rights. + +
+ +#### mev smoothing + +* in this [ethresear.ch](https://ethresear.ch/t/committee-driven-mev-smoothing/10408) and [this](https://notes.ethereum.org/cA3EzpNvRBStk1JFLzW8qg), francesco propose "Smoothing MEV means reducing the variance in the MEV that is captured by each validator, with the ultimate goal of getting the distribution of rewards for each validator to be as close as possible to uniform: a staker would then get a share of rewards proportional to their stake, just like with issuance." +* while smoothing is not available as an in-protocol ethereum, the general principle can be seen via smoothing liquid staking pools. rocketpool operates a [voluntary smoothing pool](https://docs.rocketpool.net/guides/node/fee-distrib-sp.html#initializing-the-fee-distributor) see also [eigenlayer discussions](https://twitter.com/sreeramkannan/status/1561736268005814273). [mev-share from flashbots](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_projects/flashbots) has also introduced a proposal for programmable provate orderflow that rewards users (through a matchmaking protocol between users and searchers). + +
+ +#### mev sharing + +* while MEV smoothing/burning focuses on the end of the MEV supply chain and interactions between block builders and validators, mev sharing is in the beginning of the supply chain, for example with block builders that provide rebates (e.g. wallet-boost from blocknative). + +
+ +#### + + +
+ +--- + +### mev-related projects + +
+ +* [espresso](espresso) +* [flashbots](flashbots) +* [manifold](manifold) +* [shutter](shutter) +* [dflow](dflow) +* [eden](eden) +* [jito](jito) +* [skip](skip) +* [cow](cow_protocol) + + +
+ +--- + +### resources + +
+ +* [rules and strategies of a protocol, by data always](https://dataalways.substack.com/p/rules-and-strategies-of-a-protocol) +* [quantification of mev sharing designs (ofas), by danning sui](https://docs.google.com/presentation/d/1_pKKkUr_D-OvR2Kah56B0C0LYdO6zMECftBA_q7bM2c/edit#slide=id.g21fe09f5970_0_325) +* [projects addressing private order flows primitives](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/private_order_flows/projects.md) +* [diamonds are forever, lvr is not, by mcmenamin et al.](https://arxiv.org/abs/2210.10601) +* [mev capturing amm, by josojo](https://ethresear.ch/t/mev-capturing-amm-mcamm/13336) +* [mev-protected cross-chain swaps, by cashmere](https://cashmerelabs.medium.com/cashmerelabs-testnet-1-0-2c11e23f36) diff --git a/MEV_projects/cow_protocol/README.md b/MEV_projects/cow_protocol/README.md new file mode 100644 index 0000000..e8caec1 --- /dev/null +++ b/MEV_projects/cow_protocol/README.md @@ -0,0 +1,32 @@ + +## [cow protocol](https://cow.fi/) + + +
+ +### tl; dr + +
+ +- cow swap is the first trading interface built on top of cow protocol. +- it's a meta dex aggregator allowing to buy and sell tokens using gasless orders that are settled p2p among users or into on-chain liquidity (while providing mev protection). +- [rpc mev block](https://mevblocker.io/#rpc) + +
+ +--- + +## resources + +
+ +* [anatomy of solver bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/anatomy_of_mev_bots/bots/cow-solvers.md) +* [cow protocol forum](https://forum.cow.fi/) +* [gnosis on cow protocol](https://docs.google.com/presentation/d/1vClubmyECHzYpT7-DzU6D45bc7iNpjF1NuiEblY-8ZQ/edit#slide=id.ge33f22559c_0_580) +* [dune boards for cow.fi and gnosis protocol](https://forum.cow.fi/t/cow-fi-analytics/369) +* [EIP-1271 for smart orders on cowswap](https://www.youtube.com/watch?v=6zj0_E8JWPQ) +* [useful cowswap resources](https://hackmd.io/@chenm/HJqjdkjvt) +* [yearn <> cowswap](https://medium.com/iearn/yearn-cow-swap-371b6d7cf3b3) +* [cow swap at mev.wtf 2022](https://docs.google.com/presentation/d/1vClubmyECHzYpT7-DzU6D45bc7iNpjF1NuiEblY-8ZQ/edit#slide=id.ge33f22559c_0_580) +* [examining the potential of frequent batch auctions in ethereum](https://www.youtube.com/watch?v=qSdE4LrPjG0) +* [designing an auction to process billions in volume for cow protocol, by xenophonlabs](https://mirror.xyz/xenophonlabs.eth/HcvesuQdywZ6Vg7EOrG0gl9E5V1PbLoMMVeCSYgRLNY) diff --git a/MEV_projects/dflow/README.md b/MEV_projects/dflow/README.md new file mode 100644 index 0000000..e8380f0 --- /dev/null +++ b/MEV_projects/dflow/README.md @@ -0,0 +1,21 @@ +## [dflow](https://twitter.com/DFlowProtocol) + +
+ +### tl; dr + +
+ +* cosmo app facilitating decentralized and transparent order flow auctions +* to create an order flow auction, a dex creates a listing on dflow that includes the amount of order flow that they are selling + price +* market makers can pay for this order flow to capitalize on any mev opportunities + +
+ +--- + +### resources + +
+ +* [dflow intro doc](https://t.co/cUEoH7rlkZ) diff --git a/MEV_projects/eden/README.md b/MEV_projects/eden/README.md new file mode 100644 index 0000000..dcf60ec --- /dev/null +++ b/MEV_projects/eden/README.md @@ -0,0 +1,22 @@ +## [eden network](https://twitter.com/EdenNetwork) + +
+ +### tl; dr + +
+ +* ethereum infrastructure consisting of 3 core products: + 1. rpc endpoint: users can add to their wallets to send txs to eden builders (frontrunning protection) + 2. eden relay: connects validators to their network of block builders + 3. eden bundles: connect searchers to their network of block builders + +
+ +--- + +### resources + +
+ +* [how to leverage eden network to trade with priority](https://medium.com/edennetwork/how-to-leverage-eden-network-to-trade-with-priority-1171851978c2) diff --git a/MEV_projects/espresso/README.md b/MEV_projects/espresso/README.md new file mode 100644 index 0000000..9dc3d77 --- /dev/null +++ b/MEV_projects/espresso/README.md @@ -0,0 +1,3 @@ +## espresso + +
diff --git a/MEV_projects/flashbots/README.md b/MEV_projects/flashbots/README.md new file mode 100644 index 0000000..5ea53bc --- /dev/null +++ b/MEV_projects/flashbots/README.md @@ -0,0 +1,55 @@ +## flashbots + +
+ +### tl;dr + +
+ +* **flashbots** is a research and development organization focused on mitigating the negative externalities of current MEV extraction techniques. +* after the release of MEV-geth (and later MEV-boost), much of the computation related to MEV was taken off-chain, by a side-relay that allows MEV searchers to communicate directly with nodes and other participants. This lead to a decrease in fee congestion pricing. +* however, MEV ā€œmarketplacesā€ like flashbots, are quite centralized, since the vast majority of blocks flow through it. + +
+ +##### bundles + +* bundle/transaction profitability is determined by: fee per gas used, priority fee, and direct validator payments. + + +
+ +---- + +### in this dir + +
+ + +* [mev-boost](mev-boost) +* [suave](suave) +* [scripts](scripts) +* [tools](tools) + + + + +
+ +--- + +### resources + +
+ +- [how to use flashbots](https://cryptomarketpool.com/how-to-use-flashbots/) +- [bundle pricing docs](https://docs.flashbots.net/flashbots-auction/searchers/advanced/bundle-pricing) +- [flashbots bundler explorer](https://flashbots-explorer.marto.lol/) +- [flashbots: frontrunning the mev crisis by thegostep](https://ethresear.ch/t/flashbots-frontrunning-the-mev-crisis/8251) +- [order flows kingmaker of block builders by noxx](https://noxx.substack.com/p/order-flows-kingmaker-of-the-block) +- [data analysis of Flashbots MEV](https://github.com/ivanmolto/mev-flashbots-unleashed) +- [flashbots' transparency board](https://transparency.flashbots.net/) +- [flashbots' research topics](https://github.com/flashbots/mev-research) +- [mev economics](https://www.youtube.com/playlist?list=PLXzKMXK2aHh7bW0j2dhpnLNiIJIMnPgsD) + + diff --git a/flashbots/mev-boost/README.md b/MEV_projects/flashbots/mev-boost/README.md similarity index 69% rename from flashbots/mev-boost/README.md rename to MEV_projects/flashbots/mev-boost/README.md index cd329bb..ffcd2f5 100644 --- a/flashbots/mev-boost/README.md +++ b/MEV_projects/flashbots/mev-boost/README.md @@ -1,4 +1,4 @@ -## šŸ—”šŸ©ø mev-boost stuff +## mev-boost
@@ -7,16 +7,15 @@
* [mev-boost](https://github.com/flashbots/mev-boost#installing) is a middleware run by validators to democratize the block-building market with a implementation of [proposer-builder-separation (PBS)](https://ethresear.ch/t/proposer-block-builder-separation-friendly-fee-market-designs/9725) for proof-of-stake Ethereum. -* PBS / mev-boost smooths out the variance of validator revenue to a degree, by giving solo stakers the same chance of getting as much MEV for the blocks they propose as a large staking pool, but it doesn’t fix MEV driven validator centralisation. * pbs was initially proposed by Ethereum researchers as a response to the risk that MEV poses to decentralization of consensus networks. -* [Article: mev-boost, relays, self-sovereignty](https://mirror.xyz/mevwaifu.eth/Xo_5rIpRQpFOC__kYfjLJVOFwlSZH2n8tUnHoXo6VyI) +* [mev-boost+](https://hackmd.io/@layr/SkBRqvdC5) is an iteration that uses [eigen layer](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_and_trading/staking/EigenLayer.md), a meta-slashing protocol on ethereum, to return agency to block proposers (allowing them to partition an execution block).
-Screen Shot 2022-09-18 at 2 57 20 PM + @@ -24,7 +23,7 @@
-Screen Shot 2022-12-19 at 11 45 17 PM +
@@ -36,8 +35,9 @@ ### resources +
- +* [mev-boost, relays, self-sovereignty](https://mirror.xyz/mevwaifu.eth/Xo_5rIpRQpFOC__kYfjLJVOFwlSZH2n8tUnHoXo6VyI) * [mev-boost on a goerli validator](https://mirror.xyz/steinkirch.eth/Xo_5rIpRQpFOC__kYfjLJVOFwlSZH2n8tUnHoXo6VyI) * [running mev-boost-relay at scale](https://www.notion.so/Running-mev-boost-relay-at-scale-4040ccd5186c425d9a860cbb29bbfe09) * [install mev-boost in ubuntu](https://github.com/metanull-operator/eth2-ubuntu/blob/master/v2/mev-boost.md) @@ -50,5 +50,5 @@ * [ethereum specs for block builder](https://github.com/ethereum/builder-specs) * [list of mev-boost payout addresses](https://gist.github.com/metachris/a4d10ff59cad5ffe3cf0f2c6e91fc0bc) * [merge ready flashbots architecture](https://hackmd.io/@manifold/S1jRmGIPF) - +* [mevboost.org](https://www.mevboost.org/) diff --git a/MEV_projects/flashbots/scripts/README.md b/MEV_projects/flashbots/scripts/README.md new file mode 100644 index 0000000..a749266 --- /dev/null +++ b/MEV_projects/flashbots/scripts/README.md @@ -0,0 +1,5 @@ +## scripts + +
+ +* [flashbots bundle](https://github.com/bt3gl-labs/Blockchain-DeFi-and-MEV/blob/main/MEV/scripts/flashbots-bundle.py) (or full instructions, see [this post](https://lilithsecurity.substack.com/p/-mev-wednesdays-intro-to-flashbots)). diff --git a/flashbots/scripts/flashbots-bundle.py b/MEV_projects/flashbots/scripts/flashbots-bundle.py similarity index 97% rename from flashbots/scripts/flashbots-bundle.py rename to MEV_projects/flashbots/scripts/flashbots-bundle.py index ffca357..632d22b 100644 --- a/flashbots/scripts/flashbots-bundle.py +++ b/MEV_projects/flashbots/scripts/flashbots-bundle.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # This script sends a bundle of two transactions which transfer ETH into a random account. -# For full instructions: https://lilithsecurity.substack.com/p/-mev-wednesdays-intro-to-flashbots +# Full instructions: https://mirror.xyz/steinkirch.eth/rGyGGoOLek_pCoJVlSFSjjFL-b5_Mw_P5hC3giwUCtc import os diff --git a/MEV_projects/flashbots/suave/README.md b/MEV_projects/flashbots/suave/README.md new file mode 100644 index 0000000..6c33fcf --- /dev/null +++ b/MEV_projects/flashbots/suave/README.md @@ -0,0 +1,25 @@ +## suave + +
+ +### tl; dr + +
+ +* the thesis is that private order flow and cross-domain MEV may be the primary risk factors for centralization in the supply chain +* suave will be an app chain to serve as a plug-and-play mempool and decentralized block builder for any blockchain +* suave is developing three components: + * universal preference environment: a chain and mempool aggregator + * optimal execution environment: a network of executors to provide the best transaction execution + * a decentralized block building network + +
+ +--- + +### resources + +
+ +* [first article designing suave](https://writings.flashbots.net/the-future-of-mev-is-suave) +* [suave economic model](https://collective.flashbots.net/t/suave-economic-security-models/1070) diff --git a/MEV_projects/flashbots/tools/README.md b/MEV_projects/flashbots/tools/README.md new file mode 100644 index 0000000..2274056 --- /dev/null +++ b/MEV_projects/flashbots/tools/README.md @@ -0,0 +1,7 @@ +## tools + +
+ + +* [mev-inspect-py](https://github.com/flashbots/mev-inspect-py) +* [mev bundle generator](https://github.com/Alcibiades-Capital/mev_bundle_generator). diff --git a/MEV_projects/history.md b/MEV_projects/history.md new file mode 100644 index 0000000..b4590f7 --- /dev/null +++ b/MEV_projects/history.md @@ -0,0 +1,69 @@ +### canonical readings + +
+ + +#### 2023 + +- [ā­ļøā­ā­ā­ illuminating ethereum's order flow landscape, by angela lu](https://writings.flashbots.net/illuminate-the-order-flow) + + +#### 2022 + + +- [ā­ļøā­ā­ā­ towards a theory of mev I, by diamandis et al.](https://people.eecs.berkeley.edu/~ksk/files/MEV_CFMM.pdf) + + +#### 2021 + +- [⭐⭐⭐ mev and me, by paradigm](https://research.paradigm.xyz/MEV) +- [⭐⭐⭐ return to the dark forest, by rekt](https://rekt.news/return-to-the-dark-forest/) +- [⭐⭐⭐ hiding in plain sight, by samczsun](https://samczsun.com/hiding-in-plain-sight/) +- [⭐⭐⭐⭐ we live in a mempool, by tom schmidt](https://medium.com/dragonfly-research/we-live-in-a-mempool-backrunning-the-mev-crisis-a4ea0b493b05) +- [ā­ļøā­ā­ how to light up the dark forest, by robert miller](https://writings.flashbots.net/writings/the-anatomy-of-an-inspector/) +- [ā­ļøā­ the 0 to 1 guide to mev, by blockchain at berkeley](https://calblockchain.mirror.xyz/c56CHOu-Wow_50qPp2Wlg0rhUvdz1HLbGSUWlB_KX9o) +- [ā­ļøā­ how to build an ethereum mining pool, by dragonfly](https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a) +- [ā­ļøā­ā­ļø how i learned to stop worrying and love mev, by sreeni](https://medium.com/dragonfly-research/dr-reorg-or-how-i-learned-to-stop-worrying-and-love-mev-2ee72b428d1d) +- [ā­ļøā­ļøā­ļø quantifying blockchain extractable value: how dark is the forest?, by kaihua qin et al.](https://arxiv.org/pdf/2101.05511.pdf) +- [ā­ļøā­ļøā­ļø the enemy of your enemy is not your friend, by kobayashi](https://fiona.mirror.xyz/QXdCOAggA5g_j5R_JpO-V5LqK89EbimnYIV6c2rOsT0) +- [ā­ļøā­ļøā­ļøā­ļø foundations of blockchains and mev, by tim roughgarden](https://timroughgarden.github.io/fob21/) + +#### 2020 + +- [ā­ļøā­ā­ā­ā­ escaping the dark forest, by samczsun](https://samczsun.com/escaping-the-dark-forest/) +- [ā­ļøā­ā­ ethereum is a dark forest, by paradigm](https://www.paradigm.xyz/2020/08/ethereum-is-a-dark-forest) +- [ā­ļøā­ļøā­ļø tricking frontrunners into being transaction relayers, by sankar4033](https://ethresear.ch/t/surrogeth-tricking-frontrunners-into-being-transaction-relayers/6937/1) + + +#### 2019 + +- [⭐⭐⭐⭐ flash boys 2.0, by p. daian et al.](https://arxiv.org/pdf/1904.05234.pdf) +- [ā­ā­ļøā­ļø transparent dishonesty: front-running attacks on blockchain, by shayan eskandari et al.](https://arxiv.org/pdf/1902.05164.pdf) + + + +#### 2017 + +- [ā­ļøā­ļøā­ļøā­ļø implementing ethereum trading front-runs on the bancor exchange, by ivan bogatyy](https://hackernoon.com/front-running-bancor-in-150-lines-of-python-with-ethereum-api-d5e2bfd0d798) + + +
+ +--- + + +### [bonus] š•„š•™š•– š•žš•’š•œš•– š• š•— š•’ š•”š•Ŗš•”š•™š•–š•£š•”š•¦š•Ÿš•œ + +
+ +* [ā­ļøā­ļøā­ļø teal organizations wiki](https://reinventingorganizationswiki.com/) +* [ā­ļøā­ļøā­ļøā­ļøā­ļø the hacker manifest, by the mentor](http://phrack.org/issues/7/3.html) +* [ā­ļøā­ļøā­ļøā­ļøā­ļø bitcoin whitepaper, by satoshi nakamoto](https://bitcoin.org/bitcoin.pdf) +* [ā­ļøā­ļøā­ļøā­ļø the cypherpunk manifest, by eric hughes](https://activism.net/cypherpunk/manifesto.html) +* [ā­ļøā­ļøā­ļø the meaning of decentralization, by vitalik](https://medium.com/@VitalikButerin/the-meaning-of-decentralization-a0c92b76a274) +* [ā­ļøā­ļøā­ļøā­ļø the crypto anarchist manifest, by timothy c. may](https://nakamotoinstitute.org/crypto-anarchist-manifesto/) +* [ā­ļøā­ļøā­ļøā­ļøā­ļø a graduate course in applied cryptography, by dan boneh](http://toc.cryptobook.us/) + +
+
+ diff --git a/MEV_projects/jito/README.md b/MEV_projects/jito/README.md new file mode 100644 index 0000000..d7990bc --- /dev/null +++ b/MEV_projects/jito/README.md @@ -0,0 +1,21 @@ +## [jito labs](https://twitter.com/jito_labs) + +
+ +### tl; dr + +
+ +* solana liquid staking service that distributes mev rewards to users +* $SOL holders can swap to JitoSol, enabling constant liquidity and mev rewards + + +
+ +--- + +### resources + +
+ +* [jito labs intro docs](https://t.co/nM9SQbEP2e) diff --git a/MEV_projects/manifold/README.md b/MEV_projects/manifold/README.md new file mode 100644 index 0000000..2fa03a1 --- /dev/null +++ b/MEV_projects/manifold/README.md @@ -0,0 +1,21 @@ +## [manifold](https://twitter.com/foldfinance) + +
+ +### tl; dr + +
+ +* manifold works direct with order flow producers to split profits between manifold and the protocol +* big hyped integration with sushiswap + + +
+ +--- + +### resources + +
+ +* [manifold introduces mevETH](https://twitter.com/foldfinance/status/1643244617284870144) diff --git a/MEV_projects/shutter/README.md b/MEV_projects/shutter/README.md new file mode 100644 index 0000000..e489115 --- /dev/null +++ b/MEV_projects/shutter/README.md @@ -0,0 +1,23 @@ +## [shutter dao](https://twitter.com/project_shutter) + +
+ +### tl; dr + +
+ +* shutter plans to encrypt txs using threshold cryptography on ethereum and l2s. +* shutter dao hires nodes called keypers, which generate cryptographic keys with which users encrypt their txs +* keypers act as a set of nodes that encrypt and decrypt txs in a decentralized manner. txs are fully encrypted until the order of the txs in a block is finalized. + + + +
+ +--- + +### resources + +
+ +* [shutter docs](https://t.co/g6QILKlpRH) diff --git a/MEV_projects/skip/README.md b/MEV_projects/skip/README.md new file mode 100644 index 0000000..4776937 --- /dev/null +++ b/MEV_projects/skip/README.md @@ -0,0 +1,23 @@ +## [skip](https://twitter.com/SkipProtocol) + +
+ +### tl; dr + +
+ +* on cosmos, txs are processed "first come first server", which prevents frontrunning and sandwich attacks but incentivizes searchers to spam the network when profitable mev opportunies are found. +* skip is creating a marketplace where searchers can submit bundles for quicker execution at the cost of a fee (which is redistributed to validators and user). + + +
+ +--- + +### resources + +
+ + +* [skip protocol docs](https://twitter.com/maria_defiyield/status/1595060020601028609/photo/1) +* [mev on osmosis](https://twitter.com/SkipProtocol/status/1631399189920768005) diff --git a/MEV_searchers/README.md b/MEV_searchers/README.md new file mode 100644 index 0000000..b22a987 --- /dev/null +++ b/MEV_searchers/README.md @@ -0,0 +1,114 @@ +## anatomy of mev bots + +
+ +#### bots + +* **[artermis framework](https://www.paradigm.xyz/2023/05/artemis)** +* **[bot racer](https://github.com/DadeKuma/bot-racer)** +* **[arbers](bots/arbers.md)** +* **[liquidators](bots/liquidators.md)** +* **[frontrunners](bots/frontrunners.md)** +* **[backrunners](bots/backrunners.md)** +* **[longtailors](bots/longtailors.md)** +* **[sandwichors](bots/sandwichors.md)** +* **[snipers](bots/snipers.md)** +* **[tradors](bots/tradors.md)** +* **[cow solvers](bots/cow-solvers.md)** +* **[statistical arbers](bots/stat-arbers.md)** + +
+ +#### everything else + + +* **[searchers of nottingham, by dragonfly](https://nottingham.dragonfly.xyz/)** +* **[order flows](order_flows)** +* **[101 bots (get started)](bots/101.md)** +* **[data and analytics](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_searchers/data_and_analytics)** +* **[bot profits by year](profits)** +* **[disassemblers](disassemblers)** +* **[mempool monitoring](mempool_monitoring)** +* **[pvp battles and stories](pvp_war)** +* **[general code resources](code_resources)** +* **[tx and signature explorers](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_searchers/tx_and_signature_explorers)** + + + +
+ +--- + +### links + +
+ +#### readings + + +* **[the daily ape on mev](https://thedailyape.notion.site/MEV-8713cb4c2df24f8483a02135d657a221)** +* **[mev.day amsterdam 2022](https://mevday.org/)** +* **[mev research, by eigenphi](https://www.eigenphi.io/mev/research)** +* **[mev wiki, by automata network](https://www.mev.wiki/)** +* **[mev extraction strategies, by r. miller](https://docs.google.com/presentation/d/1YVFLnh_MnDtDDQjucW-UKxLD28iGlyi_Pj1ri_hGqRs/edit#slide=id.g124f588a727_0_51)** +** **[mev auction, by the ethereum foundation](https://ethresear.ch/t/mev-auction-auctioning-transaction-ordering-rights-as-a-solution-to-miner-extractable-value/6788)** +* **[cryptocurrency historical data snapshot](https://coinmarketcap.com/historical/)** +* **[mempool privacy research list, by a. obadia](https://collective.flashbots.net/t/bookmarks-relevant-for-mempool-privacy-researchers/1091)** +* **[etherscan mev bot accounts](https://etherscan.io/accounts/label/mev-bot)** +* **[build a mev bot by degatchi](https://www.degatchi.com/articles/how-to-build-a-mev-bot)** +* **[list of known bots, by mev corpus](https://github.com/manifoldfinance/mev-corpus/blob/master/packages/known-bots/lib/known-bots.js)** +* **[running a keeper with rook.fi](https://docs.rook.fi/reference/integrate/run-a-keeper)** +* **[running a solver with cowswap](https://mirror.xyz/steinkirch.eth/s_RwnRgJvK_6fLYPyav7lFT3Zs4W4ZvYwp-AM9EbuhQ)** +* **[tenderly rpc request builder](https://dashboard.tenderly.co/json-rpc-request-builder)** +* **[mev as an inner experience by nathan worsley](https://www.youtube.com/watch?v=9iHlyaRsgYI)** +* **[mev market overview and performance, by eigenphi](https://beta.eigenphi.io/)** + +
+ +#### useful + + +* **[dapp.tools](https://dapp.tools/)** +* **[back run me](https://backrunme.com/swap)** +* **[revoke.cash](https://revoke.cash/)** +* **[mev templates](https://github.com/degatchi/mev-template-rs)** +* **[eth detective](https://www.ethtective.com/address/)** +* **[eth converter](https://eth-converter.com/)** +* **[calldata decoder](https://tools.deth.net/calldata-decoder)** +* **[flashbots bot demo](https://github.com/0xblocks/flashbots-demo)** +* **[ankr rpc endpoints](https://www.ankr.com/rpc/)** +* **[searcher sponsored tx](https://github.com/flashbots/searcher-sponsored-tx)** +* **[contracts diff checker](https://etherscan.io/contractdiffchecker)** +* **[token security detector](https://gopluslabs.io/token-security/)** +* **[ultrasound money dashboard](https://ultrasound.money/)** +* **[smart contract allowance checker](https://app.unrekt.net/)** +* **[whatsabi: guess an abi for ethereum contracts](https://github.com/shazow/whatsabi)** +* **[source of deployed ethereum contracts in vscode](https://github.com/dethcrypto/dethcode)** + +
+ +#### gas trackers + + +* **[gastrology](https://dethgasstation.eth.link/)** +* **[gas price io](https://www.gasprice.io/)** +* **[eth gas alert](https://ethgasalerts.xyz/)** +* **[nansei gas tracker](https://pro.nansen.ai/gas-tracker)** +* **[gas fee prediction](https://www.blocknative.com/gas-estimator)** +* **[ethereum gas tracker](https://www.useweb3.xyz/gas)** + +
+ +#### news and alerts + + +* **[highgwei bot](https://twitter.com/HighGwei)** +* **[eigenphi bot](https://twitter.com/EigenPhi_Alert)** +* **[mevwatch bot](https://twitter.com/mevwatchbot)** +* **[mevboost bot](https://twitter.com/MevBoostBot)** +* **[mevrefund bot](https://twitter.com/MevRefund)** +* **[eigenphi mirror](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34)** +* **[mev proposer bot](https://twitter.com/mevproposerbot)** +* **[flashbots discourse](https://collective.flashbots.net/)** + + diff --git a/anatomy_of_mev_bots/bots/arbers.md b/MEV_searchers/bots/arbers.md similarity index 62% rename from anatomy_of_mev_bots/bots/arbers.md rename to MEV_searchers/bots/arbers.md index fcf908c..c182700 100644 --- a/anatomy_of_mev_bots/bots/arbers.md +++ b/MEV_searchers/bots/arbers.md @@ -1,7 +1,22 @@ -### arbers +## arbers +
+ +### code + +
* [amm arbitrageur](https://github.com/paco0x/amm-arbitrageur) * [flashbot's simple arb](https://github.com/flashbots/simple-arbitrage) * [arb mev bot](https://github.com/scapula07/arbitrage-mev-bot) * [polygon arb bot](https://github.com/OnlyF0uR/Polygon-Arbitrage-Bot) + +
+ +--- + +### resources + +
+ +* [arb strategies](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/arbitrage) diff --git a/MEV_searchers/bots/backrunners.md b/MEV_searchers/bots/backrunners.md new file mode 100644 index 0000000..236650e --- /dev/null +++ b/MEV_searchers/bots/backrunners.md @@ -0,0 +1,16 @@ +### backrunners + +
+ +* [synthetix bot](https://github.com/bertmiller/sMEV) +* [0xbad](https://rekt.news/ripmevbot/) + +
+ +--- + +### resources + +
+ +* [backrunning strategies](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/backrunning) diff --git a/MEV_searchers/bots/cow-solvers.md b/MEV_searchers/bots/cow-solvers.md new file mode 100644 index 0000000..0c419c0 --- /dev/null +++ b/MEV_searchers/bots/cow-solvers.md @@ -0,0 +1,24 @@ +### cow solvers + +
+ +### code + +
+ +* [cow solver template](https://github.com/cowprotocol/solver-template-py) +* [cowsol-py](https://github.com/go-outside-labs/searcher-cowswap-py) + + + +
+ +--- + +### resources + +
+ +* [cowsol, an arb solver for cow protocol](https://mirror.xyz/mevwaifu.eth/s_RwnRgJvK_6fLYPyav7lFT3Zs4W4ZvYwp-AM9EbuhQ) +* [yearn cow solver](https://medium.com/iearn/yearn-cow-swap-371b6d7cf3b3) +* [hack tx by a solver](https://etherscan.io/tx/0x92f906bce94bab417cccc87ae046448d7fb8c2c0350b7ed911545577acb3bfc1) diff --git a/MEV_searchers/bots/frontrunners.md b/MEV_searchers/bots/frontrunners.md new file mode 100644 index 0000000..232d5ec --- /dev/null +++ b/MEV_searchers/bots/frontrunners.md @@ -0,0 +1,18 @@ +### frontrunners + +
+ + +* [cake sniper](https://github.com/Supercycled/cake_sniper) + + +
+ + +---- + +### resources + +
+ +* [frontrunning strategies](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/frontrunning) diff --git a/MEV_searchers/bots/liquidators.md b/MEV_searchers/bots/liquidators.md new file mode 100644 index 0000000..70b5c43 --- /dev/null +++ b/MEV_searchers/bots/liquidators.md @@ -0,0 +1,53 @@ +## liquidators + +
+ +### aave + + +* [liquidation bot for aave v3](https://github.com/massun-onibakuchi/grim-reaper) +* [liquidation aave protocol](https://github.com/ialberquilla/aave-liquidation) + + + +
+ +### compound + +
+ +* [fash swap liquidator for compound.finance](https://github.com/haydenshively/New-Bedford) + + +
+ +### mango market + +
+ +* [mango market liquidator](https://github.com/blockworks-foundation/liquidator-v3) + + +
+ +### rari market + +
+ +* [fuse liquidator](https://github.com/Rari-Capital/fuse-liquidator-bot) + +
+ +### liquity + +
+ +* [liquity bot](https://github.com/liquity/liqbot) + +
+ +--- + +### resources + +* [liquidation strategies](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/liquidations) diff --git a/MEV_searchers/bots/longtailors.md b/MEV_searchers/bots/longtailors.md new file mode 100644 index 0000000..c3e9ee1 --- /dev/null +++ b/MEV_searchers/bots/longtailors.md @@ -0,0 +1,26 @@ +## longtailors + +
+ +### source code for bots + +
+ + +* [ape bot](https://github.com/duckdegen/apebot) +* [binance alpha bot](https://github.com/duckdegen/apebot) +* [globinmode longtail nft](https://github.com/Anish-Agnihotri/goblinmode) + +
+ +### resources + +
+ +* [longtail strategies](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/longtails) +* [rarity.tools](https://rarity.tools/) +* [thread on crypto punks](https://twitter.com/bertcmiller/status/1482086447775580161) +* [arkham intelligence](https://context.app/) +* [dexscreener](https://dexscreener.com/) +* [token terminal](https://tokenterminal.com/terminal) +* [nansen]() diff --git a/MEV_searchers/bots/sandwichors.md b/MEV_searchers/bots/sandwichors.md new file mode 100644 index 0000000..874f279 --- /dev/null +++ b/MEV_searchers/bots/sandwichors.md @@ -0,0 +1,17 @@ +### sandwichors + +
+ + +* [optimal sandwich](https://github.com/mevcheb/optimal-sandwich) +* [subway](https://github.com/libevm/subway) + +
+ +--- + +### resources + +
+ +* [sandwich strategies](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/sandwich) diff --git a/MEV_searchers/bots/snipers.md b/MEV_searchers/bots/snipers.md new file mode 100644 index 0000000..2a603af --- /dev/null +++ b/MEV_searchers/bots/snipers.md @@ -0,0 +1,18 @@ +### snipers + +
+ +* [limit sniper, by cryptognome](https://github.com/CryptoGnome/Limit-Sniper) +* [pool-sniper, by anish-agnihotri](https://github.com/Anish-Agnihotri/pool-sniper) +* [cake-sniper, by sypercycled](https://github.com/Supercycled/cake_sniper) +* [sniper-bit, by forza-panino](https://github.com/forza-panino/Sniper-Bot) + +
+ +--- + +### resources + +
+ +* [snipping strategies](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/sniping) diff --git a/MEV_searchers/bots/stat-arbers.md b/MEV_searchers/bots/stat-arbers.md new file mode 100644 index 0000000..c9943cb --- /dev/null +++ b/MEV_searchers/bots/stat-arbers.md @@ -0,0 +1,23 @@ +## statistical arbers + +
+ +### tl; dr + +
+ +* search for edges through mathematically ranking assets/trades risk. in tradefi, it's often called "pair trading". +* for example, arbs between different chains or markets (e.g. ethereum and binance). for instance, if the cex price is greater than the price on-chain, stat arbs can buy on the dex and hedge on the cex. the problem is settlement mismatch: the longer the time period between blocks, the longer tx remains, and the longer it can go without being fully hedged (decreasing combined realized mev). + + + +
+ +--- + +### resources + +
+ +* [statistical strategies](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/statistical) +* [cointegrator bots](https://github.com/go-outside-labs/blockchain-science-py) diff --git a/MEV_searchers/bots/tradors.md b/MEV_searchers/bots/tradors.md new file mode 100644 index 0000000..30a03a1 --- /dev/null +++ b/MEV_searchers/bots/tradors.md @@ -0,0 +1,25 @@ +## tradors + +
+ +#### tl, dr + +
+ +* algorithmic trading strategies can be deployed as autonomous agents running on smart contracts on decentralised exchanges. +* cross exchange arbitrage is closer to the tradifi forex arbitrage strategies. +* it involves making simultaneous buy and sell orders of the same asset across different exchanges both centralized and decentralized. + +
+ +--- + +#### resources + +
+ + +* [statstical strategies](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/stat_arbs) +* [hummingbot trading bots](https://hummingbot.org/) +* [coinbot: CEXs cointegration bot](https://github.com/go-outside-labs/blockchain-science-py/tree/main/cointegration-bots) +* [contract of a searcher using hybrid arb strategies](https://etherscan.io/address/0xa57bd00134b2850b2a1c55860c9e9ea100fdd6cf) diff --git a/MEV_searchers/code_resources/README.md b/MEV_searchers/code_resources/README.md new file mode 100644 index 0000000..d2868cb --- /dev/null +++ b/MEV_searchers/code_resources/README.md @@ -0,0 +1,32 @@ +## general resources for searcher operators + +
+ +### in this dir + +
+ +* [proxies](proxies) +* [gas optimization](gas_optimization) + +
+ + +### resources + +
+ +* [vanity address generator for CREATE2 addresses](https://github.com/johguse/ERADICATE2) +* [metamorphic: a factory contract for redeployable](https://github.com/0age/metamorphic) +* [bundle generator](https://github.com/Alcibiades-Capital/mev_bundle_generator) +* [flashbots mev opportunties](https://github.com/flashbots/mev-job-board) +* [symbolic searcher](https://github.com/bzhang42/symbolic-searcher) +* [FairTraDEX](https://github.com/MEVProof/Contracts) +* [searcher-sponsored-tx](https://github.com/flashbots/searcher-sponsored-tx) +* [searcher-minter](https://github.com/flashbots/searcher-minter) +* [mev bot in q using kdb+](https://github.com/sambacha/q-evm) +* [resources for gas optimization](https://github.com/go-outside-labs/web3-solidity/blob/main/saving_gas/README.md) +* [contract and typescript library for static multi-calls](https://github.com/indexed-finance/multicall) +* [ggregate multiple constant function call results into one](https://github.com/makerdao/multicall) +* [`trace_call` RPC method](https://www.quicknode.com/docs/ethereum/trace_call) + diff --git a/MEV_searchers/code_resources/gas_optimization/README.md b/MEV_searchers/code_resources/gas_optimization/README.md new file mode 100644 index 0000000..1b67379 --- /dev/null +++ b/MEV_searchers/code_resources/gas_optimization/README.md @@ -0,0 +1,14 @@ +## resources for gas optimization + +
+ +* **[tricks to save gas](https://github.com/go-outside-labs/web3-toolkit-sol/tree/main/advanced_knowledge/saving_gas)** +* **[gas optimization by code4arena](https://code4rena.com/reports/2022-05-opensea-seaport/#gas-optimizations)** +* **[truffle contract size](https://github.com/IoBuilders/truffle-contract-size)** +* **[foundry book on gas](https://book.getfoundry.sh/forge/gas-reports)** +* **[solidity gas optimizations](https://mirror.xyz/haruxe.eth/DW5verFv8KsYOBC0SxqWORYry17kPdeS94JqOVkgxAA)** +* **[hardhat on gas optimization](https://medium.com/@thelasthash/%EF%B8%8F-gas-optimization-with-hardhat-1e553eaea311)** +* **[resources for gas optimization](https://github.com/kadenzipfel/gas-optimizations)** +* **[awesome solidity gas optimization](https://github.com/iskdrews/awesome-solidity-gas-optimization)** +* **[how gas optimization can streamline smart contracts](https://medium.com/@ayomilk1/maximizing-efficiency-how-gas-optimization-can-streamline-your-smart-contracts-4bafcc6bf321)** +* **[math, solidity & gas optimizations | part 1/3](https://officercia.mirror.xyz/vtVVxbV35ETiBGxm-IpcFPcsK2_ZkL7vgiiGUkeSsP0)** diff --git a/MEV_searchers/code_resources/proxies/README.md b/MEV_searchers/code_resources/proxies/README.md new file mode 100644 index 0000000..24e9977 --- /dev/null +++ b/MEV_searchers/code_resources/proxies/README.md @@ -0,0 +1,19 @@ +## proxies + +
+ +### tl; dr + +
+ + +
+ +--- + +### resources + +
+ +* [thread on renit](https://twitter.com/libevm/status/1468390867996086275) +* [proxy pattern](https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies) diff --git a/MEV_searchers/cross_domain_mev/README.md b/MEV_searchers/cross_domain_mev/README.md new file mode 100644 index 0000000..1deb071 --- /dev/null +++ b/MEV_searchers/cross_domain_mev/README.md @@ -0,0 +1,35 @@ +## cross-domain mev + +
+ +### tl; dr + +
+ + +
+ +--- + +### resources + + +* the cross-domain thesis series, by [maven11 research](https://maven11.mirror.xyz/): + * [setting the stage](https://maven11.mirror.xyz/e2pIdHzlaBi6m5GhsRGK0g5DyjgCVuU4lE614XmES5s) + * [storage proofs, computation, and bloat](https://maven11.mirror.xyz/3NqfzBemyvI9a0fhun7flOc20oq5XlXzOqphvKk5pxs) + * [ordering](https://maven11.mirror.xyz/4EWfWgqJGNQufJOXe66aqmYTttu9r0o3sArMLZVbNyo) +* [westerngate.xyz](https://westerngate.xyz/) +* [unity is strength, by obadia et al](https://arxiv.org/pdf/2112.01472.pdf) +* [studying cross-domain MEV, by alex obadia](https://www.youtube.com/watch?v=dv5-Lzntv5M) +* [amm and loss-versus-rebalancing](https://arxiv.org/abs/2208.06046) +* [discussion on multiblock mev](https://mirror.xyz/0x7c855e1bF411Ab5975235bC8C74E032615073044/j8bEbeLIv1Ih6naZod2KLyAPIrdvw45nOL7Qu22QqLk) +* [why cross-chain auctions hard, by t. chitra and k. kulkarni](https://gauntlet.network/talks/2023/Denver/Crosschain) +* [cross-domain mev, by eigenlayer](https://forum.eigenlayer.xyz/t/cross-domain-mev-with-eigenlayer/348) + + +
+ + +#### L2 rollups + +* [analyzing the extraction of MEV across L2 rollups, by torres et al.](https://arxiv.org/pdf/2405.00138) diff --git a/MEV_searchers/data_and_analytics/README.md b/MEV_searchers/data_and_analytics/README.md new file mode 100644 index 0000000..e835080 --- /dev/null +++ b/MEV_searchers/data_and_analytics/README.md @@ -0,0 +1,42 @@ +## data && analytics + +
+ +* [parsec.finance](https://parsec.finance/) +* [token terminal](https://tokenterminal.com/terminal) +* [nansen analytics](https://www.nansen.ai/) +* [flashloans, by blocksec](https://tools.blocksec.com/flashloan/eth) +* [metrika's mev dashboards](https://app.metrika.co/ethereum/dashboard/mev/relay-economic?tr=1d) +* [etherscan data on flashbots](https://etherscan.io/blocks/label/flashbots) +* [mev live-stream, by eigenphi](https://eigenphi.io/) +* [mev dashboard, by flashbots](https://explore.flashbots.net/) +* [mev data corpus, by manifold](https://github.com/manifoldfinance/mev-corpus) +* [ethereum datafarm, by nerolation](https://github.com/Nerolation/ethereum-datafarm) +* [cross-domain arbitrage tracker, by odos](https://www.odos.xyz/arbitrage) +* [mev outlook 2003, by eigeinphi](https://eigenphi.substack.com/p/mev-outlook-2023) + + +
+ +--- + +### dune boards + +
+ +* [solana mev data](https://dune.com/chorus_one_research/solana-mev-data) +* [ethereum tx reverts](https://dune.com/kroeger0x/ethereum-transaction-reverts) +* [mev flashbots unleashed](https://dune.com/ivanmolto/mev-flashbots-unleashed) +* [dune board for gas prices](https://dune.com/kroeger0x/gas-prices) +* [flashbots data for extracted good mev](https://dune.com/chorus_one/ethereum-mev-data) +* [sleuthing hashed function and event signatures](https://dune.com/agaperste/event-and-function-signature-sleuthing?) +* [just-in-time liquidity sandwich large trades in uniswap v3](https://dune.com/ChainsightAnalytics/Uniswap-v3-Just-in-Time-(JIT)-Liquidity-MEV) +* [all uniswap v3 mev activity](https://dune.com/alexth/uniswap-v3-mev-activity) and [all uniswap v2 mev activity](https://dune.com/alexth/uniswap-v2-mev) +* [mev-boost blocks w/ last tx w/ transfer from fee receiver to validator address](https://dune.com/ChainsightAnalytics/mev-after-ethereum-merge) +* [zeromev api](https://data.zeromev.org/docs/) + + + + + +
diff --git a/MEV_searchers/disassemblers/README.md b/MEV_searchers/disassemblers/README.md new file mode 100644 index 0000000..3c40109 --- /dev/null +++ b/MEV_searchers/disassemblers/README.md @@ -0,0 +1,13 @@ +## disassemblers + +
+ +### tl; dr + +
+ +
+ +--- + +### links diff --git a/MEV_searchers/latency/README.md b/MEV_searchers/latency/README.md new file mode 100644 index 0000000..5201a9c --- /dev/null +++ b/MEV_searchers/latency/README.md @@ -0,0 +1,51 @@ +## latency optimization + +
+ +### tl; dr + +
+ + +#### builders + +* builders might delay before proposing a full block to maximize the amount of potential mev for inclusion in the block. this requires extremely low latency for proposing blocks and views of the mempool. + +
+ +#### searcher + +##### compute latency + +* transaction parsing and filtering +* simulation + + +##### transport latency + +* sending bundles to builder +* builder rate limits + + +##### searcher responses + +* proprietary compute improvements +* bundle timing in slot periods +* co-locate with builder (searching in the same region, etc.) + +
+ + +--- + + +### resources + +
+ + +* **[web3-toolkit-yul](https://github.com/go-outside-labs/web3-toolkit-yul/blob/main/README.md)** +* **[mev-boost+ latency notes](https://hackmd.io/@layr/SkBRqvdC5#Latency)** +* **[manifold's openmev latency benchmarking](https://docs.openmev.org/technical-reference/benchmarking)** +* **[defining the latencies involved in mev strategies, by taker](https://mirror.xyz/0x00000a2A02540A0D92e209F9f5F7e104745e06Ba/uYOelwkLc4K7nlo5XV_zpuqsV6MwIMMp-py4e-u4qnE)** +* **[latency is money, by data always](https://hackmd.io/@dataalways/latency-is-money)** diff --git a/MEV_searchers/mempool_monitoring/README.md b/MEV_searchers/mempool_monitoring/README.md new file mode 100644 index 0000000..72b76df --- /dev/null +++ b/MEV_searchers/mempool_monitoring/README.md @@ -0,0 +1,18 @@ +## mempool monitoring + +
+ +### tl; dr + +
+ +
+ +--- + +### resources + +
+ +* **[mempool dumpster](https://github.com/flashbots/mempool-dumpster)** +* **[blocknative mempool explorer](https://explorer.blocknative.com/)** diff --git a/MEV_searchers/order_flows/101.md b/MEV_searchers/order_flows/101.md new file mode 100644 index 0000000..9cee2cd --- /dev/null +++ b/MEV_searchers/order_flows/101.md @@ -0,0 +1,30 @@ +### types of private order flows + +
+ +
+ + + +
+ +
+ +#### rpc-based "payment for order flow protocols" (POFPs) + +* this type of private order flows can be realized by modifying either the user's rpc or by modifying the protocol's frontend +* the rpc endpoint re-broadcasts (forwarding) the tx to nodes. +* in respect to every pending tx they receive, they can: 1) censor, 2) forward to some mempool, or 3) forward it directly to some block-builders or validators. + +
+ +#### validator transaction reordering protocols (VTRPs) + + + +* private tx reordering +* two goals: 1) identify valuable user txs, 2) replace the POFP's value-extracted tx with its own value-extractive tx +* when a VTRP is able to identify a valuable user tx but, due to the tactics of the POFP, is unable to inject its own transaction in place of the POFP's -> VTRP's optimal strategy is to censor the user's transaction from the final block + +
+ diff --git a/MEV_searchers/order_flows/README.md b/MEV_searchers/order_flows/README.md new file mode 100644 index 0000000..d321849 --- /dev/null +++ b/MEV_searchers/order_flows/README.md @@ -0,0 +1,26 @@ +## order flows + +
+ + +> *["orderflow nontoxic is when expected future price does not change given the order’s existence; that is, the trade provides no predictive signal for the expected price in the future."](https://xenophonlabs.com/papers/uniswap_valuing_orderflow.pdf)* + +
+ + +* **[exclusive order flows](exclusive_order_flows.md)** +* **[payment for order flows (pfof)](101.md)** +* **[projects addressing eof primitives](projects.md)** + +
+ +--- + +### resources + +* **[illuminating ethereum's order flow landscape, by angela lu](https://writings.flashbots.net/illuminate-the-order-flow)** +* **[overview of mev and eth progress, by alex stokes](https://www.youtube.com/watch?v=DZfKE8djQTM)** +* **[the orderflow auction design space, by stephane and ankit](https://frontier.tech/the-orderflow-auction-design-space)** +* **[everything you need to know about order flow auctions, by tuomikooski and monteiro](https://www.monoceros.com/insights/order-flow-auctions)** +* **[mev protection: dex & aggregator anti-mev mechanisms](https://www.shoal.gg/p/mev-protection-dex-and-aggregator)** +* **[the toxic orderflow series, by alex nezlobin](https://medium.com/@alexnezlobin/toxic-order-flow-on-decentralized-exchanges-problem-and-solutions-a1b79f32225a)** diff --git a/MEV_searchers/order_flows/exclusive_order_flows.md b/MEV_searchers/order_flows/exclusive_order_flows.md new file mode 100644 index 0000000..02b713c --- /dev/null +++ b/MEV_searchers/order_flows/exclusive_order_flows.md @@ -0,0 +1,31 @@ +## exclusive order flows + +
+ +### tl; dr + +
+ +* searchers who have access to private and public mempools can aggregate txs and predict price movement. +* market makers (lps) can use order flows to model information from incoming orders and readjust prices and spreads. +* traders can use order flow sas a short-term strategy to time their trade. + +
+ + + +--- + +### resources + +
+ + +* [private order flow and the block builder market, by jon charbonneau](https://twitter.com/jon_charb/status/1562916372505665536) +* [ethereum's biggest issue no one's talking about](https://mariusvanderwijden.github.io/blog/2022/10/21/lightclients/) +* [private order flow is the new MEV (youtube)](https://www.youtube.com/watch?v=bapIqxhIdaY) +* [order flow, auctions and centralisation II: order flow auctions](https://collective.flashbots.net/t/order-flow-auctions-and-centralisation-ii-order-flow-auctions/284) +* [order flow, auctions & centralisation, by q. kilbourn](https://www.youtube.com/watch?v=ilc3EoSMMDg) +* [order flow auctions & enshrined builder, by apriori](https://mirror.xyz/apriori.eth/wiLKgkaN6JBwBDq4E3T_-BZ0OIPhlbIItgJdE3CFAMo) +* [payment for order flow on tradefi, by forbes](https://www.forbes.com/advisor/investing/payment-for-order-flow/) +* [the orderflow auction design space, by frontier](https://frontier.tech/the-orderflow-auction-design-space) diff --git a/MEV_searchers/order_flows/projects.md b/MEV_searchers/order_flows/projects.md new file mode 100644 index 0000000..21a8bfe --- /dev/null +++ b/MEV_searchers/order_flows/projects.md @@ -0,0 +1,13 @@ +## projects addressing private orderflows + +
+ +* [dflow](https://docs.dflow.net/docs/dflow-intro/) +* [suave](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_projects/flashbots/suave) +* [kolibrio](https://www.kolibr.io/) (and [docs](https://docs.kolibr.io/)) + +
+ +--- + +### resources diff --git a/anatomy_of_mev_bots/profits/2022.md b/MEV_searchers/profits/2022_profits.md similarity index 100% rename from anatomy_of_mev_bots/profits/2022.md rename to MEV_searchers/profits/2022_profits.md diff --git a/MEV_searchers/pvp_war/README.md b/MEV_searchers/pvp_war/README.md new file mode 100644 index 0000000..daa6c12 --- /dev/null +++ b/MEV_searchers/pvp_war/README.md @@ -0,0 +1,53 @@ +## PvP bot battles + +
+ +### cool stories + +
+ +#### salmonella + +* exploited the generalised nature of front-running setups through an erc20 token that could detect when a non-owner is transacting it, returning just 10% of the amount. +* [source code](https://github.com/Defi-Cartel/salmonella) + +
+ +#### kattana + +* trap for front-running bots during token listing. + +
+ +#### YOLOchain + +* [bert miller thread](https://twitter.com/bertcmiller/status/1381296074086830091?s=20) + * instead of users paying tx fees via gas prices, flashbots users pay fees via a smart contract call which transfers eth to miner. + * miners receive bundles of txs from users and include the bundle that pays the most + * sandwich bots watch the mempool for users buying on dexes and sandwich them + * bots will simulate their txs on local infrastrcuture + +
+ +#### other stories of hacked MEV bot + + +* [https://twitter.com/AnciliaInc/status/1580705036400611328](https://twitter.com/AnciliaInc/status/1580705036400611328) +* [https://twitter.com/BlockSecTeam/status/1580779311862190080](https://twitter.com/BlockSecTeam/status/1580779311862190080) +* [https://twitter.com/MevRefund/status/1537421091697836032](https://twitter.com/MevRefund/status/1537421091697836032) +* [https://twitter.com/MevRefund/status/1580652170592280576](https://twitter.com/MevRefund/status/1580652170592280576) +* [a list of malicious tokens](malicious_tokens.md)[https://github.com/kailinr/cyanide] +* [the rug check (tokens)](https://therugcheck.com/) + +
+ + +---- + + +### resources + +
+ +* [disassembling mev bots, by noxx](https://noxx.substack.com/p/mev-memoirs-into-the-arena-chapter-3e9) +* [toxic tokens contracts (salmonella derivatives) diff --git a/pvp_war/malicious_tokens.md b/MEV_searchers/pvp_war/malicious_tokens.md similarity index 100% rename from pvp_war/malicious_tokens.md rename to MEV_searchers/pvp_war/malicious_tokens.md diff --git a/MEV_searchers/tx_and_signature_explorers/README.md b/MEV_searchers/tx_and_signature_explorers/README.md new file mode 100644 index 0000000..570f1cf --- /dev/null +++ b/MEV_searchers/tx_and_signature_explorers/README.md @@ -0,0 +1,25 @@ +## tx && signature explorers + +
+ + +* [bloxy, by bitquey](https://bloxy.info/) +* [tx.eth.samczsun.com](https://tx.eth.samczsun.com/) +* [tx explorer, by blocksec](https://phalcon.blocksec.com/) +* [zero mev, by pmcgoohan](https://www.zeromev.org/) +* [ethvm ethereum explorer](https://www.ethvm.com/) +* [mev explorer, by eigenphi](https://www.eigenphi.io/) +* [signature database import](https://openchain.xyz/signatures) +* [ethtx transaction decoder](https://ethtx.info/) +* [abi for unverified contracts](https://abi.w1nt3r.xyz/) +* [bundle explorer, by flashbots](https://flashbots-explorer.marto.lol/) +* [explorer and txs, by anyblock](https://explorer.anyblock.tools/) +* [txn finance, by band protocol](https://txn.finance/) +* [block explorer, by blockchair](https://blockchair.com/ethereum) +* [block explorer, by blockscout](https://blockscout.com/eth/mainnet/) +* [mev dashboard, by metablock](https://mev.metablock.dev/1/dashboard) +* [ethereum signature database](https://www.4byte.directory/) +* [address explorer, by breadcrumbs](https://www.breadcrumbs.app/home) +* [ethereum token explorer, by diem](https://ethplorer.io/) +* [public mev explorer, by metablock](https://metablock.dev/tools/mev/) +* [block and tokens explorer, by oklink](https://www.oklink.com/en/eth) diff --git a/MEV_strategies/README.md b/MEV_strategies/README.md new file mode 100644 index 0000000..ccdaf29 --- /dev/null +++ b/MEV_strategies/README.md @@ -0,0 +1,19 @@ +## mev strategies + +
+ +### in this dir: + +
+ + +* [oracles](oracles) +* [sniping](sniping) +* [sandwich](sandwich) +* [longtails](longtails) +* [flashloans](flashloans) +* [backrunning](backrunning) +* [liquidations](liquidations) +* [frontrunning](frontrunning) +* [atomic arbitrage](atomic_arb) +* [statistical strategies](stat_arbs) diff --git a/MEV_strategies/arbitrage/README.md b/MEV_strategies/arbitrage/README.md new file mode 100644 index 0000000..271984b --- /dev/null +++ b/MEV_strategies/arbitrage/README.md @@ -0,0 +1,7 @@ +## arbitrage + +
+ +* **[atomic arb](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/atomic_arb)** +* **[statistical arb](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/stat_arbs)** + diff --git a/MEV_strategies/atomic_arb/README.md b/MEV_strategies/atomic_arb/README.md new file mode 100644 index 0000000..755bcf2 --- /dev/null +++ b/MEV_strategies/atomic_arb/README.md @@ -0,0 +1,45 @@ +## atomic arbitrage + +
+ +### tl;dr + +
+ + +* in **tradefi**, arbitrage refers to buying something in one venue and selling it in another (through a series of intermediate transactions) for a higher price. this is note risk-free as prices can move mid-transaction. + +* due to the nature of the evm's atomic execution, **atomic arbitrages** are possible (as opposed to tradefi): smart contracts allow the packaging a sequential execution of txs, for a set of conditions. if the conditions are not met, the execution can fail, undoing all the on-chain interactions that just occurred. + +* since **liquidity on-chain is fragmented** (thousands of pools don't communicate with each other, each providing quotes for swapping assets in real-time), it creates an opportunity to buy low and sell high across different pools. for example, two DEXes offer a token at two different prices so that a token can be bought at the lower-priced DEX and sold on the higher-priced DEX in a single atomic transaction. + +* **non-atomic (cross-chain, CEX/DEX, etc.) arbs** are covered **[here](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_strategies/stat_arbs)**. + +
+ +---- + +### in this dir + +
+ +* [arbitrage patterns](patterns) +* [arbitrage algorithms](algorithms) +* [cool arb txs in the wild](mev_bots_wild) + + +
+ +---- + +### links + +
+ +* [anatomy of arber bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/bots/arbers.md) +* [analyzing mev bot's arb, by et](https://medium.com/@etdu/analyzing-an-mev-bots-arbitrage-on-ethereum-c6980cfd347) +* [how to automate triangular arb recognition](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34/5-tFRGLVbVq0uCLnWnw7B0D-mD7GKZr1DfPXhyopU0Y) +* [cyclic arb in dexes, by wang et al](https://arxiv.org/pdf/2105.02784.pdf) +* [recoginizing atomic arbitrage mev, by eigenphi](https://eigenphi.substack.com/p/nerd-alert-the-upgraded-algorithm) + + diff --git a/MEV_strategies/atomic_arb/algorithms/README.md b/MEV_strategies/atomic_arb/algorithms/README.md new file mode 100644 index 0000000..3194e24 --- /dev/null +++ b/MEV_strategies/atomic_arb/algorithms/README.md @@ -0,0 +1,31 @@ +## arbitrage algorithms (tx-ordering based) + +
+ +### tl; dr + +
+ + +* these algorithms are represented by multi-edged graph data structures where nodes represent coins and edges represents rates. +* to find an arb opportunity, find a closed loop of edges for which the product of weights in the edges > 1. + +
+ +### in this + +
+ +* [belmman-ford](bellmann_ford) +* [ford-fulkerson](ford_fulkerson) + +
+ +--- + +### resources + +
+ +* [all is fair in arb, by ddmckinnon](https://www.ddmckinnon.com/2022/11/27/all-is-fair-in-arb-and-mev-on-avalanche-c-chain/) +* [on classifying complex networks, by dr. m. von steinkirch](https://github.com/go-outside-labs/ml-graph-network-analyser/blob/master/final_report.pdf) diff --git a/MEV_strategies/atomic_arb/algorithms/bellmann_ford/README.md b/MEV_strategies/atomic_arb/algorithms/bellmann_ford/README.md new file mode 100644 index 0000000..2d6f425 --- /dev/null +++ b/MEV_strategies/atomic_arb/algorithms/bellmann_ford/README.md @@ -0,0 +1,14 @@ +## bellmann ford algorithm + +
+ +### tl; dr + +
+ +
+ +--- + +### resources + diff --git a/MEV_strategies/atomic_arb/algorithms/ford_fulkerson/README.md b/MEV_strategies/atomic_arb/algorithms/ford_fulkerson/README.md new file mode 100644 index 0000000..ef7dac1 --- /dev/null +++ b/MEV_strategies/atomic_arb/algorithms/ford_fulkerson/README.md @@ -0,0 +1,13 @@ +## ford fulkerson ford algorithm + +
+ +### tl; dr + +
+ +
+ +--- + +### resources diff --git a/arbitrage/mev_bots_wild/README.md b/MEV_strategies/atomic_arb/mev_bots_wild/README.md similarity index 84% rename from arbitrage/mev_bots_wild/README.md rename to MEV_strategies/atomic_arb/mev_bots_wild/README.md index ebf34e0..ee82552 100644 --- a/arbitrage/mev_bots_wild/README.md +++ b/MEV_strategies/atomic_arb/mev_bots_wild/README.md @@ -2,6 +2,14 @@
+### 2023 + +* [$2mil turned $0.05 on the USDC fud](https://eigenphi.io/mev/ethereum/tx/0x8a6be1e4db4375c1a1c9d1e5c5fcaa5c255b2d24f5da3de05f3b25d7c3508021) + + +
+ +---- ### 2022 diff --git a/MEV_strategies/atomic_arb/patterns/README.md b/MEV_strategies/atomic_arb/patterns/README.md new file mode 100644 index 0000000..9b469d1 --- /dev/null +++ b/MEV_strategies/atomic_arb/patterns/README.md @@ -0,0 +1,31 @@ +## arbitrage patterns + +
+ +### tl; dr + +
+ +* spatial (exchanges are located in different locations) +* triangular (profit from trading loops) +* statistical (rely on mathematical models for high-frequency arbs) +* cross-exchange +* sandwich + +
+ +---- + +### in this dir + +
+ +* [spatial arb](spatial.md) +* [triangular arb](triangle.md) +* [taxed tokens](taxed.md) + +
+ +--- + +### resources diff --git a/arbitrage/patterns/spatial.md b/MEV_strategies/atomic_arb/patterns/spatial.md similarity index 97% rename from arbitrage/patterns/spatial.md rename to MEV_strategies/atomic_arb/patterns/spatial.md index 416da24..c9bdc8d 100644 --- a/arbitrage/patterns/spatial.md +++ b/MEV_strategies/atomic_arb/patterns/spatial.md @@ -1,5 +1,7 @@ ## spatial patterns +
+ ### tl; dr * also known as geographical arbitrage, it occurs when an arbitrageur looks for price differences between geographically separate markets. diff --git a/arbitrage/patterns/taxed.md b/MEV_strategies/atomic_arb/patterns/taxed.md similarity index 100% rename from arbitrage/patterns/taxed.md rename to MEV_strategies/atomic_arb/patterns/taxed.md diff --git a/arbitrage/patterns/README.md b/MEV_strategies/atomic_arb/patterns/triangle.md similarity index 60% rename from arbitrage/patterns/README.md rename to MEV_strategies/atomic_arb/patterns/triangle.md index 7052162..ed1c7a7 100644 --- a/arbitrage/patterns/README.md +++ b/MEV_strategies/atomic_arb/patterns/triangle.md @@ -1,4 +1,4 @@ -## arbitrage patterns +## triangular pattern
@@ -6,25 +6,12 @@
- * spatial arbitrage involving one uniswap v3 pool and other venue seems to be the most common in 2022, followed by triangle arbitrage with one or two uniswap v3 pools. - - -
- ----- - -### in this dir - -
- -* [spatial arb](spatial.md) -* [triangle arb](triangle.md) -* [taxed tokens](taxed.md) -
--- ### resources + + diff --git a/MEV_strategies/backrunning/README.md b/MEV_strategies/backrunning/README.md new file mode 100644 index 0000000..a20a16c --- /dev/null +++ b/MEV_strategies/backrunning/README.md @@ -0,0 +1,27 @@ +## backrunning (tailgating) + +
+ + +### tl; dr + +
+ +* backrunners predict trade opportunities that will be included into a future block based on the outcome of another user's trade, so that their tx is ordered immediately after some unconfirmed 'target tx'. +* a typical backrunner will send many identical txs, with gas price identical to that of the target tx, sometimes from different accounts, in order to increase the chances that one of their txs is ordered after the target but before any competitor (snipping). +* example of strategy: a buy tx immediately behind the initial liquidity. the bot swoops in and buys as many tokens as possible and waits for the price to go up and other traders buy the token from uniswap and proceeds to sell back the tokens at a higher price. + +
+ +--- + +### resources + +
+ +* [anatomy of backrunner bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/bots/backrunners.md) +* [intro to backrunning on ethereum](https://www.youtube.com/watch?v=ApAJ1afUbBI) +* [dune for Portion of Daily Gas Used by Backrunning Bot Contracts](https://dune.com/phabc/backrunning-bots-gas-consumption) +* [backrunning study for bZx IDO](https://amanusk.medium.com/the-fastest-draw-on-the-blockchain-bzrx-example-6bd19fabdbe1) +* [ef discussion on random ordering of equally-priced txs](https://github.com/ethereum/go-ethereum/issues/21350) + diff --git a/MEV_strategies/flashloans/README.md b/MEV_strategies/flashloans/README.md new file mode 100644 index 0000000..321e3e1 --- /dev/null +++ b/MEV_strategies/flashloans/README.md @@ -0,0 +1,47 @@ + +## flashloans + +
+ +### tl; dr + +
+ +* **flashloans** allow the borrowing of any available amount of assets without any collateral, as long as the liquidity is returned to the protocol within one block tx. +* flashloans can be requested through smart contracts that execute the steps to borrow nad pay the loan (+ interest fees) withing the same tx. + +
+ +--- + +### in this dir + +
+ +* [lending](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_and_trading/lending/README.md) +* [smart contracts](smart_contracts) + +
+ +--- + +### external resources + +
+ +* [flashloans dashboard, by eigeinphi](https://eigenphi.io/mev/ethereum/flashloan) +* [flashloans from dYdX margin trading, by eigenphi](https://medium.com/coinmonks/get-everything-for-nothing-how-to-use-flash-loans-to-launch-an-arbitrage-d8520827cbfe) +* [kollateral aggregator](https://www.kollateral.co/) +* [taking undercollaterized loans, by samczsun](https://samczsun.com/taking-undercollateralized-loans-for-fun-and-for-profit/) +* [tfusd flashloan writeup](https://github.com/Jonah246/tfusd-flashloan-attack-write-up) +* [defi hacks: flashloans](https://wooded-meter-1d8.notion.site/0e85e02c5ed34df3855ea9f3ca40f53b?v=22e5e2c506ef4caeb40b4f78e23517ee) +* [flashloan-rs rust crate](https://crates.io/crates/flashloan-rs) +* [flashloan monitor](https://tools.blocksec.com/flashloan/eth) +* [code for flashmint arb](https://github.com/fifikobayashi/FlashMintArbitrage) +* [leveraged flashloan sandwich](https://twitter.com/bertcmiller/status/1430169143123353611) +* [0xbaDc0dE dydx flashloan mistake](https://twitter.com/bertcmiller/status/1574852629691305993) +* [flashloan comparisons in foundry](https://github.com/Jeiwan/flash-loans-comparison) +* [flashloan toolbox](https://github.com/Supercycled/flashloans-toolbox) +* [sugardad (aave v2)](https://github.com/fifikobayashi/SugarDaddyFlashloan) +* [dydx and aave aggregate](https://github.com/fifikobayashi/Aggregated-Flashloan) +* [aave flashloan efficiently, by crypto-banker](https://github.com/crypto-banker/FLAAVE/) diff --git a/flashloans/smart_contracts/dydx_flahsloan.sol b/MEV_strategies/flashloans/smart_contracts/dydx_flashloan.sol similarity index 100% rename from flashloans/smart_contracts/dydx_flahsloan.sol rename to MEV_strategies/flashloans/smart_contracts/dydx_flashloan.sol diff --git a/MEV_strategies/frontrunning/README.md b/MEV_strategies/frontrunning/README.md new file mode 100644 index 0000000..2752d7d --- /dev/null +++ b/MEV_strategies/frontrunning/README.md @@ -0,0 +1,52 @@ +## frontrunning + +
+ +### tl, dr + +
+ + +* frontrunning is the process by which an adversary observes txs on the network layer and then acts upon this information by, for instance, issuing a competing tx, with the hope that this tx is mined before a victim's tx. + +* **strategy example**: transaction A is broadcasted with a higher gas price than an already pending transaction B so that A gets mined before B. + + +* **generalized frontrunners** are bots that watch the mempool to detect profitable transactions, copy their code, replace addresses with theirs, then submit the modified tx with a higher gas price. + +* **specialized frontrunners**, also known as longtails, are covered [here](https://github.com/go-outside-labs/mev-toolkit/tree/main/longtails) + +
+ +---- + +### in this dir + + +
+ + + +
+ + +--- + +### resources + +
+ +* [anatomy of frontrunner bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/bots/frontrunners.md) +* [shutter frontrunning protection](https://github.com/shutter-network/shutter) + +##### cool txs and stories + +* [generalized frontrunner copied the exploiter's 4 tx on past 50 blocks](https://twitter.com/bertcmiller/status/1613257826654392320) + + +##### some history + +* [improving frontrunning of x*y=k mm, by vitalik](https://ethresear.ch/t/improving-front-running-resistance-of-x-y-k-market-makers/1281) +* [on cryptokitties `giveBirth()` frontrunning](https://maven11.substack.com/p/modular-mev-part-1the-introduction) +* [bancor ico frontrunning](https://hackingdistributed.com/2017/06/19/bancor-is-flawed/?ref=hackernoon.com) +* [150 lines of python frontrunning bancor](https://hackernoon.com/front-running-bancor-in-150-lines-of-python-with-ethereum-api-d5e2bfd0d798) diff --git a/MEV_strategies/liquidations/README.md b/MEV_strategies/liquidations/README.md new file mode 100644 index 0000000..5bbe264 --- /dev/null +++ b/MEV_strategies/liquidations/README.md @@ -0,0 +1,45 @@ +## liquidation + +
+ +### tl, dr + +
+ +* **lending protocol** work by requiring users to deposit some collateral. users can then borrow different assets and tokens from others depending on what they need, up to a certain amount of their deposited collateral. as the value of a borrower's collateral fluctuates, if the value of the borrowed assets exceeds the value of the collateral, the protocol allows anyone to liquidate the collateral (similar to margin calls in traditional finance). +* **liquidation** happens when a user buys someone's collateral (at a discount) when the value of borrowed asset exceeds a predetermined value relative to the asset deposited as collateral. +* **searchers compete** to parse blockchain data as fast as possible to determine which borrowers can be liquidated and be the first to submit a liquidation transaction and collect the liquidation fee. +* **example of strategy**: bot detects a liquidation opportunity at a block and issues a liquidation tx, which is expected to be included in the next block. to compete with other liquidators, the bot sets high tx fees for their liquidation tx. +* **another strategy**: bot observes a tx that will create a liquidation opportunity (e.g., an oracle price update tx rendering a collateralized debit to be liquidated), then backruns this tx with a liquidation tx to avoid the fee bidding competition. + +
+ +--- + +### in this dir + +
+ +* [compound](compound.md) +* [liquity](liquity.md) +* [aave](aave.md) +* [euler](euler.md) + +
+ +--- + +## resources + +
+ +* [anatomy of liquidator bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/bots/liquidators.md) +* [notes on lending as a trader](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_and_trading/lending) +* [liquidation dashboard, by eigenphi](https://eigenphi.io/mev/ethereum/liquidation) +* [understanding compound's liquidation, by zengo](https://zengo.com/understanding-compounds-liquidation/) +* [nahtan worsley's liquidation strategies, by forbes](https://www.forbes.com/sites/jeffkauflin/2022/10/11/the-secretive-world-of-mev-where-crypto-bots-scalp-investors-for-big-profits/?sh=25489eda2d8d) +* [cycle of liquidations in the CRV pool](https://twitter.com/AaveAave/status/1595168982541209611) +* [how to build a liquidator bot for defi, by powpark](https://powpark.com/post/2020-06-19-how-to-build-a-liquidator-bot-defi/) +* [liquidators, the secret whales helping defi, by tom schimidt](https://medium.com/dragonfly-research/liquidators-the-secret-whales-helping-defi-function-acf132fbea5e) +* [mitigating defi liquidations with reversible call options, by qin et al](https://eprint.iacr.org/2023/254) + diff --git a/MEV_strategies/liquidations/aave.md b/MEV_strategies/liquidations/aave.md new file mode 100644 index 0000000..6643795 --- /dev/null +++ b/MEV_strategies/liquidations/aave.md @@ -0,0 +1,37 @@ +## aave protocol + +
+ +### tl; dr + +
+ +* decentralized lending protocol that lets users lend or borrow crypto assets or real-world assets (RWAs) without going to a centralized intermediary. +* users deposit digital assets into liquidity pools, which become funds so that the protocol can lend out. + + +
+ +### tl; dr aave v3 + +
+ +* **portal**: allows flow of liquidity between aave v3 markets across different networks (governance-approved bridges can burn atokens while minting them on the destination network) +* **emode**: the high-efficiency mode allows borrowers to extract the highest borrowing power out of their collateral when supplied + borrowed assets are price-correlated (e.g. both are derivatives of the same underlying asset). +* **isolation mode**: new assets can be listed as isolated so borrowers cannot supply other assets as collateral (but can capture yield) but only approved stablecoins. +* **siloed borrowing** allows assets with risky manipulatable oracles to be listed as a single borrow asset. +* **multiple rewards** per token. +* **chains**: avalanche, pptimism, polygon, fantom, harmony and arbitrum. + +
+ + +--- + +### resources + +
+ +* [liquidations, by aave protocol](https://docs.aave.com/developers/guides/liquidations) +* [aave v2 whitepaper](https://github.com/aave/protocol-v2/blob/master/aave-v2-whitepaper.pdf) +* [aave v3 docs](https://docs.aave.com/developers/getting-started/readme) diff --git a/MEV_strategies/liquidations/compound.md b/MEV_strategies/liquidations/compound.md new file mode 100644 index 0000000..5b33355 --- /dev/null +++ b/MEV_strategies/liquidations/compound.md @@ -0,0 +1,22 @@ +## compound + +
+ +### tl; dr + +
+ +* decentralized protocol that establishes markets with algorithmically set interest rates, based on supply and demand, and allowing users to frictionlessly +exchange the time value of crypto assets. + +
+ +--- + +### resources + +
+ + +* [compound docs](https://docs.compound.finance/) +* [compound whitepaper](https://compound.finance/documents/Compound.Whitepaper.pdf) diff --git a/MEV_strategies/liquidations/euler.md b/MEV_strategies/liquidations/euler.md new file mode 100644 index 0000000..3eb97d2 --- /dev/null +++ b/MEV_strategies/liquidations/euler.md @@ -0,0 +1,24 @@ +## euler + +
+ +### tl; dr + +
+ +* protocols with larger amounts of bad debt usually suffer oracle attacks (e.g. mango markets). euler tries to improve existing liquidation mechanism to prevent bad debt. +* euler presents optimizations on liquidations through debt tokens (dTokens) and suply tokens (eTokens), and offering sliding and muliplying discounts to liquidators (dutch auction) +* it calculates health scores using risk-adjusted metrics for collateralized assets, by adjusting them against their market value to a more conservative risk-adjusted one. +* once a user healthy's score has flagged for liquidation, anyone can transfer dTokens and eTokens to their own account, buying both their collateral and debit. +* **soft liquidation**: only enough collateral and debt are transferred under liquidation to return to a healthy score. +* mev resistance comes from the multipliers euler offers to liquidators with deposits in their account. + +
+ +---- + +### resources + +
+ +* [inovative liquidation, by euler](https://www.euler.finance/blog/eulers-innovative-liquidation-engine) diff --git a/MEV_strategies/liquidations/liquity.md b/MEV_strategies/liquidations/liquity.md new file mode 100644 index 0000000..eace844 --- /dev/null +++ b/MEV_strategies/liquidations/liquity.md @@ -0,0 +1,19 @@ +## [liquity](https://www.liquity.org/) + +
+ +### tl; dr + +
+ +* decentralized borrowing protocol that allows drawing interest-free loans against ether used as collateral + +
+ +--- + +### resources + +
+ +* [liquity docs](https://docs.liquity.org/) diff --git a/MEV_strategies/longtails/README.md b/MEV_strategies/longtails/README.md new file mode 100644 index 0000000..0669158 --- /dev/null +++ b/MEV_strategies/longtails/README.md @@ -0,0 +1,28 @@ +## longtails + +
+ +### tl, dr + +
+ +* every other mev strategy is already dominated by experienced searchers, so longtails are the **best bet for newcomers**. +* it encloses all other forms of MEV (undiscovered MEV): on **less known protocols / economic mechanisms or event-based strategies**. + +
+ +--- + +### in this dir + +
+ + +
+ +--- + +### links + +* [anatomy of longtailor bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/bots/longtailors.md) +* [$PEPE origin investigation](https://twitter.com/CryptoKoryo/status/1648979943764762626) and [contract](https://etherscan.io/address/0x6982508145454Ce325dDbE47a25d4ec3d2311933#code) diff --git a/MEV_strategies/oracles/README.md b/MEV_strategies/oracles/README.md new file mode 100644 index 0000000..0c531dd --- /dev/null +++ b/MEV_strategies/oracles/README.md @@ -0,0 +1,43 @@ +## oracles + +
+ +### tl;dr + +
+ +* price oracles are any defi tool showing an asset's price. they can either on or off chain. + +* oracles should provide a trustless way of getting extrinsic (off-chain) information, and some key functions such as: collecting data from an off-chain source, transfering the data on-chain with a signed message, and making the data available by putting it in a smart contract’s storage. + +* oracle exploitation can generate profit opportunities (e.g., through arbitrage or liquidation, multi-block) + +
+ +--- + +### in this dir + +
+ +* [twap](twap.md) +* [twamm](twamm.md) +* [chainlink](chainlink.md) +* [cron finance docs on twamm](https://docs.cronfi.com/twamm/) + +
+ +--- + +### links + + +
+ +* [taking undercollaterized loans for fun an for profit, by samczsun](https://samczsun.com/taking-undercollateralized-loans-for-fun-and-for-profit/) +* [mango markets and the benefits and limitations of oracles](https://blog.kaiko.com/mango-markets-and-the-benefits-and-limitations-of-oracles-753ce6d2a732) +* [dissecting the mango markets exploit, by perpetual protocol](https://perpprotocol.mirror.xyz/WMgIoGMktt_fMVPkfjTxRnSt4qwsWr_Ukub0iq3vW_I) +* [toxic order flow and solutions, by a. nezlobin](https://medium.com/@alexnezlobin/toxic-order-flow-on-decentralized-exchanges-problem-and-solutions-a1b79f32225a) +* [inverse finance resources](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_and_trading/protocols/inverse.md) +* [keep3rOracleFactory.sol](https://github.com/keep3r-network/keep3r.network/blob/master/contracts/Keep3rV2OracleFactory.sol) + diff --git a/MEV_strategies/oracles/chainlink.md b/MEV_strategies/oracles/chainlink.md new file mode 100644 index 0000000..943691c --- /dev/null +++ b/MEV_strategies/oracles/chainlink.md @@ -0,0 +1,24 @@ +## chainlink + +
+ +### tl; dr + +
+ +* a decentralized oracle network consisting of three key smart contracts: + * a reputation contract: keep track of data providers' performance. + * an order-matching contract: selects bids from oracles using the reputation contract. + * an aggregation contract—and an off-chain registry of data providers. +* one of the main challenges with such a decentralized approach is the formulation of the aggregation function. +* chainlink proposes calculating a weighted response, allowing a validity score to be reported for each oracle response. + +
+ +--- + +### resources + +
+ +* [fair sequencing services](https://blog.chain.link/chainlink-fair-sequencing-services-enabling-a-provably-fair-defi-ecosystem/) diff --git a/MEV_strategies/oracles/twamm.md b/MEV_strategies/oracles/twamm.md new file mode 100644 index 0000000..ec4fc0f --- /dev/null +++ b/MEV_strategies/oracles/twamm.md @@ -0,0 +1,29 @@ +## twamm designs + +
+ +### tl; dr + + +
+ + +* time weighted amm designs prevent sandwich attacks by executing transactions lazily. +* orders are executed as if they were placed between blocks. this way, an attacker would need to straddle blocks in order to take advantage of the victim's slippage tolernace (which is riskier than simply including txs around the victim's). + + + +
+ +--- + + +### resources + + +
+ +* [twamm, by paradigm](https://www.paradigm.xyz/2021/07/twamm) +* [twamm ref implementation](https://github.com/para-dave/twamm) +* [some properties of twamm](https://github.com/pcaversaccio/reentrancy-attacks) +* [twamm numerical analysis, by cron finance](https://docs.cronfi.com/twamm/research/numerical-analysis#presentation) diff --git a/MEV_strategies/oracles/twap.md b/MEV_strategies/oracles/twap.md new file mode 100644 index 0000000..6e3d1c0 --- /dev/null +++ b/MEV_strategies/oracles/twap.md @@ -0,0 +1,37 @@ +## TWAP oracles + +### tl; dr + + +
+ +* an asset’s time-weighted average price (TWAP) is the measure of an asset’s average price over a predetermined period of time (any specified duration). +* TWAP trading algorithms seek to optimize average price while executing over a specified time period. +* generally used to execute large orders that are expected to have significant market impact. + +
+ +--- + +### tl; dr oracle attacks + + +
+ +* on pos ethereum, block builder building successive block might be able to manipulate oracles for multi-block MEV extraction, as proposers know one epoch (32 blocks or 6 minutes and 24 seconds) ahead if they are the next block proposer. +* with mev-boost, an attacker could observe the set of upcoming proposers. if they finds two successive proposers that have both been proposing blocks, then the attacker can anticipate the attack. +* a potential attack vector is on lending protocols, where an attacker can borrow assets that are immediately undercollateralized. + + + + +
+ +___ + +### resources + +* [multi- block MEV by flashbots](https://collective.flashbots.net/t/multi-block-mev/457/2?u=nerolation) +* [statistical analysis on ethereum k-consecutive block proposal](https://alrevuelta.github.io/posts/ethereum-mev-multiblock) +* [uniswap v3 twap oracles](https://uniswap.org/blog/uniswap-v3-oracles) +* [multi-block mev, by chainsecurity](https://chainsecurity.com/oracle-manipulation-after-merge/) diff --git a/MEV_strategies/sandwich/README.md b/MEV_strategies/sandwich/README.md new file mode 100644 index 0000000..e61db30 --- /dev/null +++ b/MEV_strategies/sandwich/README.md @@ -0,0 +1,51 @@ +## sandwiching + +
+ +### tl, dr + +
+ +* **sandwich attacks** occurs when a searcher identifies a profitable trade in the mempool that will cause an impact on the price of an asset. + +* a searcher buys or sells a calculated amount directly before the large trade is executed and then immediately exits their position after the large order has taken place, banking a profit. + +* the main theme of sandwich attacks is the deterministic price slippage caused by available liquidity in the pool, which is deterministic . slipage is the change in the price of an asset during a trade. + +* sandwiches (and most frontruns) are often labelled **toxic mev** because the tx that is frontrun either executes at worse conditions or fails to execute. + +* a softer side of sandwich is on the lens of economic efficiency, on which an order can create a consumer surplus and the absence of a [nash equilibrium](https://en.wikipedia.org/wiki/Nash_equilibrium). the bot operator would love the economic system back. + +
+ + +--- + +### in this dir + +
+ +* [interesting txs in the wild](interesting_examples.md) + + +
+ +--- + +### links + +
+ +* [defi sandwich attacks, by cmichel](https://cmichel.io/de-fi-sandwich-attacks/) +* [anatomy of sandwichor bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/bots/sandwichors.md) +* [sandwich attacks on uniswap v2](https://www.defi-sandwi.ch/) +* [sandwich overview, by eigenphi](https://eigenphi.io/mev/ethereum/sandwich) +* [modern mev sandwich attacks on ethereum routers, by totlsota.eth](https://mirror.xyz/totlsota.eth/9JaNkZ1XQfQD6Y79aLYHC_kb_dSBoJ2JYiag5BuGGM8) +* [demystify the dark forest: sandwich attack, by coinmonks](https://medium.com/coinmonks/demystify-the-dark-forest-on-ethereum-sandwich-attacks-5a3aec9fa33e) +* [analysing execution quality in osmosis, by meka.tech](https://meka.tech/writing/analysing-execution-quality-in-osmosis--e9dd8394-0d09-4d92-a0c7-27629d321af0) +* [how to automate sandwich recognization](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34/0NGVJ0rpUHp6AiO1hluZV6X-sG_uwe5lAaGk3Y91X7A) +* [sandwich trap, by kaiji](https://twitter.com/bertcmiller/status/1443532075936751621) +* [loss and slippage in amms](https://arxiv.org/pdf/2110.09872.pdf) +* [jaredfromsubway.eth contract](https://etherscan.io/address/0x6b75d8af000000e20b7a7ddf000ba900b4009a80) and [flow data](https://www.watchers.pro/moneyFlow/0x6b75d8af000000e20b7a7ddf000ba900b4009a80?id=1648682912491528192&network=eth) + + diff --git a/sandwich/interesting_examples.md b/MEV_strategies/sandwich/interesting_examples.md similarity index 50% rename from sandwich/interesting_examples.md rename to MEV_strategies/sandwich/interesting_examples.md index 26f6247..a5db01f 100644 --- a/sandwich/interesting_examples.md +++ b/MEV_strategies/sandwich/interesting_examples.md @@ -5,6 +5,7 @@ #### 2022 * https://etherscan.io/tx/0x90f2f133fcfe8e1870b69323ea0b46193b9443a701b4cef81a14c727a1df648f -* [a MEV bot sandwich attacked this user](https://etherscan.io/tx/0xa79dfb5d4442a4ff04768c638bf306b75340ac325e86c34653904ab7f7429ac5) +* [MEV bot sandwich attacked this tx](https://etherscan.io/tx/0xa79dfb5d4442a4ff04768c638bf306b75340ac325e86c34653904ab7f7429ac5) * [bot spent $18,583.13, to make $19,182.43](https://etherscan.io/tx/0x206203f5d62b8027fc8ad0c88be2b6d7b8e9c6b5b81a49c9a8d1c227d6027018) +* [$APE sandwiches analysis, by eigenphi](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34/G1uzYCDIR6TjWzNDFNKEhdawGJXXGJxISBS5hM2eROc) diff --git a/MEV_strategies/sniping/README.md b/MEV_strategies/sniping/README.md new file mode 100644 index 0000000..d3909d1 --- /dev/null +++ b/MEV_strategies/sniping/README.md @@ -0,0 +1,33 @@ +## sniping + +
+ + +### tl; dr + +
+ +* **liquidity sniping** happens when searchers compete to purchase an asset immediately after the creation of a liquidity pool. +* tokens are then not off-loaded in the same block, but instead sold over the next minutes or hours. +* profits for a sniper are not guaranteed. + +
+ +--- + +### in this dir + +
+ +* [tricks](tricks.md) + +
+ +--- + +### links + +
+ +* [anatomy of snipor bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/bots/snipers.md) +* [nft sniping, by avrahan eisenberg 😬](https://deepfivalue.substack.com/p/how-our-team-makes-millions-in-crypto) diff --git a/MEV_strategies/sniping/tricks.md b/MEV_strategies/sniping/tricks.md new file mode 100644 index 0000000..3175d0b --- /dev/null +++ b/MEV_strategies/sniping/tricks.md @@ -0,0 +1,11 @@ +### tricks + +
+ +#### cex + +* craw relays by requesting through a network of proxies to not get ratelimited (for example, by cloudflare ~5 seconds). +* maintain an in-memory list of endpoints that are predicted to be cached, so only use the ones that are predicted to be uncached. +* [proxymesh: rotating anonynous http proxy servers](https://proxymesh.com/) + +
diff --git a/MEV_strategies/stat_arbs/README.md b/MEV_strategies/stat_arbs/README.md new file mode 100644 index 0000000..93d10e2 --- /dev/null +++ b/MEV_strategies/stat_arbs/README.md @@ -0,0 +1,56 @@ +## statistical strategies (signal-based) + +
+ +### tl; dr + +
+ + +* **statistical mev** (non-atomic) convey informed strategies that rely on off-chain information (signal). + +* examples can be strategies that rely on: + - [cross-chains](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_searchers/cross_domain_mev) mev + - [defi-cefi arbitrage](dex-cex-arb/) + - [order flow](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_searchers/private_order_flows) trading by aggregating from private and public mempools + - [whale watching](https://github.com/go-outside-labs/mev-toolkit/tree/main/MEV_and_trading/whales) + +* these strategies are more profitable and less accessible due to capital requirements and risk profile. + +
+ + +

+ +

+ + + + +
+ +---- + +### in this dir + +
+ + +* [dex-cex arbitrage](dex-cex-arb/) +* [routers and aggregators](aggregators) +* [convex optimization](convex_optimization) + + + +
+ +--- + +### links + +
+ +* [anatomy of stat bots](https://github.com/go-outside-labs/mev-toolkit/blob/main/MEV_searchers/bots/stat-arbers.md) +* [`addLiquidity()` sandwich attack optimization problem](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34/oTdSfZEBdp9WPCNaKqDKCkuDJ9neR2UISc_5mMjZKYU) +* [dex arbitrage, mathematical optimizations & me, by noxx](https://noxx.substack.com/p/dex-arbitrage-mathematical-optimisations) +* [a new game in town, by frontier research](https://frontier.tech/a-new-game-in-town) diff --git a/MEV_strategies/stat_arbs/aggregators/1inch.md b/MEV_strategies/stat_arbs/aggregators/1inch.md new file mode 100644 index 0000000..f689c42 --- /dev/null +++ b/MEV_strategies/stat_arbs/aggregators/1inch.md @@ -0,0 +1,13 @@ +## 1inch + +
+ +### tl; dr + +
+ +
+ +--- + +### resources diff --git a/MEV_strategies/stat_arbs/aggregators/README.md b/MEV_strategies/stat_arbs/aggregators/README.md new file mode 100644 index 0000000..aff2e39 --- /dev/null +++ b/MEV_strategies/stat_arbs/aggregators/README.md @@ -0,0 +1,21 @@ +## routers and aggregators + +
+ +### in this dir + +
+ +* [1inch](1inch.md) + +
+ +--- + +### resources + +
+ +* [modern MEV sandwich attacks on ethereum routers](https://mirror.xyz/totlsota.eth/9JaNkZ1XQfQD6Y79aLYHC_kb_dSBoJ2JYiag5BuGGM8) +* [an efficient algorithm for optimal routing through cfmms, by diamandis et. al](https://angeris.github.io/papers/routing-algorithm.pdf) +* [code for router experiments for the paper above](https://github.com/bcc-research/router-experiments) diff --git a/MEV_strategies/stat_arbs/convex_optimization/README.md b/MEV_strategies/stat_arbs/convex_optimization/README.md new file mode 100644 index 0000000..d510fe1 --- /dev/null +++ b/MEV_strategies/stat_arbs/convex_optimization/README.md @@ -0,0 +1,27 @@ +## convex optimization + +
+ +### tl; dr + +
+ +
+ +### code + +
+ +* [convex optimization for 2 assets, in python](https://github.com/angeris/cfmm-routing-code) + +
+ +--- + +### resources + +
+ +* [dex arb, mathematical optimizations & me, by noxx](https://noxx.substack.com/p/dex-arbitrage-mathematical-optimisations) +* [optmal routing for constant function amm, by angeris et al](https://angeris.github.io/papers/cfmm-routing.pdf) +* [convex optimization, by boyd et al](https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf) diff --git a/MEV_strategies/stat_arbs/dex-cex-arb/README.md b/MEV_strategies/stat_arbs/dex-cex-arb/README.md new file mode 100644 index 0000000..2ad063b --- /dev/null +++ b/MEV_strategies/stat_arbs/dex-cex-arb/README.md @@ -0,0 +1,26 @@ +## dex + cex arb + + +
+ +### tl; dr + + +
+ +* one leg of happens on a cex while the second leg happens on-chain (dex) + + +
+ +--- + +### links + +
+ +* [cefi-cefi arbitrage, by frontier](https://frontier.tech/a-new-game-in-town#9611e39cc63745a489278d09a475600c) +* [uniswap v3 markout analysis, by 0xfbifemboy et al.](https://crocswap.medium.com/usage-of-markout-to-calculate-lp-profitability-in-uniswap-v3-e32773b1a88e) +* [uniswap markout analysis, by thiccythot et al.](https://medium.com/friktion-research/defi-deep-dive-uniswap-part-2-8be77a859f47) +* [cex-dex arb analysis, by a. nezlobin](https://medium.com/@alexnezlobin/ethereum-block-times-mev-and-lp-returns-5c13dc99e80) +* [monthly payment to validators by dex+cex trades, by frontier](https://github.com/ankitchiplunkar/crypto_charts/blob/master/notebooks/Coinbase%20rewards%20split%20between%20cefi-defi%20arbs%20and%20others.ipynb) diff --git a/README.md b/README.md index fff3636..7f34004 100644 --- a/README.md +++ b/README.md @@ -1,290 +1,85 @@ -# šŸ¦ˆā›“ mev toolkit +# ā›“šŸ•¹ mev for everybody

- +

-
-### tl; dr -#### the concept of maximal extractable value (mev) - a revenue stream generated from priority gas auction (PGA) - was coined by the 2019 research paper [flash boys 2.0](https://arxiv.org/abs/1904.05234), and encompasses the profits generated by participant parties when producing new blocks on a blockchain. -#### the resources in this repository are from my own research, which is intermittent and boundless. therefore, no guarantees, no promises; use it at your own risk. + +### tl; dr:
-
- - -## šŸ• notes && code in this repo - -
- -### extraction strategies - -
- -* [arbitrage](arbitrage) -* [sandwich](sandwich) -* [liquidations](liquidations) -* [nft arbitrage](nft_arbitrage) -* [front-running](front_running) -* [back-running](back_running) -* [just-in-time](uniswap/uniswap-v3/just-in-time.md) -* [flashloans](flashloans) -* [sniping](sniping) - - -
- -### building a toolkit - -* [pvp battles](pvp_war) -* [build your mev bot](anatomy_of_mev_bots) -* [latency optimization](latency) - - - - - -
- -### mev on the chains - -* [mev on ethereum](MEV_on_Ethereum) -* [mev on avalanche](MEV_on_Avalanche) -* [mev on arbitrum](MEV_on_Arbitrum) -* [mev on solana](MEV_on_Solana) -* [mev on cosmos](MEV_on_Cosmos) -* [mev on binance](MEV_on_Binance) -* [mev on polygon](MEV_on_Polygon) - - -
- -### mev-related projects - - -* [flashbots](flashbots) -* [cow protocol](cow_protocol) -* [rook dao](rook) -* [private order flows](private_order_flows) - - - -
- -### related defi stuff - -* [uniswap](uniswap) -* [oracles, twap, twamm](oracles) -* [0x protocol and rfq](0x_protocol) -* [defi and day trading](defi_and_trading) -* [tokenomics](tokenomics) - - -
- - - ---- - -## šŸŸ resources && tools - - -
- -### mev explorers - -* [zero mev](https://www.zeromev.org/) -* [public mev explorer](https://metablock.dev/tools/mev/) -* [dashboard by metablock](https://mev.metablock.dev/1/dashboard) -* [flashbots bundle explorer](https://flashbots-explorer.marto.lol/) - - - -
- -### tx analysis - -
- - -##### ethereum mainnet - -
- -* [ethvm](https://www.ethvm.com/) -* [ethtx transaction decoder](https://ethtx.info/) -* [txn finance](https://txn.finance/) -* [ethereum token explorer](https://ethplorer.io/) -* [anyblock explorer and txs](https://explorer.anyblock.tools/) -* [blockscout block explorer](https://blockscout.com/eth/mainnet/) -* [blockchair blocks explorer](https://blockchair.com/ethereum) -* [oklink block and tokens explorer](https://www.oklink.com/en/eth) -* [phalcon tx explorer](https://phalcon.blocksec.com/) -* [breadcrumbs](https://www.breadcrumbs.app/home) - -
- -##### goerli testnet - -
- -* [etherscan goerli](https://goerli.etherscan.io/) - - - - -
- -### gas trackers - -
- -* [eth gas alert](https://ethgasalerts.xyz/) -* [gas price io](https://www.gasprice.io/) -* [ethereum gas tracker](https://www.useweb3.xyz/gas) -* [nansei gas tracker](https://pro.nansen.ai/gas-tracker) -* [gas fee prediction](https://www.blocknative.com/gas-estimator) -* [gastrology](https://dethgasstation.eth.link/) - - - - -
- -### data && analytics - - -* [mev dashboard by flashbots](https://explore.flashbots.net/). -* [nansen](https://www.nansen.ai/) -* [token terminal](https://tokenterminal.com/terminal) -* [westerngate, arbitrage measured](Westerngate.xyz) -* [eigenphi arbitrage scan](https://eigenphi.io/) -* [parsec.finance](https://parsec.finance/) -* [flashloans](https://tools.blocksec.com/flashloan/eth) -* [sandwiched?](https://sandwiched.wtf/) -* [etherscan data on flashbots](https://etherscan.io/blocks/label/flashbots) -* [mev data corpus by manifold](https://github.com/manifoldfinance/mev-corpus) -* [ethereum datafarm](https://github.com/Nerolation/ethereum-datafarm) - - - -##### awesome dune boards - -* [ethereum tx reverts](https://dune.com/kroeger0x/ethereum-transaction-reverts) -* [dune board for gas prices](https://dune.com/kroeger0x/gas-prices) -* [sleuthing hashed function and event signatures](https://dune.com/agaperste/event-and-function-signature-sleuthing?) -* [mev flashbots unleashed](https://dune.com/ivanmolto/mev-flashbots-unleashed) - - -
- - - -### interesting projects - -
- -* [eth converter](https://eth-converter.com/) -* [smart contract allowance checker](https://app.unrekt.net/) -* [tornado cash pool anonymity](https://tutela.xyz/) -* [eth detective](https://www.ethtective.com/address/) -* [contracts diff checker](https://etherscan.io/contractdiffchecker) -* [ultrasound money dahsboard](https://ultrasound.money/) -* [revoke.cash](https://revoke.cash/) -* [ankr rpc endpoints](https://www.ankr.com/rpc/) -* [back run me](https://backrunme.com/swap) -* [cyph3rs.xyz](https://www.cyph3rs.xyz/) - -
- - ---- - -## šŸæ general articles - -
- -- [endgame by vitalik](https://vitalik.ca/general/2021/12/06/endgame.html) -- [ethereum is a dark forest by paradigm](https://www.paradigm.xyz/2020/08/ethereum-is-a-dark-forest) -- [escaping the dark forest by samczsun](https://samczsun.com/escaping-the-dark-forest/) -- [how to build an ethereum mining pool by dragonfly](https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a) -- [mev and me by paradigm](https://research.paradigm.xyz/MEV) -- [return to the dark forest by rekt](https://rekt.news/return-to-the-dark-forest/) -- [modern mev sandwich attacks by totlsota](https://mirror.xyz/totlsota.eth/9JaNkZ1XQfQD6Y79aLYHC_kb_dSBoJ2JYiag5BuGGM8) -- [how i learned to stop worrying and love mev by sreeni](https://medium.com/dragonfly-research/dr-reorg-or-how-i-learned-to-stop-worrying-and-love-mev-2ee72b428d1d) -- [how to light up the dark forest by robert miller](https://writings.flashbots.net/writings/the-anatomy-of-an-inspector/) -- [hiding in plain sight by samczsun](https://samczsun.com/hiding-in-plain-sight/) -- [we live in a mempool by tom schmidt](https://medium.com/dragonfly-research/we-live-in-a-mempool-backrunning-the-mev-crisis-a4ea0b493b05) -- [wrecking sandwich traders for fun and profit](https://github.com/Defi-Cartel/salmonella) -- [tricking frontrunners into being transaction relayers](https://ethresear.ch/t/surrogeth-tricking-frontrunners-into-being-transaction-relayers/6937/1) -- [The enemy of your enemy is not your friend](https://fiona.mirror.xyz/QXdCOAggA5g_j5R_JpO-V5LqK89EbimnYIV6c2rOsT0) -- [anatomy of an mev strategy: synthetix by robert miller](https://bertcmiller.com/2021/09/05/mev-synthetix.html) -- [mev wat to do by phill daian ](https://pdaian.com/blog/mev-wat-do/) -- [mev the first 5 years by james prestwich](https://medium.com/@Prestwich/mev-c417d9a5eb3d) - +##### šŸ‘¾ maximal extractable value encompasses the profits generated by participant parties in the block production supply chain. for searchers, this revenue can be generated from arbitrage when reducing the price spread between markets, slippage loss of swap users, frontrunning users' transactions, among other [strategies](MEV_strategies). +##### šŸ’™ mev extraction can be a force of good in a non-predatory and [fair](https://twitter.com/bertcmiller/status/1456346690164768770) blockspace free-market as an incentive for economic security. every actor in the supply chain is relevant. order flow toxicity is a trader's exposure to counter-parties that possess private informational advantages. as everything in life, *[the most valuable commodity is information](https://frontier.tech/a-new-game-in-town)*. +##### šŸ“ā€ā˜ ļø this repository is an *on-going* catalog from my own research and development. if you are passionate about self-sovereignty and love solving complex problems, don't be intimidated: do your homework and join us (we need you).
--- - -## šŸŒ mev research -
-* [mev.day 2022](https://mevday.org/) -* [the daily ape on mev](https://thedailyape.notion.site/MEV-8713cb4c2df24f8483a02135d657a221) -* [cryptocurrency historical data snapshot](https://coinmarketcap.com/historical/) -* [mev wiki](https://www.mev.wiki/) -* [barnabe.eth on pbs](https://barnabe.substack.com/p/pbs) -* [mev extraction strategies](https://docs.google.com/presentation/d/1YVFLnh_MnDtDDQjucW-UKxLD28iGlyi_Pj1ri_hGqRs/edit#slide=id.g125078237b3_0_84) -* [mev auction](https://ethresear.ch/t/mev-auction-auctioning-transaction-ordering-rights-as-a-solution-to-miner-extractable-value/6788) +### I. learn (toxic and non-toxic) extraction strategies -
+##### atomic (tx ordering) -#### research papers +* **[sniping](MEV_strategies/sniping)** +* **[longtails](MEV_strategies/longtails)** +* **[atomic arbs](MEV_strategies/atomic_arb)** +* **[sandwiches](MEV_strategies/sandwich)** +* **[flashloans](MEV_strategies/flashloans)** +* **[jit liquidity](MEV_and_trading/protocols/uniswap/uniswap-v3/just-in-time.md)** +* **[liquidations](MEV_strategies/liquidations)** +* **[frontrunning](MEV_strategies/frontrunning)** +* **[backrunning](MEV_strategies/backrunning)** -- [flash boys 2.0](https://arxiv.org/pdf/1904.05234.pdf) -- [towards a theory of mev by diamandis et al](https://people.eecs.berkeley.edu/~ksk/files/MEV_CFMM.pdf) -- [transparent dishonesty: front-running attacks on blockchain](https://arxiv.org/pdf/1902.05164.pdf) -- [dex arbitrage, mathematical optimizations & me](https://noxx.substack.com/p/dex-arbitrage-mathematical-optimisations) -- [a list of open problems in defi by emperor](https://mirror.xyz/0xemperor.eth/0guEj0CYt5V8J5AKur2_UNKyOhONr1QJaG4NGDF0YoQ) -- [combining ghost and casper](https://arxiv.org/abs/2003.03052) -- [three attacks on pos ethereum](https://arxiv.org/abs/2110.10086) -- [two attacks on pos ghost/ethereum](https://arxiv.org/abs/2203.01315) -- [quantifying blockchain extractable value: how dark is the forest?](https://arxiv.org/pdf/2101.05511.pdf) + +##### statistical (informed signal) + + +* **[order flows](MEV_searchers/order_flows)** +* **[statistical arbs](MEV_strategies/stat_arbs)** +* **[defi and trading](MEV_and_trading)** +* **[cross-domain mev](MEV_searchers/cross_domain_mev)** +* **[oracles and twamm](MEV_strategies/oracles)** -
+### II. code up your (learning and experimental) bots ---- +* **[build your mev bot](MEV_searchers)** +* **[mempools monitoring](MEV_searchers/mempool_monitoring)** +* **[latency optimization](MEV_searchers/latency)** +* **[tx and signature explorers](MEV_searchers/tx_and_signature_explorers)** -## 🌭 bonus: š•žš•’š•œš•– š• š•— š•’ š•”š•Ŗš•”š•™š•–š•£š•”š•¦š•Ÿš•œ +### III. understand the chains and how mev differs on each of them -
- -* [a graduate course in applied cryptography](http://toc.cryptobook.us/) -* [the cypherpunk manifest by eric hughes](https://activism.net/cypherpunk/manifesto.html) -* [the crypto anarchist manifest by timothy c. may](https://nakamotoinstitute.org/crypto-anarchist-manifesto/) -* [the hacker manifest by the mentor](http://phrack.org/issues/7/3.html) -* [bitcoin whitepaper by satoshi nakamoto](https://bitcoin.org/bitcoin.pdf) -* [teal organizations](https://reinventingorganizationswiki.com/) -* [decentralization by vitalik](https://medium.com/@VitalikButerin/the-meaning-of-decentralization-a0c92b76a274) +* **[mev on solana](MEV_by_chains/MEV_on_Solana)** +* **[mev on bitcoin](MEV_by_chains/MEV_on_Bitcoin)** +* **[mev on ethereum](MEV_by_chains/MEV_on_Ethereum)** +* **[mev on cosmos](MEV_by_chains/MEV_on_Cosmos)** +* **[mev on polygon](MEV_by_chains/MEV_on_Polygon)** +* **[mev on arbitrum](MEV_by_chains/MEV_on_Arbitrum)** +* **[mev on optimism](MEV_by_chains/MEV_on_Optimism)** +* **[mev on bsc chain](MEV_by_chains/MEV_on_BSC)** +* **[mev on avalanche](MEV_by_chains/MEV_on_Avalanche)** -
-
+### IV. understand (and join) the space +* **[mev-related protocols](MEV_projects)** +* **[mev data and analytics](MEV_searchers/data_and_analytics)** +* **[research on order flows](MEV_searchers/order_flows)** +* **[yummy canonical papers](MEV_projects/history.md)** +* **[autistic cypherpunk toolkit](https://github.com/autistic-symposium/autistic-cypherpunk-toolkit)** diff --git a/anatomy_of_mev_bots/README.md b/anatomy_of_mev_bots/README.md deleted file mode 100644 index 43d6ecb..0000000 --- a/anatomy_of_mev_bots/README.md +++ /dev/null @@ -1,53 +0,0 @@ -## šŸ¤– anatomy of mev bots - -
- -### in this dir - -
- -##### bots - -* [101 bots (get started)](bots/101.md) -* [arbers](bots/arbers.md) -* [liquidators](bots/liquidators.md) -* [frontrunners](bots/frontrunners.md) -* [backrunners](bots/backrunners.md) -* [longtailors](bots/longtailors.md) -* [sandwichors](bots/sandwichors.md) -* [snipers](bots/snipers.md) -* [tradors](bots/tradors.md) -* [cow solvers](bots/cow-solvers.md) -* [statistical arbers](bots/stat-arbers.md) - - -
- -##### numbers $ - -* [profits of bots](profits) -* [costs of bots](deployment) - -
- - ---- - -### resources and tools - -
- -* [bundle generator](https://github.com/Alcibiades-Capital/mev_bundle_generator) -* [symbolic searcher](https://github.com/bzhang42/symbolic-searcher) -* [FairTraDEX](https://github.com/MEVProof/Contracts) -* [searcher-sponsored-tx](https://github.com/flashbots/searcher-sponsored-tx) -* [searcher-minter](https://github.com/flashbots/searcher-minter) -* [mev bot in q using kdb+](https://github.com/sambacha/q-evm) -* [build a mev bot by degatchi](https://www.degatchi.com/articles/how-to-build-a-mev-bot) -* [etherscan mev bot accounts](https://etherscan.io/accounts/label/mev-bot) -* [mev as an inner experience by nathan worsley](https://www.youtube.com/watch?v=9iHlyaRsgYI) -* [running a keeper with rook.fi](https://docs.rook.fi/reference/integrate/run-a-keeper) -* [running a solver with cowswap](https://mirror.xyz/steinkirch.eth/s_RwnRgJvK_6fLYPyav7lFT3Zs4W4ZvYwp-AM9EbuhQ) -* [resources for gas optimization](https://github.com/go-outside-labs/web3-solidity/blob/main/saving_gas/README.md) - - diff --git a/anatomy_of_mev_bots/bots/101.md b/anatomy_of_mev_bots/bots/101.md deleted file mode 100644 index df074d8..0000000 --- a/anatomy_of_mev_bots/bots/101.md +++ /dev/null @@ -1,5 +0,0 @@ -### 101 - -* [flashbots-demo](https://github.com/0xblocks/flashbots-demo) -* [seacher for compromised priv keys](https://github.com/flashbots/searcher-sponsored-tx) -* [mev-template-rs](https://github.com/degatchi/mev-template-rs) diff --git a/anatomy_of_mev_bots/bots/backrunners.md b/anatomy_of_mev_bots/bots/backrunners.md deleted file mode 100644 index 68ad859..0000000 --- a/anatomy_of_mev_bots/bots/backrunners.md +++ /dev/null @@ -1,4 +0,0 @@ -### backrunners - -* [synthetix bot](https://github.com/bertmiller/sMEV) -* [0xbad](https://rekt.news/ripmevbot/) diff --git a/anatomy_of_mev_bots/bots/cow-solvers.md b/anatomy_of_mev_bots/bots/cow-solvers.md deleted file mode 100644 index bb57558..0000000 --- a/anatomy_of_mev_bots/bots/cow-solvers.md +++ /dev/null @@ -1,4 +0,0 @@ -### cow solvers - -* [cow solver template](https://github.com/cowprotocol/solver-template-py) -* [cowsol](https://github.com/MEV-WAIFU-LABS/cow_arbitrage_solver) diff --git a/anatomy_of_mev_bots/bots/frontrunners.md b/anatomy_of_mev_bots/bots/frontrunners.md deleted file mode 100644 index d8701c1..0000000 --- a/anatomy_of_mev_bots/bots/frontrunners.md +++ /dev/null @@ -1,3 +0,0 @@ -### frontrunners - -* [cake sniper](https://github.com/Supercycled/cake_sniper) diff --git a/anatomy_of_mev_bots/bots/liquidators.md b/anatomy_of_mev_bots/bots/liquidators.md deleted file mode 100644 index 7f0412a..0000000 --- a/anatomy_of_mev_bots/bots/liquidators.md +++ /dev/null @@ -1,6 +0,0 @@ -### liquidators - -* [liquidation bot for Aave V3](https://github.com/massun-onibakuchi/grim-reaper) -* [ftx-factorial liquidation bot](https://github.com/fxfactorial/liquidation-bot-fall-2020) -* [liquidation aave protocol example](https://github.com/ialberquilla/aave-liquidation) -* [liquidator-v3](https://github.com/blockworks-foundation/liquidator-v3) diff --git a/anatomy_of_mev_bots/bots/longtailors.md b/anatomy_of_mev_bots/bots/longtailors.md deleted file mode 100644 index e322387..0000000 --- a/anatomy_of_mev_bots/bots/longtailors.md +++ /dev/null @@ -1,5 +0,0 @@ -### longtailors - -* [ape bot](https://github.com/duckdegen/apebot) -* [binance alpha bot](https://github.com/duckdegen/apebot) -* [globinmode longtail nft](https://github.com/Anish-Agnihotri/goblinmode) diff --git a/anatomy_of_mev_bots/bots/sandwichors.md b/anatomy_of_mev_bots/bots/sandwichors.md deleted file mode 100644 index d5d1284..0000000 --- a/anatomy_of_mev_bots/bots/sandwichors.md +++ /dev/null @@ -1,4 +0,0 @@ -### sandwichors - -* [optimal sandwich](https://github.com/mevcheb/optimal-sandwich) -* [subway](https://github.com/libevm/subway) diff --git a/anatomy_of_mev_bots/bots/snipers.md b/anatomy_of_mev_bots/bots/snipers.md deleted file mode 100644 index 3695110..0000000 --- a/anatomy_of_mev_bots/bots/snipers.md +++ /dev/null @@ -1,4 +0,0 @@ -### snipers - -* [limit sniper](https://github.com/CryptoGnome/Limit-Sniper) -* [pool-sniper](https://github.com/Anish-Agnihotri/pool-sniper) diff --git a/anatomy_of_mev_bots/bots/stat-arbers.md b/anatomy_of_mev_bots/bots/stat-arbers.md deleted file mode 100644 index eaed01e..0000000 --- a/anatomy_of_mev_bots/bots/stat-arbers.md +++ /dev/null @@ -1,4 +0,0 @@ -### statistical arbers - - -* [cointegrator bots](https://github.com/go-outside-labs/blockchain-science-py) diff --git a/anatomy_of_mev_bots/bots/tradors.md b/anatomy_of_mev_bots/bots/tradors.md deleted file mode 100644 index 178128f..0000000 --- a/anatomy_of_mev_bots/bots/tradors.md +++ /dev/null @@ -1,3 +0,0 @@ -### tradors - -* [hummingbot trading bots](https://hummingbot.org/) diff --git a/anatomy_of_mev_bots/deployment/2022.md b/anatomy_of_mev_bots/deployment/2022.md deleted file mode 100644 index 0a9713f..0000000 --- a/anatomy_of_mev_bots/deployment/2022.md +++ /dev/null @@ -1,14 +0,0 @@ -## 2022: notes on costs for deploying and running bots - -
- -* the cost of sandwich bots tend to be higher than arb and jit, and the proportion of revenue allocated to miners has grown significantly, approaching 90% in october ([source](https://eigenphi.io/report/mev-impact-on-uniswap)) - - -
- -Screen Shot 2022-12-20 at 10 09 56 AM - - - -
diff --git a/anatomy_of_mev_bots/deployment/README.md b/anatomy_of_mev_bots/deployment/README.md deleted file mode 100644 index c532bde..0000000 --- a/anatomy_of_mev_bots/deployment/README.md +++ /dev/null @@ -1,16 +0,0 @@ -## bots costs data - -
- -### in this dir - -
- -* [2022](2022.md) - - -
- -### resources - -* [eigenphi market overview and performance of mev types](https://beta.eigenphi.io/) diff --git a/anatomy_of_mev_bots/profits/README.md b/anatomy_of_mev_bots/profits/README.md deleted file mode 100644 index a38236c..0000000 --- a/anatomy_of_mev_bots/profits/README.md +++ /dev/null @@ -1,20 +0,0 @@ -## bots profit data - -
- -### in this dir - -
- -* [2022](2022.md) - - -
- ---- - -### resources - -
- -* [eigenphi profit leaderboard](https://beta.eigenphi.io/mev/eigentx) diff --git a/arbitrage/README.md b/arbitrage/README.md deleted file mode 100644 index c0873cf..0000000 --- a/arbitrage/README.md +++ /dev/null @@ -1,40 +0,0 @@ -## 🄯 arbitrage - -
- -### tl;dr - -
- - -* liquidity on-chain is fragmented: there are thousands of uniswap-like pools that don't communicate with each other, each providing quotes for swapping assets in real time. fragmented liquidity creates opportunity to buy low and sell high accross different pools. - -* arbitrage refers to the simultaneous buying and selling of tokens in different markets -in order to take advantage of price discrepancies of that asset. - -* the simplest MEV opportunity: two DEXes offering a token at two different prices, someone can buy the token on the lower-priced DEX and sell it on the higher priced DEX in a single atomic transaction. - -* atomicity is what makes things different in defi: the blockchain's state updates on a block-by-block basis, which means that a tx can perform multiple actions, provided that the end state of the tx is correct (flash loans) - -* most of the atomic arbitrage space is dominated by a few addresses, who land most of the profitable arbs. this is a very competitive space, and success is derived from a mixture of cleverness, low latency and good infrastructure. - -
- ----- - -### in this dir - -
- -* [arbitrage patterns](patterns) -* [cool arb txs in the wild](mev_bots_wild) - - -
- ----- - -### resources - - - diff --git a/arbitrage/patterns/triangle.md b/arbitrage/patterns/triangle.md deleted file mode 100644 index cf41133..0000000 --- a/arbitrage/patterns/triangle.md +++ /dev/null @@ -1 +0,0 @@ -## triangle pattern diff --git a/back_running/README.md b/back_running/README.md deleted file mode 100644 index fff5a21..0000000 --- a/back_running/README.md +++ /dev/null @@ -1,37 +0,0 @@ -## 🄪 back-running (tailgating) - -
- - -### tl; dr - -* backrunners predict trade opportunities that will mine into a future block based on the outcome of another user's trade. -* it occurs when a transaction sender wishes to have their tx ordered immediately after some unconfirmed 'target tx'. -* a typical backrunner will send many identical txs, with gas price identical to that of the target tx, sometimes from different accounts, in order to increase the chances that one of their txs is ordered after the target but before any competitor (snipping). - -
- ---- - -### strategy - -
- -* a back-running bot that back-runs new token listings. -* it monitors the mempool for new pairs being created on uniswap, if it finds a new pair the bot places a buy transaction imediately behind the initial liquidity. -* the bot swoops in and buys as many tokens as possible (but not all them as there needs to be an opportunity for others to buy tokens) -* the bot waits for the price to go up and other traders buy the token from uniswap and proceeds to sell back the tokens at a higher price -* the key strategy is to be the first to buy tokens, but only after it has been launched. - -
- ---- - -### resources - -
- -* [dune for Portion of Daily Gas Used by Backrunning Bot Contracts](https://dune.com/phabc/backrunning-bots-gas-consumption) -* [backrunning study for bZx IDO](https://amanusk.medium.com/the-fastest-draw-on-the-blockchain-bzrx-example-6bd19fabdbe1) -* [ef discussion on random ordering of equally-priced txs](https://github.com/ethereum/go-ethereum/issues/21350) - diff --git a/cow_protocol/README.md b/cow_protocol/README.md deleted file mode 100644 index a48eae7..0000000 --- a/cow_protocol/README.md +++ /dev/null @@ -1,38 +0,0 @@ - -# šŸ® cow protocol - -
- -* [bot #1: cowsol, an arb solver for CoW protocol](https://mirror.xyz/mevwaifu.eth/s_RwnRgJvK_6fLYPyav7lFT3Zs4W4ZvYwp-AM9EbuhQ) -* [resources on cow swap](https://github.com/go-outside-labs/mev/blob/main/cow_protocol/cow_swap.md) - -
- - - -## resources - - -#### articles -* [cow.fi](https://cow.fi/) -* [cow protocol forum](https://forum.cow.fi/) -* [gnosis on cow protocol](https://docs.google.com/presentation/d/1vClubmyECHzYpT7-DzU6D45bc7iNpjF1NuiEblY-8ZQ/edit#slide=id.ge33f22559c_0_580) -* [dune boards for cow.fi and gnosis protocol](https://forum.cow.fi/t/cow-fi-analytics/369) -* [EIP-1271 for smart orders on cowswap](https://www.youtube.com/watch?v=6zj0_E8JWPQ) -* [useful cowswap resources](https://hackmd.io/@chenm/HJqjdkjvt) -* [yearn <> cowswap](https://medium.com/iearn/yearn-cow-swap-371b6d7cf3b3) - -
- -#### solvers - -* [yearn cow solver](https://medium.com/iearn/yearn-cow-swap-371b6d7cf3b3) - - - -
- -#### talks - -* [Examining the Potential of Frequent Batch Auctions in Ethereum by Anna George](https://www.youtube.com/watch?v=qSdE4LrPjG0) -* [cow swap at mev.wtf 2022](https://docs.google.com/presentation/d/1vClubmyECHzYpT7-DzU6D45bc7iNpjF1NuiEblY-8ZQ/edit#slide=id.ge33f22559c_0_580) diff --git a/cow_protocol/cow_swap.md b/cow_protocol/cow_swap.md deleted file mode 100644 index ba259b9..0000000 --- a/cow_protocol/cow_swap.md +++ /dev/null @@ -1,11 +0,0 @@ -## cow swap - -
- -Screen Shot 2022-10-19 at 8 11 15 PM - - -
- -* [cow swap](https://swap.cow.fi/#/faq?chain=mainnet) is the first trading interface built on top of cow protocol. -* it's a meta dex aggregator that allows you to buy and sell tokens using gasless orders that are settled p2p among users or into any on-chain liquidity while providing mev protection. diff --git a/cross_domain_mev/README.md b/cross_domain_mev/README.md deleted file mode 100644 index 339ba0a..0000000 --- a/cross_domain_mev/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## cross-domain mev - -### tl; dr - -* currently, the largest form of cross-domain MEV is by arbitrageurs extracting loss-versus-rebalancing (LVR) from liquidity providers - - -
- ---- - -### resources - -* [westerngate.xyz](https://westerngate.xyz/) -* [unity is strength by obadia et al](https://arxiv.org/pdf/2112.01472.pdf) -* [studying cross-domain MEV by alex obadia](https://www.youtube.com/watch?v=dv5-Lzntv5M) -* [amm and loss-versus-rebalancing](https://arxiv.org/abs/2208.06046) -* [discussion on multiblock mev](https://mirror.xyz/0x7c855e1bF411Ab5975235bC8C74E032615073044/j8bEbeLIv1Ih6naZod2KLyAPIrdvw45nOL7Qu22QqLk) diff --git a/defi_and_trading/README.md b/defi_and_trading/README.md deleted file mode 100644 index aa60f59..0000000 --- a/defi_and_trading/README.md +++ /dev/null @@ -1,107 +0,0 @@ -## defi - - -
- -### in this dir - -* [bridges](bridges) -* [day-trading](day-trading) -* [derivatives](derivatives) -* [liquidity](liquidity) -* [stablecoins](stablecoins) -* [staking](staking) -* [whales](whales) -* [vaults](vaults) - -
- - ---- - - - -### protocols - -* [Yearn finance](https://yearn.finance/#/portfolio) -* [Stader Labs](https://staderlabs.com/) -* [Hop](https://app.hop.exchange/#/send?token=ETH) -* [Aave](https://app.aave.com/) -* [Synapse bridge](https://synapseprotocol.com/?inputCurrency=ETH&outputCurrency=ETH&outputChain=10) -* [Popsicle finance](https://popsicle.finance/) -* [Matcha](https://matcha.xyz/) -* [Beefy](https://app.beefy.finance/#/) -* [Maple](https://www.maple.finance/) -* [Tokemak](https://www.tokemak.xyz/) -* [DeFi helper](https://app.defihelper.io/protocols?filter=All) -* [Curve finance](https://curve.fi/mim/) -* [Fei proocol](https://fei.money/) -* [Stakewise](https://app.stakewise.io/) -* [Lido](https://lido.fi/) -* [Oasis.app](https://oasis.app/) -* [Compound](https://app.compound.finance/) -* [Euler](https://www.euler.finance/) -* [Elementifi](https://app.element.fi/fixedrates) -* [Fodl](https://app.fodl.finance/nft) -* [Zapper](https://zapper.fi/invest) -* [TraderJoe](https://traderjoexyz.com/farm#/) -* [Vesta](https://vestafinance.xyz/) -* [TracerDAO](https://github.com/tracer-protocol) -* [Step.finance](https://app.step.finance/#/dashboard) -* [Orca staking](https://www.orca.so/staking) -* [Solidly](https://solidly.exchange/liquidity) -* [SolanaBeach](https://solanabeach.io/) -* [Rose](https://app.rose.fi/#/) - -
- - ---- - -### indexes and asset management - - - -* [Bancor](https://app.bancor.network/pools) -* [dydx](https://trade.dydx.exchange/portfolio/overview) -* [Kwenta](https://kwenta.io/exchange/sETH-sUSD) -* [Augur](https://augur.net/) -* [CREAM](https://app.cream.finance/) -* [Paraswap](https://www.paraswap.io/) -* [Synthetix](https://synthetix.io/) -* [Pool providers](https://vfat.tools/) -* [Arch finance](https://beta.archfinance.io/) -* [Tokensets](https://www.tokensets.com/) -* [Fracium](https://francium.io/) -* [Babylon](https://www.babylon.finance/) -* [Indexcoop](https://indexcoop.com/) -* [Token terminal](https://tokenterminal.com/terminal) -* [FTX](https://ftx.us/?fromIntl=true) -* [MarketCipher](https://marketciphertrading.com/) -* [HotBit](https://www.hotbit.io) -* [Cointelegraph](https://subscriptions.cointelegraph.com/marketspro-cpc/) -* [Slingshot](https://app.slingshot.finance/trade/m/MATIC) -* [GMX](https://gmx.io/trade) -* [rotki](https://rotki.com/) -* [crystal](https://defi.krystal.app/) -* [tokenset](https://www.tokensets.com/) -* [index](https://indexcoop.com/) - -
- - ---- - -### tools, news, resources - -* [insight over several protocols](https://defi-mochi.notion.site/d2cf08cb79254dcf8f30e08cc38761f4?v=81df8226157849ee94a1c859c1e13329) -* [defi pulse](https://www.defipulse.com/) -* [defi prime](https://defiprime.com/) -* [defi llama](https://defillama.com/) -* [dex screener](https://dexscreener.com/) -* [impermanent Loss simulator for balancer pools](https://baller.netlify.app/) -* [eth hub on defi](https://docs.ethhub.io/built-on-ethereum/open-finance/what-is-open-finance/) -* [l2 beat](https://l2beat.com/scaling/tvl/) -* [Ultimate DeFi & Blockchain Research Base](https://github.com/OffcierCia/ultimate-defi-research-base) -* [defi tokens wiki](https://github.com/defi-wikis/defi-tokens-wiki) -* [token unlocks 2023](https://twitter.com/karl_0x/status/1605832705848971264) diff --git a/defi_and_trading/day-trading/README.md b/defi_and_trading/day-trading/README.md deleted file mode 100644 index ec971d0..0000000 --- a/defi_and_trading/day-trading/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# trading - -### in this dir - -* [order types](order_types) -* [trading types](trading_types) -* [techical analysis](technical_analysis) -* [leverage](leverage) - -
- ---- - -### resources - -* [how to read candlesticks charts](https://www.youtube.com/watch?v=9fqBykOBeCg) diff --git a/defi_and_trading/defi-glossary.md b/defi_and_trading/defi-glossary.md deleted file mode 100644 index 81a8f80..0000000 --- a/defi_and_trading/defi-glossary.md +++ /dev/null @@ -1,62 +0,0 @@ -## šŸ‘©šŸ»ā€šŸ« DeFi glossary - -
- - - -* Fully diluted valuations (FDV): the total number of tokens multiplied by the current price of a single token. - -* Market capitalization (MC): the number of tokens that are available in the market, multiplied by the price of a single token. - -* Airdrop: ā€œfree moneyā€. - -* AML: anti-money laundering. Refers to the laws, regulations and procedures intended to prevent criminals from disguising illegally obtained funds as legitimate income. - -* Contract account: a blockchain account controlled by code and can be activated only by an EOA. - -* DEX arbitrage: happens when two DEXe are offering a token at two different prices and one can buy the token on the lower-priced DEX and sell it on the higher-priced DEX. - -* Doxxing: act of publicly revealing previously private personal information. - -* EOA: externally owned account. An account which is a combination of public address and private key. You can use these accounts to send and receive Ether to/from another account. - -* FATF: Financial Action Task Force. - -* Liquidation: when the value of a borrowed asset exceeds the collateral and anyone can liquidate the collateral and collect the liquidation fee for themselves. - -* Mempool: (a contraction of memory and pool) is a cryptocurrency node’s mechanism for storing information on unconfirmed transactions. - -* Merkle tree: a type of binary tree, composed of: 1) a set of notes with a large number of leaf nodes at the bottom of the containing the underlying data, 2)a set of intermediate nodes where each node is the hash of its two children, and 3) a single root node, also formed from the hash of its two children, representing the top of the tree. - -* Minting: computer process of validating information, creating a new block and recording that information into the blockchain. - -* Multi-sig: Short for multi-signature wallet, a type of onchain wallet where multiple signers must sign for a transaction to be executed. - -* Nonce: an abbreviation for "number only used once," which, in the context of cryptocurrency mining, is a number added to a hashed—or encrypted—block in a blockchain that, when rehashed, meets the difficulty level restrictions. The nonce is the number that blockchain miners are solving for. When the solution is found, the blockchain miners are offered cryptocurrency in exchange. - -* OSINT: Open-source intelligence is a term used to refer to any information which may be freely gathered from public sources; generally it refers to information that can be found on the internet. - -* Pentests: A pentest is short for a penetration test, wherein security experts attempt to break into a protected computer system and disclose results so that they can be mitigated. - -* Sandwich attack: when slippage value is not set, this attack can happens by an actor bumping the price of an asset to an unfavorable level, executing the trade, and then returning the asset to the original price. - -* Sats: short for ā€œsatoshis,ā€ a term derived from the first name of Satoshi Nakamoto. It refers to the smallest fraction of a bitcoin that can be sent, which is 0.00000001 of a bitcoin. - -* Shitcoin: to talk about projects that are well...shit. - -* Slippage: delta in pricing between time of order and when order is executed. - -* Stablecoin: digital currency pegged to a 'stable' reserve asset like the USD or gold. Stablecoins are designed to reduce volatility relative to unpegged cryptocurrencies like Bitcoin. Swap pair = ā€œtrading pairsā€ or ā€œcryptocurrency pairsā€ are assets that can be traded for each other on an exchange. - -* Tabnabbing (a sophisticated phishing attack). - -* Testnet: instance of a blockchain powered by the same or a newer version of the underlying software, to be used for testing and experimentation without risk to real funds or the main chain. - -* TVL: Total value locked. Value of all tokens locked in various DeFi protocols such as lending platforms, DEXes, or derivatives protocols. - -* VASPs: virtual assets and virtual asset service providers. - -* Gwei: a small unit of the Ethereum network's Ether (ETH) cryptocurrency. A gwei or gigawei is defined as 1,000,000,000 wei, the smallest base unit of Ether. Conversely, 1 ETH represents 1 billion gwei. - -* Whales: individuals or institutions who hold large amounts of coins of a certain cryptocurrency; can become powerful enough to manipulate the valuation. - diff --git a/defi_and_trading/derivatives/README.md b/defi_and_trading/derivatives/README.md deleted file mode 100644 index 9721e86..0000000 --- a/defi_and_trading/derivatives/README.md +++ /dev/null @@ -1,69 +0,0 @@ -## 🄬 derivatives - -
- -### perpetual swap - -* trading product first introduced in 2016 by bitmex -* has become popular with trading volumes of over $180 mi -* offer traders a chance to take on large positions with little money down -* like other types of derivatives such as futures and options, perpetual swaps provide a means to speculate on the value of the assets while the contract is held -* unlike future contracts, perpetual swaps do not have expiration dates - - - -
- ----- - -## synthetix - -* [Synthetix](https://synthetix.io/) is one of the Ethereum's ecosystem's leading derivatives projects. -* It's a derivative liquidity protocol that powers the creation of "synths" (synthetic assets) that can be traded in a decentralized and permissionless manner. -* Synths let traders capitalize on exposure to assets without having to directly own the assets in question. -* Some of Synthetix's most popular synths are its forex synths: sUDS and sEUR. -* A foundational element of Synthetix is SNX staking, which is used for collateralizing the derivatives protocol and for creating deep liquidity for synths. -* SNX stakers earn inflationary SNX rewards and a cut of sUSD fees generated by protocols that work on top of Synthetix. - -
- ---- - -### kwenta - -* The primary DEX in the Synthetix ecosystem. -* Designed to facilitate zero-slippage synth trading. -* It does not rely on an orderbook or liquidity pool model, but instead the DEX employs a peer-to-contract system in which synths are traded against a smart contract informed by Chainlink price feeds. - -
- - ---- - -### Lyra - -* Lyra is a decentralized options trading protocol powered by a specialized AMM system. -* It uses Synthetix's sUSD stablecoin as its exclusive quote asset, so traders pay for opening long positions or closing short positions with sUSD. -* Lyra also uses Synthetix as a one-stop protocol for getting long and short exposure on its markets' base assets (delta hedging). - -
- - ---- - -### Thales - -* Decentralized binary options protocol that a group of Synthetix community members spun in 2020. -* If held until expiry, binary options have only two payoff possibilities: a predetermined amount of profit or nothing. -* Relies on Synthetix's sUSD stablecoin for minting its binary options tokens and as the platform's unit of account. - -
- ---- - -### resources - -* [defi derivative landscape](https://github.com/0xperp/defi-derivatives) -* [put-call parity](https://www.investopedia.com/terms/p/putcallparity.asp#:~:text=Understanding%20Put%2DCall%20Parity,-As%20noted%20above&text=Put%2Dcall%20parity%20states%20that,to%20the%20option's%20strike%20price.) - - diff --git a/defi_and_trading/liquidity/tokemak.md b/defi_and_trading/liquidity/tokemak.md deleted file mode 100644 index 0d420c5..0000000 --- a/defi_and_trading/liquidity/tokemak.md +++ /dev/null @@ -1,10 +0,0 @@ -## Notes on Tokemak - -
- -* protocol designed to generate liquidity for DeFi and future tokenized Dapps coming up in the space. -* It's a decentralized market making platform that allowe liquidity flows and provides an easy way to liquidity. -* It has reactors that host staked assets on each side of the pools. -* Participants are broken down into 3 components: LP (providing assets), Liquidity directos (direct assets), and pricers (third party pricers for non-AMM venues). -* Tokemak locks up ETH and USDC which are base tokens that any pool could be built on. Users deposit these base assets for APR paid out in TOKE. -* TOKE can be thought of as tokenized liquidity. diff --git a/defi_and_trading/stablecoins/README.md b/defi_and_trading/stablecoins/README.md deleted file mode 100644 index 69b727a..0000000 --- a/defi_and_trading/stablecoins/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## šŸ’° stablecoins - -
- -Screen Shot 2022-10-07 at 1 32 54 PM - - -
- -### tl, dr - -
- -#### fiat-collateralized stablecoins - -* Fiat-collateralized stablecoins are stablecoins that are backed by fiat currencies like the US dollar. -* Their reserves are held by a central entity. The most popular fiat-backed stablecoins at this time are USDC, USDT, and BUSD.Ā  -* The main weakness of fiat-collateralized stablecoin is centralization as the collateral of a fiat-collateralized stablecoin is held by one independent party. - -
- -#### cryptocurrency-backed stablecoins - -* This motivated the development of more decentralized, cryptocurrency-backed stablecoin. -* The main player in this category today is MakerDAO’s Dai stablecoin. -* While crypto-backed stablecoins are good for their decentralization, they are capital inefficient. ' - -
- -#### decentralized (algorithmic) stablecoins - -* The average consumer or institutional investor would rather mint 1:1 through a centralized fiat stablecoin than have to over-collateralize by at least 150% to issue a decentralized stablecoin. -* For this reason, developers set out to create non-collateralized (or algorithmic) stablecoins. -* These coins maintain their peg without having to directly collateralize the issuance. -* The two largest forces in the market in this category are Terra and Fei. - -
- ---- - -### resources - -
- -* [high level intro from ethereum.org](https://ethereum.org/en/stablecoins/) diff --git a/defi_and_trading/staking/README.md b/defi_and_trading/staking/README.md deleted file mode 100644 index 47b35bf..0000000 --- a/defi_and_trading/staking/README.md +++ /dev/null @@ -1,14 +0,0 @@ -## Stacking - - -
- -### ETH - -
- -* [Lido](https://github.com/bt3gl-labs/Blockchain-DeFi-and-MEV/blob/main/DeFi/staking/Lido.md) -* [Stakewise](https://github.com/bt3gl-labs/Blockchain-DeFi-and-MEV/blob/main/DeFi/staking/Stakewise.md) -* [RockePool](https://rocketpool.net/) -* [StakeUS](https://staked.us/) -* [Bitcoin Suisse](https://www.bitcoinsuisse.com/staking) diff --git a/defi_and_trading/whales/README.md b/defi_and_trading/whales/README.md deleted file mode 100644 index 1ac3f0a..0000000 --- a/defi_and_trading/whales/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## List of whale wallets - -
- -* https://zapper.fi/account/0x6555e1cc97d3cba6eaddebbcd7ca51d75771e0b8 diff --git a/flashbots/README.md b/flashbots/README.md deleted file mode 100644 index 874e681..0000000 --- a/flashbots/README.md +++ /dev/null @@ -1,43 +0,0 @@ -## šŸ¤–šŸ”Ŗ flashbots - -
- -### tl;dr - -
- -* flashbots is a research and development organization focused on mitigating the negative externalities of current MEV extraction techniques and avoiding the existential risks MEV could cause to state-rich blockchains like Ethereum. - - -
- ----- - -### dirs in this repo - -
- -* [some scripts](scripts) -* [some tools](tools) -* [mev-boost stuff](mev-boost) -* [suave stuff](suave) - - - - - -
- ---- - -### resources - -- [how to use flashbots](https://cryptomarketpool.com/how-to-use-flashbots/) -- [flashbots bundler explorer](https://flashbots-explorer.marto.lol/) -- [flashbots: frontrunning the mev crisis by thegostep](https://ethresear.ch/t/flashbots-frontrunning-the-mev-crisis/8251) -- [order flows kingmaker of block builders by noxx](https://noxx.substack.com/p/order-flows-kingmaker-of-the-block) -- [data analysis of Flashbots MEV](https://github.com/ivanmolto/mev-flashbots-unleashed) -- [flashbots' transparency board](https://transparency.flashbots.net/) -- [flashbots' research topics](https://github.com/flashbots/mev-research) - - diff --git a/flashbots/scripts/README.md b/flashbots/scripts/README.md deleted file mode 100644 index 36c5a80..0000000 --- a/flashbots/scripts/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## šŸ”Ŗ useful scripts - -
- -* [flashbots bundle](https://github.com/bt3gl-labs/Blockchain-DeFi-and-MEV/blob/main/MEV/scripts/flashbots-bundle.py) - for full instructions, see [this post](https://lilithsecurity.substack.com/p/-mev-wednesdays-intro-to-flashbots). diff --git a/flashbots/suave/README.md b/flashbots/suave/README.md deleted file mode 100644 index 494e7f0..0000000 --- a/flashbots/suave/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## Flashbots' SUAVE - -
- ---- - -### Resources - -* [Their first article designing SUAVE](https://writings.flashbots.net/the-future-of-mev-is-suave) diff --git a/flashbots/tools/README.md b/flashbots/tools/README.md deleted file mode 100644 index 442f8ee..0000000 --- a/flashbots/tools/README.md +++ /dev/null @@ -1,25 +0,0 @@ -## 🧯 tools - -
- - -### [mev-inspect-py](https://github.com/flashbots/mev-inspect-py) - -
- -* tool to inspect maximal extractable value for Ethereum: mev-inspect-py. If shows: miner payments, tokens transfers and profit, swaps and arbritages. - -* pre-requisites: - - k8s's kind - - docker - - helm - - an RPC_URL - -
- - -### other resources - -
- -* [mev bundle generator](https://github.com/Alcibiades-Capital/mev_bundle_generator) diff --git a/flashbots/tools/tool.md b/flashbots/tools/tool.md deleted file mode 100644 index a462d83..0000000 --- a/flashbots/tools/tool.md +++ /dev/null @@ -1 +0,0 @@ -Screen Shot 2022-10-23 at 8 51 01 PM diff --git a/flashloans/README.md b/flashloans/README.md deleted file mode 100644 index bcdb059..0000000 --- a/flashloans/README.md +++ /dev/null @@ -1,28 +0,0 @@ - -## flashloan - -
- -### tl; dr - - -
- ---- - -### in this dir - - -* [flashloan smart contracts](smart_contracts) -* [protocols](protocols) - -
- ---- - -### resources - -* [flashloans dashboard by eigeinphi](https://eigenphi.io/mev/ethereum/flashloan) -* [tfusd flashloan writeup](https://github.com/Jonah246/tfusd-flashloan-attack-write-up) -* [defi hacks: flashloans](https://wooded-meter-1d8.notion.site/0e85e02c5ed34df3855ea9f3ca40f53b?v=22e5e2c506ef4caeb40b4f78e23517ee) - diff --git a/flashloans/protocols/README.md b/flashloans/protocols/README.md deleted file mode 100644 index caba9f5..0000000 --- a/flashloans/protocols/README.md +++ /dev/null @@ -1,21 +0,0 @@ -## flashloans protocols - -
- -### balancer - - -
- - -### dydx - - -
- -### aave - - -
- -### uniswap v3 diff --git a/front_running/FaaS.md b/front_running/FaaS.md deleted file mode 100644 index bbf7999..0000000 --- a/front_running/FaaS.md +++ /dev/null @@ -1,9 +0,0 @@ -## Front-running as a service - - -
- -### resources - - -* [Miners, Front-Running-as-a-Service Is Theft](https://www.coindesk.com/markets/2021/04/07/miners-front-running-as-a-service-is-theft/) diff --git a/front_running/README.md b/front_running/README.md deleted file mode 100644 index 7ac5380..0000000 --- a/front_running/README.md +++ /dev/null @@ -1,29 +0,0 @@ -## 🄩 frontrunning (or PGA, priority gas auction) - -
- -### tl, dr - -
- -* determine what gas price is required to win a gas auction. - -* process by which an adversary observes transactions on the network layer and then acts upon this information by, for instance, issuing a competing transaction, with the hope that this transaction is mined before a victim transaction. - - -* example: transaction A is broadcasted with a higher gas price than an already pending transaction B so that A gets mined before B. - - -* rather than programming complx algorithms to detect profitable MEV opportunities, some searchers run generalized frontrunners. These are bots that watch the mempool to detect profitable transactions. - - -* frontrunners will copy the potentially profitable transaction's code and replace addresses with theirs. Then, they submit the modified transaction with the replaced address and a higher gas price, frontrunning the original transaction and getting the searcher's MEV. - -
- ---- - -### resources - - -* [shutter frontrunning protection](https://github.com/shutter-network/shutter) diff --git a/latency/README.md b/latency/README.md deleted file mode 100644 index 909a208..0000000 --- a/latency/README.md +++ /dev/null @@ -1,11 +0,0 @@ -## Notes on latency optimization - -### tl; dr - -
- ---- - -### Resources - -* [manifold's openmev latency benchmarking](https://docs.openmev.org/technical-reference/benchmarking) diff --git a/liquidations/README.md b/liquidations/README.md deleted file mode 100644 index 4f44d4e..0000000 --- a/liquidations/README.md +++ /dev/null @@ -1,39 +0,0 @@ -## šŸ§€ liquidations - -
- -### tl, dr - -* Lending protocol (e.g. Aave or Maker) liquidations present a well-known MEV opportunity. - -* They work by requiring users to deposit some collateral. Users can then borrow different assets and toekns from others depending on what they need, up to a certain amount of their deposited collateral. - -* As the value of a borrower's collateral fluctuates, if the value of the borrowed assets exceeds the value of the collateral, the protcol allows anyone to liquidate the collateral (similar to margin calls in traditional finance). - -* If liquidated, the borrower usually has to pay a hefty liquidation fee, some of which goes to the liquidator (where the MEV opportunity comes in). - -* Searchers compete to parse blockchain data as fast as possible to determine which borrowers can be liquidated and be the first to submit a liquidation transaction and collect the liquidation fee. - -
- -### strategy 1 - -* A detects a liquidation opportuniy at block B (after the execution of B). Then, A issues a liquidation transaction T, which is expected to be mined in the next block, B+1. -* A attempts to destructively front-run other competing liquidators by setting high transactions fees for their liquidation transaction T. - -
- -### strategy 2 - -* A observes a transaction T, which will create a liquidation opportunity (e.g., an oracle price update transaction which will render a collaterized debit liquidatable). A then back-runs T with a liquidation transaction Ti to avoid the transation fee bidding competition. - - -
- ---- - -## resources - -* [liquidation dashboard by eigenphi](https://eigenphi.io/mev/ethereum/liquidation) -* [understanding compound's liquidation](https://zengo.com/understanding-compounds-liquidation/) -* [forbes on nahtan worsley's liquidation strategies](https://www.forbes.com/sites/jeffkauflin/2022/10/11/the-secretive-world-of-mev-where-crypto-bots-scalp-investors-for-big-profits/?sh=25489eda2d8d) diff --git a/nft_arbitrage/README.md b/nft_arbitrage/README.md deleted file mode 100644 index fc57bd6..0000000 --- a/nft_arbitrage/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## 🄪 nft arbitrage - -
\ No newline at end of file diff --git a/oracles/README.md b/oracles/README.md deleted file mode 100644 index 682c0ae..0000000 --- a/oracles/README.md +++ /dev/null @@ -1,22 +0,0 @@ -## šŸ‹ oracles - -
- -### tl;dr - -* price oracles are any tool showing an asset's price but in context of defi. -* oracles provide a trustless way of getting extrinsic (off-chain) information, they provide the some key functions such as collect data from an off-chain source, transfer the data on-chain with a signed message, and make the data available by putting it in a smart contract’s storage. - - -
- ---- - -### in this repo - - -* [chainlink](chainlink.md) -* [TWAP oracles](twap.md) -* [TWAMM designs](twamm.md) - - diff --git a/oracles/chainlink.md b/oracles/chainlink.md deleted file mode 100644 index 70a3583..0000000 --- a/oracles/chainlink.md +++ /dev/null @@ -1,13 +0,0 @@ -## chainlink - -
- -A decentralized oracle network consisting of three key smart contracts: - -* a reputation contract: keep track of data providers' performance. -* an order-matching contract: selects bids from oracles using the reputation contract. -* an aggregation contract—and an off-chain registry of data providers. - - -One of the main challenges with such a decentralized approach is the formulation of the aggregation function. -ChainLink proposes calculating a weighted response, allowing a validity score to be reported for each oracle response. diff --git a/oracles/twamm.md b/oracles/twamm.md deleted file mode 100644 index b0c393e..0000000 --- a/oracles/twamm.md +++ /dev/null @@ -1,21 +0,0 @@ -## twamm designs - -
- -### tl; dr - -* a new type of automated market maker, or AMM, that helps traders on Ethereum efficiently execute large orders. -* time weighted amm designs prevent sandwich attacks by executing transactions lazily. -* in twamm, orders are executed as if they were placed between blocks. this way, an attcker would need to straddle blocks in order to take advantage of the victim's slippage tolernace (which is riskier than simply including txs around the victim's). - - - -
- ---- - -### resources - -* [twamm by paradigm](https://www.paradigm.xyz/2021/07/twamm) -* [twamm reference implementation in python](https://github.com/para-dave/twamm) -* [some properties of twamm](https://github.com/pcaversaccio/reentrancy-attacks) diff --git a/oracles/twap.md b/oracles/twap.md deleted file mode 100644 index 334208e..0000000 --- a/oracles/twap.md +++ /dev/null @@ -1,25 +0,0 @@ -## TWAP oracles - -### tl; dr - - -
- - ---- - -### oracle attacks - -* on pos ethereum, block builder building successive block might be able to manipulate oracles for multi-block MEV extraction. -* with mev-boost, an attacker could observe the set of upcoming proposers. if they finds two successive proposers that have both been proposing blocks, then the attacker can anticipate the attack. - - -Screen Shot 2022-12-21 at 4 57 12 PM - -___ - -### resources - -* [Multi Block MEV by flashbots](https://collective.flashbots.net/t/multi-block-mev/457/2?u=nerolation) -* [Statistical analysis on Ethereum k-consecutive block proposal](https://alrevuelta.github.io/posts/ethereum-mev-multiblock) -* [uniswap v3 oracles](https://uniswap.org/blog/uniswap-v3-oracles) diff --git a/private_order_flows/README.md b/private_order_flows/README.md deleted file mode 100644 index 5597054..0000000 --- a/private_order_flows/README.md +++ /dev/null @@ -1,43 +0,0 @@ -## MEV private order flows solutions - - -#### private order flow protocols (POFPs) - -* rpc-based mev solutions (private order flow) -* private orderflows are realized by modifying either the user's rpc or by modifying the protocol's frontend -* the goal of private order flow protocols (POFPs) - -
- ---- - -### validator transaction reordering protocols (VTRPs) - -* private tx reordering -* two goals: 1) identify valuable user txs, 2) replace the POFP's value-extracted tx with its own value-extractive tx -* when a VTRP is able to identify a valuable user tx but, due to the tactics of the POFP, is unable to inject its own transaction in place of the POFP's -> VTRP's optimal strategy is to censor the user's transaction from the final block - - ---- - -
- -### stat arbs - -* if CEX is greater than the price on chain (on theDEX), stat arbs will buy on the DEX and hedge on the CEX -> confident that the DEX price will drift towards the CEX price, but not confident that will happen to the CEX price -* problem: settlement mismatch -> CEX trades are fast but blockchains aren't -> start arbs are unsure if the trade will land or competitors will beat them -* from the time between trade submission and receipt of the next block, the trade (their exposure to the assets) is uncertain -* the greater the uncertainty, the more the profit estimate needs to be marked down -* while volatility of the token is important, the longer the time period between blocks, the longer tx remains, and the longer can go without being fully hedged -* as block time increases, stat arb MEV profit estimates get marked down -> payments made by stat arbers to miners/validators or to users/traders decrease -* conclusion: the battle between PFOF-style MEV could lead to increase block times for stat arbers, decreasing combined realzied MEV - -
- ---- - -#### resources - -* [kolibrio](https://www.kolibr.io/) (and [docs](https://docs.kolibr.io/)) -* [Ethereum's biggest issue no one's talking about](https://mariusvanderwijden.github.io/blog/2022/10/21/lightclients/) -* [Youtube: Private Order Flow is the new MEV](https://www.youtube.com/watch?v=bapIqxhIdaY) diff --git a/pvp_war/README.md b/pvp_war/README.md deleted file mode 100644 index 8367c1a..0000000 --- a/pvp_war/README.md +++ /dev/null @@ -1,29 +0,0 @@ -## PvP bot battles - -
- -#### salmonella - -* exploited the generalised nature of front-running setups through an erc20 token that could detect when a non-owner is transacting it, returning just 10% of the amount. -* [source code](https://github.com/Defi-Cartel/salmonella) - -
- -#### kattana - -* trap for front-running bots during token listing. - -
- -#### YOLOchain - -* [bert miller thread](https://twitter.com/bertcmiller/status/1381296074086830091?s=20) - * instead of users paying tx fees via gas prices, flashbots users pay fees via a smart contract call which transfers eth to miner. - * miners receive bundles of txs from users and include the bundle that pays the most - * sandwich bots watch the mempool for users buying on dexes and sandwich them - * bots will simulate their txs on local infrastrcuture - -
- - -#### [list of malicious tokens](malicious_tokens.md) diff --git a/rook/README.md b/rook/README.md deleted file mode 100644 index e8158fd..0000000 --- a/rook/README.md +++ /dev/null @@ -1,76 +0,0 @@ -## 🌶 rook - -
- -### tl,dr - -* rook provides the infrastructure to make DeFi more secure, profitable and egalitarian for users, protocols and Keepers through proliferating the Keeper Economy and negating the possibility of predatory MEV extraction on blockchains. -* the Rook Protocol is the first protocol that allows generalized MEV to be internalized at the application layer. This protects users and protocols from negative externalities, reduces the total MEV available at the consensus layer, and ensures that less value overall is being extracted from markets and protocols by miners and validators. Rook Labs has designed a comprehensive system that can flexibly capture a wide variety of application-layer transaction flow, and create a positive-feedback flywheel that aggregates and re-distributes MEV among participants in a way that increases overall network and market efficiency. -* rook Labs maintains several distinct API services that cater to specific use-cases, including market making, automated trading, dApps (e.g. DEXes, DEX aggregators, wallets), smart contracts, and a general-purpose RPC. Transactions enter the Rook Protocol’s virtual mempool, where only whitelisted Keepers, certified, high-powered bot operators who bid on the right to execute transactions and capture the maximal extractable value created, can settle those transactions to an actual blockchain by bidding on the opportunity. The winning bid is distributed by the Rook Protocol Bid Distribution Controller through a series of payment channels, to incentivize the various parties involved in the transaction. - -
- ---- - -### core products - -
- -#### [Coordination Protocol](https://github.com/bt3gl-labs/Scratch-Space-Stateful-Blockchains-and-MEV/blob/main/keeperDAO/coordination_protocol.md) - -#### hiding game - -* Gasless limit order system that sources liquidity from all means supported by KeeperDAO Keepers. -* If a user's order creates a MEV opportunity, the user will be rewarded with a share of the MEV profits in the form of `ROOK'. - -#### hiding vault - -* A generalized liquidation-mitigation lending and borrowing NFT product. -* The first platform supported by Hiding Vaults is Compound Finance. -* Using a Hiding Vault mitigates both the risks and the impacts of the liquidation of users using Compound Finance. -* If a user's position is liquidated, the user will be reimbursed with a share of the liquidation profits in the form of `ROOK`. - -#### liquidity pools - -* KeeperDAO offers five single-asset LP that yield `ROOK` tokens (ETH, WETH, USDC, renBTC, and DAI): users earn `ROOK` rewards based on the number of `ROOK` rewards allocated to the pool each quarter. - - -
- ---- - -### projects of interest - -
- -* [KeeperDAO analytics](https://github.com/keeperdao/analytics) -* [Keeper Improvement Proposals (KIPs)](https://github.com/keeperdao/kips) -* [KD UniV3 Challenge](https://github.com/keeperdao/solidity-challenge-2) -* [Security audits docs](https://github.com/keeperdao/docs/tree/master/audits) -* [kAave](https://github.com/keeperdao/kaave) -* [Hiding book API info](https://hidingbook.keeperdao.com/api/v1/info) - - -
- ---- - -### documents of interest - -
- -* [Docs page](https://docs.keeperdao.com/reference/) -* [Forum page](https://forum.keeperdao.com/) -* [Roadmap](https://www.keeperdao.com/files/roadmap.png) -* [Motivational whitepaper](https://github.com/keeperdao/whitepaper) -* [Technical whitepaper](https://www.keeperdao.com/files/gov-beigepaper.pdf) -* [Blog page](https://blog.keeperdao.com/) -* [Medium blog](https://medium.com/keeperdao) -* [The New Citadel: A vision for KeeperDAO](https://keeperdao-labs.notion.site/The-New-Citadel-A-Vision-for-KeeperDAO-125ed6222f4542d99d8e171ddbe2bc38) -* [KeeperDAO twitter](https://twitter.com/Keeper_DAO) -* [KeeperDAO treasure](https://app.zerion.io/0x9a67F1940164d0318612b497E8e6038f902a00a4/overview) -* [Youtube Town Halls](https://www.youtube.com/channel/UCDNHJWdB32MdwcHs0Btiaxg/videos) -* [Contracts registry](https://docs.keeperdao.com/reference/for-beginners/smart-contracts) -* [Gnosis multi-sig](https://gnosis-safe.io/app/eth:0xa8b0a855BE21568B93f32805b244158Cc61AD006/balances) -* [keeperdao plan for mev protection](https://blog.keeperdao.com/how-to-protect-yourself-from-mev-and-get-paid-for-it/) - diff --git a/rook/docs/MEV-at-KeeperDAO.md b/rook/docs/MEV-at-KeeperDAO.md deleted file mode 100644 index f7a55bd..0000000 --- a/rook/docs/MEV-at-KeeperDAO.md +++ /dev/null @@ -1,47 +0,0 @@ -## MEV at KeeperDAO - -
- -* MEV refers to profit that can be extracted from a transaction from the transaction originator needing priority or control over the ordering of that transacion in a block (*the arbitrage has 45 WETH of MEV*). -* [As may of 2021, around $3-4mil of MEV is being captured daily](https://explore.flashbots.net/). -* MEV exists on any blockchain and layers where there is a party responsible for transaction ordering (eg. validators, rollup providers). -* Extracted MEV = Successful MEV transactions + Successful MEV transactions gas fees + Failed MEV transactions gas fees -* Common MEV strategies are front-running, back-running, and sandwiching. -* MEV should accrue to the originator of the transaction, or of the transactions or protocols that create the MEV in the first place. -* Using KeeperDAO's **coordination layer**, we can capture and recycle the MEV before it can be extracted. - -
- -### Arbitrage opportunity - -* Results from a difference in prices between the same asset, listed on different DEXes. -* A transaction that makes the right swaps along the right arbitrage route will end up with profit. - - -### Keepers - -* Bots observe Ethereum, and other blockchains, to faciliate sorts of transactions, such as arbitrage, liquidations, auctions. -* Automated agents that survey the state of the blockchain and compute all the different possibilitie in order to identifty transactions that can create profit. -* Once Keepers have identified a valuable transaction, they will broadcast that to the network. Other keepers can copy and broadcast the same transaction with themselves as the originators. -* MEV arises from the problem of "how can a keeper ensure that they are the one who gets a transaction settled first? -* Keepers compete with each other in a zero-sum game, transforming Ethereum into a highly zero-sum game. -* Inside KeeperDAO, keepers don't need to compete - but coordinate and capture on-chain profits efficiently. DeFi users, protocols, market makers can bring their activity to KeeperDAO and gain a portion of the profits as a reward. - - - -
- -### āž”ļø MEV poses risks not only to the user but also to the consensus layer itself. The reorganisation of blocks, the reordering of transactions, and — even momentarily — the censorship of transactions can have profound impacts on the blockchain and breaks the assumptions of many applications. - -### āž”ļø Because block producers are able to prioritize transactions with higher gas fees, a bidding war between bots (who either try to arbitrage or front-run) can occur. This hurts ordinary users and DeFi platforms, because these bidding wars drive up gas fees (Priority Gas Auctions) and cause slippage and failed transactions - - - -
- -#### Gas golfing - -* use addresss that start with a long string og zeroes (take less space, less gas, to store) -* leaving small ERC20 token balances in constracts since it cost more gas to initialize a storage slot then to update a storage slot - - diff --git a/rook/docs/coordination_protocol.md b/rook/docs/coordination_protocol.md deleted file mode 100644 index c23ba44..0000000 --- a/rook/docs/coordination_protocol.md +++ /dev/null @@ -1,186 +0,0 @@ -# Coordination protocol - -
- - -
- -**KeeperDAO uses the power of Coordination to create more efficient markets by capturing and recycling MEV to the -users and protocols that create it.** - -
- -**KeeperDAO is a decentralised and coordinated Keeper commonwealth making the Ethereum network more egalitarian, profitable, and secure for all the actors involved.** - -
- -
- -## Coordination Game - -
- -* First protocol that allows generalized MEV to be internalized at the application layer, protecting users and protocols from negative externalities, reducing the total MEV available at the consensus layer, and ensuring that less value overall is being extracted from markets and protocols by miners and validators. - -* Design a comprehensive system that can flexibly capture a wide variety of application-layer transaction flow, creating posiive-feedback flywheel that aggregates and re-distributes MEV among participants in a way that increases overall network and market efficiency. - -
- - - -### Coordination lifecycle outline - - -1) Keepers buy ROOK and stake it in the Coordinator smart contract. Keepers pend staked ROOK bidding on the right to execute transactions in the Coordination Game. -2) Keepers watch incoming transactions, and search for the best way to profitably execute them. -3) When an opportunity is discovered, Keepers initiate a sub-second just-in-time auction that will decide who gets the right-of-way to execute the transaction. In the auction, Keepers place bids using their staked ROOK from (1). -4) The Coordinator Auction Module prevents Keepers from grim triggering each other during the auction, by balancing both upward and downward bid pressure to discover the fair value of the profit opportunity. -5) The Coordinator greenlights the winner of the auction, leaving them free to broadcast the transaction and collect the profit they discovered, while fulfilling the request of the user who originated the transaction. -6) Upon execution of the transaction, the bid that the winning Keeper paid to win the auction is distributed based on the image in the ROOK bid. - -
- - - -### Hiding Book - - -
- -Screen Shot 2022-03-27 at 6 12 10 PM - - -
- - -* Off-chain orderbook that hosts virtualized orders only filable by KeeperDAO keepers: single-connection access to the entire spectrum of on-chain and off-chain liquidity. -* The hiding book can act as an order relay, or a virtual mempool. -* Integrating the hiding book offers imit orders for dapps with benefits like ROOK rewards, MEV protection, and access to KeeperDAO's keepers. - -### Auctions - -* Keepers place a bid with the Coordinator, which is a `JSON` payload that includes: a signed bid commitment over the staked ROOK payment channel, the unique identifier of the user trade(s) being filler, the keeper's credentials, etc. - -``` -{ - "bids":[ - { - "auctionId":"0x1234", - .... - }, - { - "auctionId":"0x5678", - .... - } - ], - "type":"bid" -} -``` - -#### Auction life cycle - -* *binding*: - * all auctions are identified by an auctionID. - * an auction begins with the first keeper bid on an auctionID - * the auction is locked into this state where any bids received for this auctionID are competing against each other for greenlight - * last not more than a few seconds - -* *greenlight*: - * once a keeper is greenlit to faciliate user trade, the coordinator waits a period of blocks for the keeper to mine their transaction - * during this time, the auctionID remains locked - -* *release*: - * once the lock ends, a new auction can begin - - - -### Reputation - -* KeeperDAO uses a proprietary reputation algorithm that's a simple scoring system based on actions performed by keepers. -* reputation values are fed to the coordinator's greenlight algorithm to help select the winnter of an auction - -### Greenlight algorithm - -* bid quantity (the higher the better) -* reputation -* randomness -* fill quantity (larger fill quantities) -* staked ROOK quantity (the more the best) - -
- ---- - -
- -## How Market Makers benefit - -
- -* KeeperDAO provides arbitrage as a service (using the Rook Network) - -* KeeperDAO is the most convenient, secure, and profitable network for on-chain market makers: - * 1) one single integration to access all DeFi and CeFi liquidity: orders will be arbitraged against KeeperDAO users, other market makers, Uniswap, Curve, Balancer, Bancor, Binance, etc... - * 2) KeeperDAO provides market makers with three different profit mechanisms: i) capture spreads or hedge fills, ii) earn arbitrage rewards in ROOK on every trade, 3) weekly pilot program rewards - -* Before KeeperDAO, DeFi asked market makers to execute their own trades, meaning they had to navigate gas, fees, liquidity, bridging, routing, L2s, settlements, MEV. - -
- -Screen Shot 2022-03-27 at 8 58 52 PM - - -
- -### MM integration guide - -* [APIs and code here](https://docs.keeperdao.com/reference/integrate/run-a-market-maker/automated-trading) - -
- ---- - -
- -## Running a Keeper - -
- -### Example keeper bot technicuqes - -* DeFi arbitrage, cross the user with Uniswap or other on-chain DEX -* CeFi arbitrage, cross the user with Coinbase, etc -* Liquidation facilitation -* Front running, tailgating, etc. -* Keepers can also fill a user's order - -
- -Screen Shot 2022-03-27 at 9 24 22 PM - - -
- - -### Keeper bot architecture - -* a keeper bot: integrated with the coordinator and hidingbook components -* Coordinator websocket server: keepers connect and communicate with the coordinator using this server. When they find arbitrage they place a bid via web sockets noting the specific order/liquidation. The coordinator prevents gas auctions and bad behaviors, and broadcast the winner of the auction letting the greenlit keeper know they can take the order/liquidation. The keeper can then capture the arbitrage or MEV they way they like (mempool, flashbots, eden, miningdao, etc). -* Coordinator http server: keepers provide and gather critical info from this server (must register their addresss with the coordinator) -* HidingBook http server: the orderbook containing user order only fillable by whitelisted KeeperDAO keepers. -* HidingBook websocket server: keepers listen to real time order update events using this endpoint. This ensures they get orders as soon as they are posted and know when the order is filled or expired. - - -
- ---- - -
- -## Payment channels - -* Keepers transact with the coordinator off-chain using payment channels. -* They will open this payment channel by staking ROOK into a contract and then pass signed commitments with the Coordinator. -* Having this payment channel off-chain reduces gas costs for keepers participating in the Cordination game. - - diff --git a/rook/docs/hiding-vault-x-compound.md b/rook/docs/hiding-vault-x-compound.md deleted file mode 100644 index efe31a0..0000000 --- a/rook/docs/hiding-vault-x-compound.md +++ /dev/null @@ -1,71 +0,0 @@ -## Notes on [Hiding Vault x Compound](https://medium.com/keeperdao/hiding-vault-x-compound-a09ad6c2db80) - -
- -*(This project has been deprecated)* - -
- -*Update: [KIP-16](https://forum.keeperdao.com/t/kip-16-sunset-the-hiding-vaults-product/281) sunsets the Hiding Vaults product.* - -* Jul/21: Launch Hiding Vault, the Just-in-time-underwriter and kCompound, which make up the foundations of the KeeperDAO borrowing protocol. -* This gives borrowers an optimal way to protect borrow positions on Compound while also earning ROOK. - -
- -### The Hiding Vault - -* Centerpierce of KeeperDAO's borrowing protocol, -* A hiding vault is a NFT, designed to be a modular, multi-positional collateral hub, built to automatically upgrade with future iterations -* The Hiding Vault protects your position from the open market by cloackign it and using JITU to automatically put an additional collateral (buffer) if the health of the loan falls below its borrow limit threshold. - * when a position is buffered by the JITU, the user would not be able to borrow further or withdraw, but if the health of the loan recovers, or you add more of your own collateral, the JITU can withdraw the buffer, and the borrower avoided a costly liquidation. -* When KeeperDAO migrated funds to the new JITU contract, they unlocked its unique underwriting functionality to add to the current flash lending. The JITU is only able to utilize the different tokens in the liquidity pool. - -
- -### Liquidations - -* Occur based on the underlying protocol's risks management strategy. Once the health of the loan has been flagged as eligiable for liquidation, JITU will step in and buffer the position. If th health of your loan continues to fall after the JITU has interviewed beyond the buffr provided, liquidation will begin and KeeperDAO Keeper will find the best price of your collateral. - -Screen Shot 2022-03-24 at 1 37 27 PM - - -
- -### kCompound: Compound KeeperDAO style - -* A wrapper built arround Compound's borrowing engine. -* Each position is individual, while other borrowing wrappers cross collateralized all their positions. Every kCompound position is 100% isolated from everyone else's position (the risk is not shared) -* Liquidity Pools provide a long term loan of ETH, DAI, and USDC to JITU, which is deposited into Compound to give JITU c-tokens. These loans earn both interest and COMP distribution. - - -
- -### Rewards - -* Borrowers that have an open or migrated loan in a Hiding Vault will earn ROOK on a per-block basis. -* ROOK rewards will only be earned for having a loan, so users that only supply collateral to a Hiding Vault but do not open a borrow position do not earn rewards. - -
- -### Example: longing ETH - -1. Assuming ETH is 2k, borrower A wants incresed long exposure to ETH. -2. They supply 50 ETH to kCompound to use as collateral to borrow 60k DAI. -3. Borrower A uses the DAI to purchase 30 more ETH. -4. Borrower A now has long exposure to 80 ETH and owes kCompound 60k DAI plus interest. -5. If ETH increases to $2500, Borrower A will be able to repurchase the DAI they owe kCompound for 24 ETH. -6. They can pay the debt and keep 6ETH as profit. - - -
- -### Example: shorting ETH - -1. Borrower B wants to increase short exposure to ETH. -2. They supply 100k DAI to kCompound to use as collateral to borrow 30ETH. -3. Borrower B uses the eth to purchase 60K more DAI. -4. Borrower B has long exposure to 160k DAI and owes kCompund 30 ETH plus interest. -5. If ETH decreases to $1500, bowrrower will be able to repurchase the ETH they own kCompound for 4500 DAI. -6. They can repay the debit and keep 15000 DAI as profit. - diff --git a/rook/docs/hiding_game.md b/rook/docs/hiding_game.md deleted file mode 100644 index 1048c17..0000000 --- a/rook/docs/hiding_game.md +++ /dev/null @@ -1,19 +0,0 @@ -## Hiding Game - -
- -* KeeperDAO's proprietary trading application, operating as a decentralized liquidity aggregator. -* The optimal way to trade in DeFi: a novel concept to cooperativelty hide and re-distribute MEV. -* Made possible by wraping orders in a secure way that can only be executed by whitelisted Keepers, allowing KeeperDAO to provide the most optimal Limit Orders in DeFi. -* A trader can participate in the Hiding Game by submitting a trade via KeeperDAO's trading app, using the Hiding Book API, or by using a partner's integration. -* Their order will be routed through the Hiding Book and any profit captured from the resulting MEV is deposited into the treasury, which is managed by ROOK holders. -* The trader who places the order also receives ROOK rewards proportional to the MEV their order created. -* The Hiding Book is an order book in which only KeeperDAO Keepers can execute. - -
- -Screen Shot 2022-03-27 at 10 04 49 PM - -
- -Screen Shot 2022-03-28 at 1 26 30 PM diff --git a/rook/docs/hiding_vault.md b/rook/docs/hiding_vault.md deleted file mode 100644 index 8c9d46a..0000000 --- a/rook/docs/hiding_vault.md +++ /dev/null @@ -1,12 +0,0 @@ -## Hiding vault - -
- -* Hiding Vaults are ERC-721 compliant NFTs which wrap a user's lending protocol position and provide numerous benefits unique to the KeeperDAO ecosystem. -* Currently, Hiding Vaults only support Compound Finance positions. -* KeeperDAO's Just-In-Time Underwriter (JITU) is a smart contract which monitors and protects loans made on lending platforms supported by Hiding Vaults and helps protect borrowers from liquidation - - -
- -Screen Shot 2022-03-27 at 10 07 05 PM diff --git a/rook/docs/introducing-kcompound.md b/rook/docs/introducing-kcompound.md deleted file mode 100644 index 6c0355c..0000000 --- a/rook/docs/introducing-kcompound.md +++ /dev/null @@ -1,17 +0,0 @@ -## Notes on [Introducing kCompund](https://medium.com/keeperdao/introducing-kcompound-a23511c847a0) - -* In February, KD launched the Hiding Game: a system that allows users and keepers to cooperatively hide and re-distribute MEV when using the Ethereum network. -* The first phase introduced a virtual mempool called Hiding Book, for advanced limit orders in DeFi. They cost zero gas, minimal slippage, protected from frontrunning and sandwich attacks, and yield ROOK rewards. -* The second phase is a DeFi borrowing experience called kCompound, a wrapper for the Compound lending platfirm that lets users deposit collateral and borrow assets. kCompound loans are constantly monitored and protected by the KeeperDAO JITU, which helps protect from liquidation. - -### JITU: the Just-in-Time Underwriter - -* next evolution of the KeeperDAO liquidity pool, combining current flash lending functionality with the new methods for safe underwriting. -* this givers keepers one-stop access to liquidity and distributes rewards back to liquidity providers. -* JITU is designed so funds used to underwrite a kCompund position are protected regardless of what happens to the loan. -* JITU is a standalone contract that plugs into the kCompound system - -### kCompound NFT - -* kCompound encapsulates an entire Compound position in an NFT, the ERC-721 compatible kCompound token. -* when you mint a kCompound NFT, you get a unique contract that can be transferred between different Ethereum addresses and easily composed with other DeFi protocols. diff --git a/rook/docs/liquidity_pools.md b/rook/docs/liquidity_pools.md deleted file mode 100644 index 5d51417..0000000 --- a/rook/docs/liquidity_pools.md +++ /dev/null @@ -1,9 +0,0 @@ -## Liquidity Pools at KeeperDAO - -
- -* KeeperDAO offers five liquidity pools for farming ROOK tokens: ETH, WETH, USDC, renBTC, and DAI pools. -* The liquidity provided by these pools is used by KeeperDAO's Keepers for Flash Loans as well as JITU. -* When you deposit assets into a liquidity pool, you receive kToken in return which represents your share of the pool. -* Each liquidity pool has its own kToken: kDAI for DAI pool, kETH for ETH pool, etc. - diff --git a/rook/docs/proposal-rooknomics.md b/rook/docs/proposal-rooknomics.md deleted file mode 100644 index 3d0aaca..0000000 --- a/rook/docs/proposal-rooknomics.md +++ /dev/null @@ -1,28 +0,0 @@ -## [Proposal for Rooknomics v2.0](https://forum.keeperdao.com/t/rookonomics-v2-0/225) (nov/2021) - -* `ROOK` has been a valueless governance token, only used to incentivize the use of the protocol by rewarding users to trade. -* The tokenomics must include some value capture as a detractor of actors within DeFi who might want to fork KD. - -
- -### Tokenomics objectives - -1. Create an unforkable state for KD -2. Reward users who stake and lock for longer -3. Increase the sybil resistance of current governance model -4. Incentivize an increase in TVL through staked Rook -5. Produce a flywheel effect where an increase in staked Rook increases demand -6. Make Rook useable as collatral -7. Give users product benefits for staking Rook - -
- -### Tokenomics - - -1. Rook max suplly of 1.3mi -2. Adaptive emissions to market conditions -3. Governance mining -4. Staked rook utility -5. Update keeperdao revenue structure -6. Act-wide staking token usage: single-sided staking on popsicle and bancor; bond with keepers, ribbon vault, crv pool staking. diff --git a/rook/docs/the-mission-of-KeeperDAO.md b/rook/docs/the-mission-of-KeeperDAO.md deleted file mode 100644 index 3beb745..0000000 --- a/rook/docs/the-mission-of-KeeperDAO.md +++ /dev/null @@ -1,28 +0,0 @@ -## [The Mission of KeeperDAO](https://blog.keeperdao.com/mission/) - -* Keepers are bots that work on blockchain networks like Ethereum. The are an emergent and increasingly important network participant. -* Keepers respond when there is a need to buy or sell a sequence of assets, or execute particular smart contracts in a timely manner. -* DeFi relies on Keepers. Their constant arbitrage keeps prices in sync accorss dexes. -* From the keeper's perspective, a blockchain is a giant chessbord. They look for sequences of mvoes with high MEV and try to execute them. -* To be the first, they must pay block producers (minners and validators) above and beoynd the normal fee. -* Unlike block producers, Keepers were not accounted for in Ethereum's protocol design. This has turned Ethereum's public mempool (database where all unprocessed transactions are stored) into a dark forest. - -### The Coordination Game - -* Game-theory optimised Keeper protocol that provides a solution in the MEV incentive structure problem; aligns Keeper's incentives with those of the network participants. -* Currently it's not clear how many Keepers are there, how much liquidity they command, how protocols shoudl optimally price risk, or how users and protocols should bid for Keeper attention. -* KeeperDAO protocol fills the void by formalizing the work Keepers do in a way that benefits the nwtwork, ensuring more determinism and avoiding harmful side-effects like the exploitation of users and protocols through predatory MEV attacks. - -### The Mission - -* KeeperDAO is dedicated to Keepers: to bring about a decentralised economy which Keepers create more efficient, secure, and egalitarian blockchain networks. -* Research and build unique technology to coordinate access to certain shared resources - namely order and transaction pools bound for blockchain networks - allowing keepers to more efficiently capture on-chain profit - for example by executing an arbitrage or liquidation. -* KeeperDAO creates new primitives that users and protocols can use to protect themselves from predatory MEV. - -### Founding principles - -1. Reward those that add value -2. MEV doesnt belong to block producers -3. Search for win-win scenarios -4. Solve hard problems -5. Decentralise diff --git a/rook/docs/the_new_citadel.md b/rook/docs/the_new_citadel.md deleted file mode 100644 index bc69357..0000000 --- a/rook/docs/the_new_citadel.md +++ /dev/null @@ -1,60 +0,0 @@ -## Notes for [The New Citadel](https://keeperdao-labs.notion.site/The-New-Citadel-A-Vision-for-KeeperDAO-125ed6222f4542d99d8e171ddbe2bc38) - -* Executing trades on-chain sucks today (high gas, illiquidity, bad routing, expensive bridging, MEV...). -* Citadel Securities is the largest executor of trades in the world; 40% shares traded in the USA go by them. - * they provide execution-as-a-service - when users place orders or apps like robinhood, citadel execute the trades (the amazon of trading), they take 90% profit -* KeeperDAO allows the value of order flow itself to be harnessed, but distributing the value between users, keepers, market makers; allowing everyone participate through an API; governance through a DAO -* Products: the hiding game, the coordination game, the incentive game --> the pillars for the coordinated execution layer for DeFi - -
- -### Building a Coordination Layer for DeFi - -* A coordinate execution layer lets KeeperDAO hide complexity, create economies of scale, and deliver a standard of ease and service, taking economy to the next level. -* KeeperDAO as the coordinated execution layer for the entire multi-chain space. - -
- -### Going Teal - -* KeeperDAO propose a hybrid model, inspired by the concept of a Teal Organization: teams are self-managing and largely autonomous, organized around a well-defined function, with a simple, clear mission and clear cut goals. -* The DAO acts like a decentralized board of directors - it delegates operational decisions to teams and their contributors, and steer indirectly through the power of the purse (the ability to fund or de-fund teams). -* To help the DAO assess the performance of teams, it will be propoased and allowed to recognize high-level leadearship; each team has a lead who reports to the CEO/CTO -* Leaders may create or sponsors special KIPs which can charter and fund new teams or units. The DAO evaluates and may approve or decline these in the usual way. -* On a quarterly basis, a presentation must be made by each team or unit to the DAO about this progress. - -
- - -### KeeperDAO with 80-100 contributors - -Screen Shot 2022-03-24 at 12 32 24 PM - -
- -### Teams - -* Protocol: responsible for advancing the protocols at the heart of the network such as the Hiding Game and Coordination Game. - -* Research: discover and publish new knowledge, strategies, and techniques that can benefit our network and advance the state of the art. - -* Multi-chain: adapt protocols created by the protocol team to all different blockchains, so that there is a KeeperDAO presence everywhere. - -* Trading: build the most efficient swap technology and advanced trading automation to ensure the best experience trading happens through the protocols. - -* Lending+Borrowing: build the most efficient liquidation technology and automation to ensure that lending, borrowing, and leverage are simple and available through the protocols. - -* Product: design, test, and build the web3 applications and websites that offer users the best experiences and services powered by the protocols, such as swaps, lending, and dashboards. - -* Integration: make protocols simple for other parties to integrate, in particular protocols, keepers, and market makers. Provide assistance and services to those who wish to integrate. - -* SRE: ensure the highest service level for products, protocols, and network so that KeeperDAO is a stable and consistent channel for exchange during all market and network conditions. - -* Growth: grow the community and network KPIs through business development, outreach, research, and other programs. - -* Studio: communicate products, protocols, and values through evocative, professional visual and textual communication. - -* Treasury: oversee spending, monitor risk, manage investments made using the DAO treasury, prepare financial reports, and advise on tokenomics. - -* Operations: Develop processes that harmonize all aspects of our organization, ranging from teams to the DAO and governance. Carry out recordkeeping that ensures transparency, coordinate tasks and planning, and determine how to be the most productive organization possible. - diff --git a/rook/docs/treasure-growth-plan.md b/rook/docs/treasure-growth-plan.md deleted file mode 100644 index 72cd3fb..0000000 --- a/rook/docs/treasure-growth-plan.md +++ /dev/null @@ -1,22 +0,0 @@ -## [Treasure Growth Plan](https://forum.keeperdao.com/t/treasury-growth-plan-phase-1/258) - -* With the launch of the coordination game, treasure inflows are focused on Rook over non-native assets. -* Proposal to use existing inflows to enable self-sustaining flywheels that will allow for the constant inflow of non-native assets. - - -### The current state of treasure inflows - -* Ninja revenue: KeeperDAO's keeper bot, Ninja, currently stands for largest source of revenue, ~ $200K per week -* CVX bribes: the revenue generated from Votium bribes is ~$250k per lockup periods -* Coordination game bids: the largest source of Rook treasure inflows. - - - -Screen Shot 2022-03-24 at 3 52 38 PM - -### Ideas - -* BNT for bribes: the current state of CVX bribes consists of an unoptimized distribution of votes when using Votium in an attempt to maximize the $/voce for cvx. -* Ribbon flywheel -* Tokemak flywheel -* Seed investing diff --git a/rook/docs/whitepaper-notes.md b/rook/docs/whitepaper-notes.md deleted file mode 100644 index f3f98d3..0000000 --- a/rook/docs/whitepaper-notes.md +++ /dev/null @@ -1,23 +0,0 @@ -# Notes on [KeeperDAO's whitepaper: Governance by Apparent Consensus](https://www.keeperdao.com/files/gov-beigepaper.pdf) - -* Article describes a new form of self governance for DAOs, called "apparent consensus". -* It can be implemented on- or off-chain, and uses direct token-weighted voting - but it's not plutocratic. -* It has no quorums, and tolerates low turnout without losing legitimacy. -* Defaults to a state of expert delegation, withtout requiring any special technology. -* It respects minority rights, and allows dishonest actores to be routed around. -* When consensus is high, decisions are rapid; when it's low, it take more time. - -### Introduction - -Apparent consensus is implemented in three stages: - -* Crowd consensus: a member of the general public makes a proposal and post it ona public forum. -* Sophon consensus: expert members of the DAO analyze the proposal and publs=ish a recomendation. -* Tokenholder consensus: following Sophon consensus, they are offered the chance to object to the recommendation. - -### Summary - -* The properties of the blockchain, the effects of tokenized stake, and the threat of fork, render the effects of voting meaningless and instead support consensus democracy as the natural mode of governance. -* The most widely-practiced form of consensus governance calls the "rule of non-opposition", which creates an "apparent consensus". -* A token-weighted vote is a compatible way to signal a lack of consensus. -* On a meritocracy basis, limited positional authority for coordination makes production communities more competitive. diff --git a/sandwich/README.md b/sandwich/README.md deleted file mode 100644 index 3f5234c..0000000 --- a/sandwich/README.md +++ /dev/null @@ -1,43 +0,0 @@ -## 🄪 sandwiching - -
- -### tl, dr - -* predict trade opportunities that will mine into a future block by pushing another user’s trade opportunity to its max slippage limit, which will result in an arbitrage opportunity at a later time (typically within the same block). - -* sandwiching is a common situation that occurs when a searcher identifies a large trade in the mempool that will cause an impact on the price of an asset. - -* the searcher buys or sells a calculated amount directly prior to the large trade being executed and then immediately exits their position after the large order has taken place, banking a nice profit. - -* the main theme of sandwich attacks is slippage caused by available liquidity in the pool. As users, ensuring the slippage setting is within appropriate risk limit reduce the risk of large MEVs. - -* to sandwich, a searcher will watch the mempool for large DEX trades. - -* a searcher can calculate the approximate price effect of this large trade and execute an optimal buy order immediately before the large trade, then executing a sell order immediately after the large trade (selling it for the igher price caused by the large order). - -* sandwiching is riskier as it isn't atomic an it's prone to [salmonella attack](https://github.co/Defi-Cartel/salmonella). - -
- -Screen Shot 2022-10-17 at 10 16 01 PM - - - -
- ---- - -### in this dir - -* [interesting txs in the wild](interesting_examples.md) -* [cross-trading arb like sandwich](cross_trading.md) - -
- ---- - -### resources - -* [sandwich overview by eigenphi](https://eigenphi.io/mev/ethereum/sandwich) -* [demystify the dark forest: sandwich attack](https://medium.com/coinmonks/demystify-the-dark-forest-on-ethereum-sandwich-attacks-5a3aec9fa33e) diff --git a/sandwich/cross_trading.md b/sandwich/cross_trading.md deleted file mode 100644 index b64b1c2..0000000 --- a/sandwich/cross_trading.md +++ /dev/null @@ -1,15 +0,0 @@ -## cross-trading arbitrage like sandwich - -
- -### tl; dr - -- a sandwich arbitrage has characters as below: - - in the same block, the attacker's transactions contain a start transaction, an end transaction, and one or more victim transactions in between - - the combination of attacker and victim needs to satisfy an essential condition: the from address is not the same - - -- the `CombinedTransferTable` of each transaction contains the same Address processing the Trade. Combining the Attacker's Start Transaction and End Transaction give the CombinedTransferTable of this arbitrage having the final net surplus. - - -
diff --git a/sniping/README.md b/sniping/README.md deleted file mode 100644 index debb475..0000000 --- a/sniping/README.md +++ /dev/null @@ -1,12 +0,0 @@ -## Sniping techniques - -### tl; dr - -* Liquidity sniping happens when searchers compete to purschase an asset immediately after the creation of a liquidity pool. Tokens are then not off-loaded in the same block, but instead sold over the next minutes or hours. Profits for a sniper are not guaranteed. - - -
- ---- - -### resources diff --git a/tokenomics/README.md b/tokenomics/README.md deleted file mode 100644 index e6c6c14..0000000 --- a/tokenomics/README.md +++ /dev/null @@ -1,103 +0,0 @@ -## šŸæ tokenomics for defi projects - - -### projects - -* [dydx tokenomics](https://docs.dydx.community/dydx-governance/start-here/dydx-allocations) -* [redacted cartel tokenomics](https://tokenomicsdao.substack.com/p/tokenomics-101-redacted-cartel-btrfly?utm_source=substack&utm_medium=email) -* [readacted university](https://redactedcartel.notion.site/redactedcartel/REDACTED-UNIVERSITY-0dba7e10e6fb476a8ee7d2cb70fcfb1f) - -
- - ---- - -### supply - -* **Circulating supply:** How many tokens are in existence (in the market)? -* **Max supply:** How many tokens will there be in total? -* **Total suppply:** all tokens already issued minus the ones that were burned/locked. - -> If the circulating supply is low while the total and max are high: red flag as the value of your coins will get diluted away (more coins created will put pressure on the price). - -> The monetary policy in crypto dictates whether a coin is inflationary or deflationary and by how much, as well as the overall consensus mechanism for the project. - -
- ---- - -### liquidity and valuation - -* **Fully diluted valuation:** How will the supply change over time? -* **Market cap**: Current Price * circulating supply -* **Fully Dilute:** Market cap: Price * max supply. - -
- ---- - -### distribution - -* **Holders**: Who has the supply? WHEN can they sell? -* **DAOs/project research**: What are their policies for changing? - -> A good distribution design is when no single person or group holds a large amount of the coin, instead, it’s distributed among many individuals. - -* how are the initial tokens distributed? There are roughly 2 ways: - -##### pre minted - -1. The team distributes tokens to itself. -2. Distribution to insiders such as the team and venture capitalists - -In this case, VCs and Insiders could dump their tokens and cause a price crash. -Vesting means when they're allowed to sell the tokens. You want to make sure that the early backers are INCENTIVIZED with the protocol long-term. - -##### fair launch - -* 100% fair. Everyone has equal access. - -
-Screen Shot 2022-05-31 at 4 10 16 PM - - -
- ---- - -### concerns - - -* The tokens were inflationary without enough utility. -* Concentration of tokens by VCs & whales led to retail getting dumped on. -* Understanding the market cap would show that it's impossible. - -
- ---- - -### what drives the demand - - -* Utility (gas, fun, adoption) -* Value Accrual (xStaking, governance) -* The Memes and Narratives - - -
- ---- - - -### resources and tools - -
- -* [cadCAD](http://cadcad.org/) -* [Token engineering commons](https://tecommons.org/) -* [Awesome cryptoeconomics](https://github.com/jpantunes/awesome-cryptoeconomics) -* [Utility token price simulator](https://github.com/melonattacker/utility-token-price-simulator) -* [TokenSPICE](https://github.com/tokenspice/tokenspice) -* [The Reverse Liquidity Bootstrapping Pool](https://tokenomicsdao.substack.com/p/the-reverse-liquidity-bootstrapping) - - diff --git a/tokenomics/voter_escrowed_tokens.md b/tokenomics/voter_escrowed_tokens.md deleted file mode 100644 index ce01df4..0000000 --- a/tokenomics/voter_escrowed_tokens.md +++ /dev/null @@ -1,14 +0,0 @@ -## ve (voter escrowed) tokens - -### tl; dr - -1. you lock up your token (say CRV), and it's converted (to say veCRV), which has the governance power of the protocol -2. the lock period isn't fixed: the token holder can decide how long they want to lock (max 4 years0 -3. as time goes on through the lockup period, the amoun of token (say veCRV) that a holder has decays lineraly, incentivizing the holder to periodically relock ther original token (say CRV) for ve token (say veCRV) -4. this creates weighted votes and rewards, plys once converted, the tokens are locked with no unstaking options - - -#### effects - -* short-term governance protection against whales (tokens are locked up) -* fliexibility to choose locked up period diff --git a/uniswap/README.md b/uniswap/README.md deleted file mode 100644 index 596c5f3..0000000 --- a/uniswap/README.md +++ /dev/null @@ -1,32 +0,0 @@ -## šŸ£ the uniswap protocol - -
- -### tl,dr - -* peer-to-peer system designed for exchanging ERC20 tokens on the Ethereum blockchain. -* protocol is implemented as a set of persistent, non-upgradable smart contracts; designed to prioritize censorship, resistance, security, self-custody. -* an AMM replaces the buy and sell orders in an order book market with a liquidity pool of two assets, both valued relative to each other. As one asset is trader for the other, the relative prices of the two assets shift, and the new market rate for both is determined. - -
- -### in this dir - -* [uniswap v2](uniswap-v2) -* [uniswap v3](uniswap-v3) - - -
- ---- - -### resources - - -* [uniswap docs](https://docs.uniswap.org/protocol) -* [uniswap arb analysis](https://github.com/ccyanxyz/uniswap-arbitrage-analysis) -* [uniswap extractooor](https://www.uniswap.shippooor.xyz/) -* [dune for total uniswap users over time](https://dune.com/queries/2740) -* [understanding amms by hasu](https://www.paradigm.xyz/2021/04/understanding-automated-market-makers-part-1-price-impact) -* [mev's impact on uniswap](https://eigenphi.io/report/mev-impact-on-uniswap) - diff --git a/uniswap/uniswap-v3/README.md b/uniswap/uniswap-v3/README.md deleted file mode 100644 index 626f0b6..0000000 --- a/uniswap/uniswap-v3/README.md +++ /dev/null @@ -1,34 +0,0 @@ -## šŸ£ uniswap v3 - -
- -### tl; dr - -uniswap v3 introduced: - -* **concentrated liquidity** and **non-fungible liquidity**: - * replacing fungible ERC20 liquidity positions with non-fungible ERC-721 liquidity positions. - * individual LPs get granular control over what price ranges their capital is allocated to. - * individual positions are aggregated together into a single pool, forming one combined curve for users to trade against. -* **multiple fee tiers**: allowing LPs to be appropriately compensated for taking on varying degrees of risk. -* **range orders**: lps can deposit a single token in a custom price range, above or below the current price. -* **improvements to the TWAP oracle**: possible to calculate any recent TWAP within ~9 days in a single on-call chain. - - -
- ---- - -### in this dir - - -* [just in time liquidity mev](just-in-time.md) - -
- ---- - -### resources - -* [uniswap v3 whitepaper](https://uniswap.org/whitepaper-v3.pdf) -* [liquidity mining on uniswap v3 by paradigm](https://www.paradigm.xyz/2021/05/liquidity-mining-on-uniswap-v3) diff --git a/uniswap/uniswap-v3/just-in-time.md b/uniswap/uniswap-v3/just-in-time.md deleted file mode 100644 index 2c8742e..0000000 --- a/uniswap/uniswap-v3/just-in-time.md +++ /dev/null @@ -1,39 +0,0 @@ -## just-in-time (jit) liquidity mev - -
- -### tl; dr - -* uniswap v3 allows LPs to provide concentrated liquidity within smaller price ranges. -* jit liquidity is a form of liquidity provision where an LP mints and burns a concentrated position immediately before and after a swap. -* because provision has significant costs, it's usually only used against very large swaps. - - - -##### impermanent loss (il) - -* uniswap lps profit a fixed trading fee associated with each liquidity pool, typically 0.01%, 0.05%, or 0.3% of the value of each swap. -* when the price of the two assets begins to diverge, lps experience il associated with that divergence, as lps are continuously selling the appreciating asset of the pair for more of the depreciating asset. -* lps are in profit overall if the trading fees outweigh the il they are subject (either v2 or v3) -* in uniswap v3, lps may capture more tradng fees whenever their liquidity is in range, however, if the price moves permanently out of the range of their liquidity, their il aggravates. -* additionally, uniswap v3 comes with just-in-time (jit) liquidity, which reduces the fee accrual of normal lp. - - -##### jit on mev - -* jit liquidity is provided by MEV searchers who scan the mempool for substantial pending trades, adding and withdrawing an LP position within the same block. sophisticated searchers can add and remove concentrated liquidity on sandwich trades. -* using uniswap v3’s concentrated liquidity, the position’s range can be defined to match the trade in order to poach an amplified portion of the trading fees. -* jit liquidity avoids exposure to impermanent loss by its very nature since it is added and removed within the same block. -* jit lps face competition in mev auction market - the price improvement provided by jit liquidity should be capped by twice the fee rate of the pool that jit occurs in. - - - -
- ----- - -### resources - -* [uniswap on jit liquidity](https://uniswap.org/blog/jit-liquidity) -* [just-in-time mev dune board](https://dune.com/ChainsightAnalytics/Uniswap-v3-Just-in-Time-(JIT)-Liquidity-MEV) -* [uniswap v3 lp by rekt](https://rekt.news/uniswap-v3-lp-rekt/)