Why did the gas fees surge for Binance wallet consolidation? Analyzing the exchange's business logic

Haotian
2023-09-24 10:00:47
Collection
The issue of asset aggregation in exchanges is not just a cost problem; it involves a very complex situation.

Author: Haotian


Exchanges manage a large number of EOA Deposit recharge addresses. Each time a user deposits, the assets are transferred to these fragmented small addresses. The funds in these addresses are usually aggregated by the exchange for unified asset management.

The address aggregation business of exchanges typically has two options:

  1. As soon as a user deposits, the program immediately transfers the corresponding assets to a hot wallet address. However, the problem is that a user's deposit needs may be split into multiple transactions. For example, a big player transferring a large amount of funds might first send a small amount, then transfer the rest in smaller increments for safety. Clearly, this approach can lead to more TXs, and if the exchange adopts this aggregation scheme, it will have to deal with high GAS fees when they occur, resulting in high transaction costs. The benefit, however, is that the entire aggregation process is decentralized, and users will not perceive it as anything unusual; for the exchange, it is just a normal business expense.
  2. After a user deposits, the scattered small EOA addresses remain inactive for a period of time. When the user withdraws, they withdraw directly from a larger hot wallet, and then a fixed period is set for address aggregation. This allows for account reconciliation and easier asset management, and it also enables the selection of a time period with relatively low Gas fees for the transfer operations. However, the challenge with this approach is that a large number of operations in a short time can easily drive up Gas fees, and once the media catches wind of it, it can trigger a public relations incident. It is difficult to explain to the public why the exchange needs to concentrate assets, especially when it incurs significant Gas costs.

Clearly, Binance has adopted the second address aggregation scheme. From the perspective of the exchange's business logic, regardless of which option is chosen, there will be significant business cost losses, and each exchange may have different asset management strategies.

To facilitate understanding, I found two addresses: Binance14 and OKX3. Binance14 adopted the second scheme, while OKX appears to have adopted the first scheme. However, due to the significant differences in asset volume and transaction volume between the two addresses, the data is for reference only.

As shown in Figure 1, the Binance14 address manages a total asset scale of nearly 110,000 ETH, and as a receiving address, it has historically consumed a total of 10,000 ETH in Gas. During the significant aggregation on September 13, the daily Gas consumption was 388 ETH, with a historical maximum of 871 ETH consumed in a single day. Therefore, it is normal for address aggregation to incur millions in costs; let's not let misunderstandings lead to the loss of jobs for those responsible for aggregation.

As shown in Figure 2, the OKX3 address manages a smaller asset scale but has historically consumed 1,530 ETH as a receiving address. The chart shows that OKX's daily consumption is relatively balanced, with a peak of only 15 ETH in a single day, indicating that the first aggregation scheme incurs costs during regular operations.

As for which of the two schemes is better, exchanges will certainly calculate a set of optimized choices that suit themselves. No company neglects cost optimization; even though Binance is wealthy, it does not mean they do not optimize.

Additionally, it is important to understand that the asset aggregation management of exchanges involves multiple issues such as cost optimization, security risk control, internal approval processes, and fund efficiency. Cost optimization is just one key factor, but not the absolute one.

  • Cost Optimization: To be precise, optimization can definitely be done. I checked the data and found that over 140,000 transactions were issued between 5-6 PM Beijing time. Naturally, people wonder if it could be spread over 1-2 days. Can't we monitor Gas congestion and stop the program? From an engineering implementation perspective, this is certainly possible. The issue is that if we spread the time over 1-2 days or even 1-2 months, it would not cause Gas congestion and could save money, but it might also bring other risks, which is no different from the first scheme.
  • Security Risk Control: The primary consideration should still be security issues. Exchange managers control a large number of address private keys, and permissions may be managed by a single system. Engineers aggregating assets essentially need to obtain high-level management permissions from the system (to access private keys for signing). Assuming it is an HSM cold wallet system, such systems should be kept offline as much as possible. Compared to 2 days, granting permissions for 2 hours can significantly reduce the attack surface and avoid system hacking. Therefore, the need for rapid aggregation is a major core consideration for security risk control. If spending 300 ETH can effectively prevent 300,000 ETH from being attacked, it seems reasonable, right?
  • Internal Control Processes: The exchange system is a large organizational structure involving management and execution layers. Internally, there will also be approval processes to standardize asset usage. With hundreds of thousands of EOA address private keys, the most efficient method is for the owner to have the highest authority, then unify signatures and process everything at once. If it is divided into smaller parts and processed in batches, it involves distributing management authority, which inevitably leads to the risk of single-point failures for some employees. If managed by the owner, the ideal scenario is to approve everything at a single point in time. If there are many addresses and many batches to aggregate for approval, it would tie up the owner's attention with asset aggregation matters—does that make sense?

As for fund efficiency issues, preventing unexpected situations, etc., are all possibilities.

In summary, the issue of asset aggregation in exchanges is not just a cost issue; it involves a very complex landscape. A review of Binance14's history will reveal that similar high Gas aggregation situations are not isolated cases. It is evident that this is a consistent trade-off scheme derived from Binance's comprehensive consideration of various factors.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators