Làm thế nào để tránh vận động viên phía trước trên sàn giao dịch crypto phi tập trung

189
SHARES
1.5k
VIEWS

Related articles

Sàn giao dịch phi tập trung (DEX) nip trong chồi một số vấn đề liên quan đến các đối tác tập trung của họ như tập trung thanh khoản trong tay của một vài người chơi, thỏa hiệp các quỹ trong trường hợp của một vi phạm an ninh, cấu trúc kiểm soát khép kín và nhiều hơn nữa. Tuy nhiên, một vấn đề đã từ chối giảm dần là front-running. Những người chơi vô đạo đức vẫn đang tìm cách để lừa gạt các nhà giao dịch không nghi ngờ.

Nếu bạn nhận được ít hơn dự kiến khi đặt một giao dịch trên một DEX, có một cơ hội khá tốt để bạn bị đánh bởi vận động viên phía trước. Những diễn viên xấu này khai thác mô hình nhà tạo thị trường tự động (AMM) để kiếm lợi nhuận với chi phí của các nhà giao dịch không nghi ngờ.

Bài viết này sẽ giải thích vector tấn công và giúp bạn hiểu khái niệm cơ bản về chạy front-running trong giao dịch crypto, những hậu quả tiềm ẩn và làm thế nào để ngăn chặn tiền điện tử chạy trước.

Chạy phía trước trong crypto là gì?

Thuật ngữ “front-running” đề cập đến quá trình khi ai đó sử dụng công nghệ hoặc lợi thế thị trường để có được kiến thức trước về các giao dịch sắp tới. Điều này cho phép các diễn viên xấu tận dụng lợi thế của phong trào giá cả sắp tới và tạo ra lợi ích kinh tế với chi phí của những người đã giới thiệu các giao dịch này. Chạy phía trước xảy ra thông qua thao tác của giá xăng hoặc dấu thời gian, còn được gọi là khớp chậm.

Trên các sàn giao dịch tập trung cũng như phi tập trung, chạy front-running là một hoạt động thường xuyên. Mục tiêu của một vận động viên đứng đầu là mua một phần thẻ ở mức giá thấp và sau đó bán chúng ở mức giá cao hơn trong khi đồng thời thoát khỏi vị trí. Khi được thực hiện chính xác, nó mang lại lợi nhuận không có rủi ro cho các nhà giao dịch cam kết nó.

Rel ated: DeFi vs CeFi: So sánh tài chính phi tập trung với tài chính tập trung

Giao dịch cổ phiếu và tài sản dựa trên kiến thức trong cuộc để tận dụng sự biến động giá cả đã là một chiến thuật nổi tiếng. Mặc dù bất hợp pháp và phi đạo đức, các nhà môi giới đã tham gia vào nó. Chiến thuật này gần giống với giao dịch nội bộ chỉ với một sự khác biệt nhỏ là người đao phủ hoạt động cho môi giới của khách hàng chứ không phải doanh nghiệp của khách hàng.

What is a front-running bot?

Frontrunning is done using crypto front-running bots functioning on a millisecond-scale timeframe. Before a person blinks, they can read a string of transactions, calculate the optimum transaction size and gas price, configure the transactions and run them.

Cốt lõi của một bot chạy phía trước hoạt động bằng cách lắng nghe các giao dịch đang chờ xử lý trên blockchain. Tương tác với blockchain bằng cách sử dụng một kịch bản tương tác, bot mua trước khi người mua và bán ngay sau đó. Các bot phân tích các xu hướng của mật mã và thực hiện các giao dịch để tạo ra lợi nhuận.

Chiến thuật chạy trước trên sàn giao dịch phi tập trung

When a trade occurs, the system broadcasts it to the blockchain, requiring miners to verify the transaction. However, in any blockchain of significance, the stream of incoming transactions is more than the capacity of the subsequent block. Unmined transactions are left in a pending transaction pool called a mempool.

Mempools Blockchain là minh bạch, một tính năng mà các vận động viên phía trước khai thác. Nhận được cái nhìn sâu sắc về tâm trạng của các nhà giao dịch, họ có thể dự đoán các biến động giá sắp tới và đặt lệnh riêng cho phù hợp. Họ đặt giá xăng cao hơn cho các giao dịch của họ để khuyến khích chọn giao dịch của họ trước những giao dịch đang chờ xử lý, do đó chạy trước các nhà giao dịch không nghi ngờ.

Các cách để ngăn chặn chạy phía trước ở phía nhà giao dịch

Không có giải pháp duy nhất để giải quyết các vấn đề liên quan đến mặt trước chạy trên tất cả các nền tảng. Thay vào đó, các phương pháp tiếp cận chống front-running khác nhau cần phải được tuân thủ trên các dự án khác nhau, tùy thuộc vào các kịch bản.

Sử dụng các hồ bơi thanh khoản lớn

Front runners are fond of low liquidity pools, as there is less chance of competition as well as disruption of their transaction by a large order that unexpectedly alters the pool weighting. Executing your trades in large liquidity pools makes it less likely to get hit by frontrunning.

Giữ độ trượt tối đa thấp

Does the question “How do I avoid slippage” perennially pricks you? What you can do is set a maximum slippage tolerance in most decentralized exchanges. In other words, you can fix the maximum deviation from the expected return. An example will help you understand the scenario better.

Suppose you place an order on a DEX and expect a return of 500 Tether (USDT) for it. If you set your slippage to 1% of your order, then you won’t be receiving less than 495 USDT. However, if higher slippage tolerance is greater, there will be more deviation.

So, the formula is simple: Keep maximum slippage low, around 0.5%-2%, to fend off front runners. If you are going to place a large order, keep your slippage at the lower keel. Front runners want you to keep slippage high, so better to do just the opposite of it.

Trả quá nhiều về khí đốt

Front runners are delighted to see slow transactions because it gives them more time to devise an order for riding your trade and making profits. Underpaying on gas makes your transactions queue up for longer, providing front runners more time to formulate their strategy and damage your interests.

Overpaying on gas motivates miners to validate your transaction faster, minimizing your odds of becoming the target of a bad actor. For this purpose, you might set the gas price to higher than average or simply use the fast gas option on your wallet. If you are placing a large value order, it becomes even more important to try and complete the transactions with alacrity.

Place a low-value order

To make a profit, front runners have to meet some minimum thresholds. They have to pay the gas fees twice, on entering and exiting the market, and also recover the amount paid as the trading fee. Their profits begin only after they get back their expenses.

Currently, prominent Ethereum-based automated market makers such as Uniswap, Balancer and SushiSwap pay a gas fee of $25 per transaction. As they need two transactions to execute frontrunning, they are likely to spend $50 to complete the trade. It also means if your trade is raking in less than $50 profit, there are negligible odds of you becoming the target of the frontrunners.

When you enter a low-value trade, you practically make it an unprofitable venture for frontrunners. Most of the time, trading with amounts under $1,000 is safe.

Find a taker

A publicly-hosted order book is the first thing to draw front runners. If you manage to find a taker, you will be able to fill a given order and will be able to keep away from public markets and, subsequently, front-running. When you find a taker and negotiate a price successfully, a trustless on-chain exchange gets executed.

Các cách để ngăn chặn chạy phía trước ở phía DEX

DEXs can take care of several design points to make front-running difficult to execute:

Khớp nhanh

Front runners look for slow matching speed to place their orders before the execution. A DEX can ensure fast matching to leave little room for front runners to put their process to motion. Super quick block time will effectively make the front runners unable to react. For most frontrunners, who are not so technically inclined, this should be enough.

Decentralized match engine

In the case of a centralized matching engine, it is hard to establish that the exchange itself is not involved in front running. Decentralized matching engines, on the other hand, allow anyone running a full node to view the matching in real time. They can match the transaction in the latest block manually with the current order book.

Kết hợp đấu giá định kỳ

Periodic auction matching adds an extra layer of security from the front running. It adds a non-deterministic layer making it improbable for anyone to know the next execution price unless they are aware of the matching logic, the incoming orders for the next block and the trade price and the current order book from the last match.

How to avoid front-running in Ethereum 2.0

Some traders wonder about the impact of the full release of Ethereum 2.0 later in 2023, merging the mainnet with Beacon Chain and introducing a proof-of-stake (PoS) consensus mechanism. Validators who are supposed to process transactions in an epoch will be intimated of their positions beforehand.

An epoch is a defined span of time in a blockchain network. This time frame is used to describe when certain events in a blockchain network will take place, such as when incentives will be distributed or when a new group of validators will be allocated to validate transactions.

Related: Ethereum upgrades: A Beginner’s Guide to Eth2

In this scenario, it will be harder for front runners to find profitable trades in a blockchain teeming with transactions, but not impossible. Many frontrunners out there are technically proficient, so you can’t just rule out the possibility. DEXs can cover design points like quick matching, decentralized match engine and periodic auction matching to minimize the odds of front-running.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *