I made Uniswap V2 resistant to sandwich attacks with only 19 lines of code.
This solution preserves atomic composability, has zero dependencies, and requires no additional infra or off-chain computation.
Here's how it works 👇
Introducing zkUniswap: a first-of-its-kind zkAMM 🪢
It combines UniswapV3 and a zkVM (RISC Zero) to enable off-chain computation of swaps, aiming for long-term cost efficiency without compromising trust.
🩸🩸🩸🩸🩸🩸🩸🩸🩸🩸🩸🩸🩸🩸🩸🩸🩸🩸
Introducing MEV-Tax, a practical Solidity library for MEV taxes.
It's dead simple to use and allows your smart contract to start capturing MEV today.
Check it out 👇
🔴 Introducing Sequencer Commitments for the OP Stack
This implementation makes changes to the op-node that enable it to enforce granular, reliable, on-chain contracts involving sequencers.
Let's dig in 👇
// hackathon idea
univ4 pool that does a frequent batch auction, so all swaps in the same block happen at the same price.
does this mean that the order of swaps in a block would not matter anymore? would this address single-block MEV?
It leverages the Greedy Sequencing Rule from the paper "Credible Decentralized Exchange Design via Verifiable Sequencing Rules" (), along with a novel constant-time verification algorithm.
Check it out:
[Space Program] Launch an Ethereum node into low Earth orbit
By:
- Mirror
🔗
Highlights:
- The project aims to launch an Ethereum node into low Earth orbit to enable direct communication with a ground computer.
-It plans to use a 1U CubeSat with a
Fun fact: I originally developed this solution over a weekend for my Paradigm Fellowship application. The prompt was, "What change would you make to Uniswap v2 to prevent or mitigate 'sandwich attacks'?" This was before
@UmbraResearch
posted their solution.
I made Uniswap V2 resistant to sandwich attacks with only 19 lines of code.
This solution preserves atomic composability, has zero dependencies, and requires no additional infra or off-chain computation.
Here's how it works 👇
Introducing a new math library for Solidity: Prime field arithmetic, tailored to the secp256k1 curve.
Ideal for applications leveraging a high level of mathematical rigor and precision, such as in DeFi and cryptography.
Check it out now! 👇🍭
The rule is based on the principle that for any pool state, either all buy orders or all sell orders get a better execution (i.e., prices) than at the block's start.
The rule works by:
1. Executing any buy or sell, whichever of two would get a better execution.
2. Continuing
💭 What are zkAMMs?
zkAMMs are an extension of traditional AMMs, integrating zero-knowledge proofs in-protocol. Unlike zk-rollups, the proof verification is done by the protocol itself, even on non-zk environments like the Ethereum Mainnet.
By using zk proofs, zkAMMs aim to shift part of the computational load off-chain, potentially reducing on-chain costs in the long run without compromising trust guarantees.
Check out the code today 👉
A SANDWICH-RESISTANT AMM
In this post,
@jarxiao
,
@FrankieIsLost
,
@0xShitTrader
, and
@danrobinson
introduce an AMM design that protects swappers from frontrunning attacks. This is an application-layer mitigation to atomic sandwich attacks.
what determines whether price discovery happens in the CEX or the DEX?
I wonder if this has already been studied, beyond just assuming that liquidity depth and transaction costs make a difference (cc
@0xMagnusHansson
)
have been getting funded by them and it made a difference. thank you
@rebeccadai0
@austingriffith
!
BuidlGuidl is undoubtedly one of the best things in the ecosystem.
🏰
🏰 BuidlGuidl is punk af 🧑🎤 👨🎤 👩🎤
🌎 we stream ETH to open source devs all over the world
⚙️ we do this fully onchain using custom smart contracts
🔥 in '23 we funded more than 150 builders!!!!
🧑🏫 and we aren’t just funding, we are also educating…
This solution isn't perfect:
1. Proposers must follow the ordering rule.
2. Risk-free sandwich attacks over several blocks if proposers are the same.
3. The rule has price discovery issues if there are 3 pools with the same token.
More on this in README:
Consider a hypothetical buy order by Alice sent to the public mempool of Ethereum Mainnet that a proposer (or builder in PBS) wants to sandwich attack.
Without the rule:
1. Proposer front-runs Alice with a buy, raising the price.
2. Alice buys at a higher price.
3. Proposer
As L2s gain momentum, sequencers' capacity to establish credible commitments becomes ever more important. This not only enhances transparency in transaction ordering but also holds the potential for versatile, general-purpose contracting with the sequencer as the counterparty.
assume a rollup wants to outsource sequencing to a network of (shared) sequencers. how do these sequencers get the orderflow (txs) sent to the rollup’s original sequencer? 🤔
cc
@benafisch
@ellierdavidson
@jskybowen
💬 What are Sequencer Commitments?
They define behavioral constraints for sequencers. It enables them to engage in on-chain agreements about their future actions, drawing from the PEPC framework. More on PEPC here:
Your perspective can steer this research's trajectory. Contribute, suggest, or get your hands dirty by forking the repo.
Let's explore what's possible with sequencer commitments.
How does it work? It's simple — at the rollup client, we integrate a call to the L1 to filter new L2 payloads for commitment satisfaction. This call is made to Emily, a library to which we outsource the work of checking commitments.
@0xgodking
its gonna be tough without any way for lenders to short the credit of the borrowers / hedge against a default (as you would with a credit default swap -- problem is who would sell it to you / go long the credit without there being any form of recourse if there's a default)
Introducing the Uniswap Extension 🦄
The first wallet to live in your browser’s sidebar.
No more pop-ups. No more transaction windows.
Waitlist opens today 👇
🌐 Core Features:
1. Dynamic Commitments: Sequencers enter commitments in the L1.
2. L2 Enforcement: Commitments are enforced in L2 blocks.
3. Flexible Design: Commitments are Turing-complete and defined in the EVM.
a few new high-level ePBS diagrams came out of ethcc! the "heart diagram" and "traffic light matrix" are presented in my talk!
check it out if you are curious :-)
thanks
@tzhen
for pushing for big-picture thinking
has there been any work on zkAMMs? where say the caller posts a proof for the successful execution of the swap step for some amount in & amount out (among other things)
The library, which implements MEV taxes as introduced by
@danrobinson
and
@_dave__white_
last week, allows your smart contract to automatically charge a tax based on the priority fee of the transaction.
New mechanism with
@_Dave__White_
!
We present MEV taxes, a technique that:
* Lets arbitrary apps capture their MEV
* Preserves composeability
* Would work today on OP Stack L2s like
@Optimism
@base
@Blast_L2
The secret? The surprising power of priority ordering 🧵
This opens up new ground for agent programmability at Ethereum's consensus layer, paving the way for more reliable general-purpose contracting with validators on core protocol duties like block proposing.
who's building a cryptocurrency that tracks an inverse Argentine peso? this would allow Argentinian's to hedge against inflation by simply buying the token
Excited to release an implementation of a based preconfirmations protocol leveraging restaking: a POC for sub-second transaction confirmations on Ethereum ⚡️
Find out more about how it works with
@EigenLayer
and
@RelicProtocol
🧵
Wendy’s will start experimenting with surge pricing in 2025, along the lines of Uber and Lyft.
Wendy’s will test “dynamic pricing” on burgers, Frosties, and other menu items, which will cost more during times of increased demand.
@optimizoor
I think the real problem is finding state transitions onchain that leads to +EV when calling the functions
If the EV > gas costs people will call the function anyway
Eg. NFT mints
So far these function calls are speculative in nature and rarely creates genuine value
Introducing : the first platform that allows to use any ERC20 to validate, simultaneously, any or all on-chain trust networks.
As examples, we decentralized the OP sequencer and developed an L3 POC.
built together w/
@0xfuturistic
@cronokirby
BLS with the BLS12-381 curve.
main reason for using that over ECDSA is that BLS can aggregate signatures (and have them all checked) much more efficiently, which means that it can scale effectively as the set of validators grows
Admittedly, the library only works in environments where competitive priority ordering is in effect, so expect the library to only work on L2s like Base, Optimism, Zora, etc. for now. For more details, check out the original article for the mechanism (Priority Is All You Need).
@0xgodking
on the other hand, it's still possible to have undercollateralized lending without recourse but for borrowers with on-chain revenue (i.e., undercoll. lending for DAOs like
@debtdao
)
Many believe both 1) AMM LPs aren’t making very good returns, and 2) RFQs backed by professional market makers will replace AMMs
Why would trading firms, with ultra high return targets, want to get into a price war against AMMs who are already selling liquidity too cheap?
Key features:
• 🤝 Easy to use: just inherit the contract, apply a modifier to the functions where you want to apply the MEV tax, and voilà!
• 🛠️ Customizable: you can define your own tax function
• 🌀 Flexible: set any address as the recipient of the tax payments
how can you credibly align users of a blockchain with the goals of the DAO behind it, while keeping that blockchain permissionless?
easy: have users (or a third-party on their behalf) put up a stake that gets slashed if they break any behavioral rules.
how? by an observer
@ZuneNFT
@BendDAO
realistically though it was mitigated bc measures were put in place (i.e., limit on liquidation forcing them above 95% of the floor was dropped and utilization rate (thus APRs) went down bc some large depositors put ETH back in)