-
Notifications
You must be signed in to change notification settings - Fork 656
BEP-559: Encrypted Mempool for BNB Smart Chain #559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Encrypted Mempool for Binance Smart Chain
|
hi @Smokyish , thank you for your proposal, but I wonder if BSC really need the EncryptedMempool. |
Hey! I think those are two different things and I agree, that a private mempool is not a good choice: Private mempool: Exclusive, non-public mempool which someone needs to control. Transactions are simply hidden for everyone except for the validator or centralized mempool operator. This is basically how most rollups work. It requires massive trust in whoever operates that mempool not to front-run/censor and is generally considered to be a force for centralization. Threshold encrypted mempool: Transactions are encrypted in a decentralized fashion (using threshold encryption) until the order and inclusion is finalized/committed to by validators. So no one can see the transactions before they're fixed to go into the block, making it very hard to front-run in general. More on this: https://ethresear.ch/t/the-road-towards-a-distributed-encrypted-mempool-on-ethereum/21717 Happy to explain more/answer any questions! |
Hi @pepae , I have read the post, it is a very good idea, but:
|
Good points! Let me address:
More detail: protected RPCs still hinge on an off‑chain relay, and that relay is a single choke‑point you have to trust completely. It sees your raw tx before inclusion and could leak or reorder it. So while protected RPCs hide you from public frontrunners, they hand the same power to an even smaller cartel of relay operators (probably 1 or 2). Until we eliminate the relay entirely with in‑protocol threshold encryption or enshrined PBS, protected‑RPCs carry the same centralization risk as a private mempool (plus one extra hop of trust).
On performance: 2 separate concerns 1) throughput and 2) latency: if correctly implemented, there should be close to no impact to throughput (because the encryption/decryption scales well and is extremely light). In any case, the having an encrypted mempool does not eliminate the option to send through non-encrypted transactions. It's just an option that is offered to users/wallets/dapps. Many transactions shouldn't go through encryption (e.g. if it's a simple token transfer which cannot be front-run). |
|
We believe encrypted mempool introduces additional costs, primarily in the following aspects: Additional system complexity and computational overhead from transaction encryption:
On the other hand, encrypted mempool offers two advantages:
To achieve these goals, alternative solutions like execution ticket / pre-confirmation mechanisms might be more effective. |
Great questions, let me try to answer:
|
I think encrypting RPC has same problem as protected RPCs, and we believe we need more comments from wallet and front end Dapp provider for this case. Could you explain why back-running and arbitrage will not be affected and at what user case the overall MEV will increase? |
Agreed that an encrypting RPC in this context isn't the ideal end goal and introduces another trust assumption. For Gnosis Chain, it's seen as a stop gap solution towards the end goal, which is encryption by the users themselves, either in the wallet or dapp. Here again the example of this (on the dapp level) running in production: https://shutter.gnosischain.com/ Btw, we think that the UX paradigm might be changing anyway, towards a more agentic UX. This could be a good opportunity also to implement encryption on the user side. Example: https://x.com/bezzenberger/status/1895137585414160393 Also note that today already, anyone can run their own RPC, so users can already today be end-to-end protected, if they wish to do so.
Short answer is that the validator can still insert transactions immediately after the shielded transactions, just not before. So they can still back-run, and solutions like flashbots could be used to extract/distribute this type of back-running MEV. We think overall MEV could increase over the long term, because we believe that by creating a fair marketplace that prioritizes accessibility and inclusion (i.e. making DEFI available not just to sophisticated traders, who know about MEV, but to an even bigger, broader, more mainstream audience, which is currently side-lined) we’ll draw in more users, which could actually contribute to an increase in overall transaction volume and thus validators’ back-running related MEV rewards. |
|
go to opbnb is you want this |
|
I don't understand i touchtouchtouch everything i can |
MRHUNG369
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
|
How will this proposal avoid BNB chain just being clogged up with spam MEV txs as described here? |
|
**### _ Đề xuất BEP-559 (về cơ bản là BEP-547) áp dụng phương pháp mempool được mã hóa ngưỡng. Các giao dịch được gửi đến mempool sẽ được mã hóa, vì vậy trình xác thực, trình tạo hoặc bot MEV không thể xem nội dung ở front-run/sandwich. Khi đơn đặt hàng trong khối bị "khóa", giao dịch sẽ được giải mã và thực hiện. Do đó, các giao dịch "mùn thải MEV" (ví dụ: chạy trước, bánh sandwich) không thể bị gián đoạn, giúp mạng tránh tắc nghẽn do MEV txs.@>FALLONP /### _txs. ###** |
MRHUNG369
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phê duyệt
An encrypted mempool would remove malicious MEV like front-running and sandwich attacks. Arbitrage, liquidations and backrunning would still be possible, but it could alleviate some of the spam related to those. |
Agreed that a private mempool would end malicious MEV. But that article makes clear that private mempools on Base and other chains have caused a massive explosion of spam MEV transactions, see - Searchers will write bots which check Pool reserves and action Arbs if the reserves create an opportunity, These spam txs will only work less than 1% of the time but are a 'rational' approach in a world of private mempools. Result on Base are that 50% of Gas is spent by spam bots in this way, seems HIGHLY LIKELY that this will be repeated on BNB Chain if this proposal goes through. We need to eliminate Sandwich attacks but in a way that allows searchers some access to pending txs to avoid this 'private mempool created MEV spam'. Ideas are discussed in the article in this section |
Thank you for raising this important question. |
Good question! Flashbot's proposal in the link you provided to auction off the backrunning slot would be a good way to achieve this, while maintaining front-running resistance. So this and the encrypted mempool should be complementary. |
octavio12345300
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List
MRHUNG369
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
|
Hey @MRHUNG369 @octavio12345300 @davesmail1401-sudo @hailuu01041990-lab how do we move forward with getting this BIP approved to be in the list of potentially to be adopted EIPs? Who can approve it? As I understand, this stage wouldn't mean actual adoption/implementation but rather just it being part of the list of potential candidates, so imho should be ready to approve. Thanks! |
|
Hey all, it looks like some sandwich attacks have returned. Could be a good time to revisit the encrypted mempool BEP as a potential longterm solution. Sharing some screenshots of charts from the Dune dashboard below. But perhaps someone else has a better data source.
|



Proposal for an Encrypted Mempool for Binance Smart Chain.