Why has the Binance Wallet's gas fee surged? Analyzing the business logic of exchanges

CN
链捕手
Follow
1 year ago

Author: Haotian

The exchange manages a large number of EOA deposit recharge addresses. Every time a user recharges, the assets are transferred to these fragmented small addresses. The funds in these addresses are usually "aggregated" by the exchange for unified asset management.

There are usually two options for exchange address aggregation business:

  1. When a user recharges, the program immediately transfers the corresponding assets to the hot wallet address. However, the problem is that when a user has a recharge demand, it may be divided into multiple times. For example, a big shot generally transfers a small amount first and then gradually transfers in for security reasons. Obviously, this solution is prone to generating more TXS. If the exchange adopts this aggregation method, it will have to bear the high GAS fees when they are high. The transaction fees will also be high. However, the advantage is that the entire aggregation process is decentralized, and the user end will not perceive it. For the exchange, it is just a normal business loss that is needed.

  2. After the user recharges, the scattered small EOA addresses remain unchanged for a period of time. When the user withdraws again, they can directly withdraw from the large hot wallet, and then aggregate the addresses at fixed intervals. This can help with asset management and can choose a time period with relatively low Gas to carry out the transfer operation. However, the difficulty with this approach is that a large number of operations in a short period of time can easily raise the Gas price, and once it attracts media attention, it can easily trigger a public relations event. It is difficult to explain to the public why the exchange needs to aggregate assets, especially when it has consumed so much Gas.

Obviously, Binance has adopted the second address aggregation method. From the perspective of the exchange's business logic, regardless of which method is chosen, there will be a significant amount of business fund loss. Each exchange's asset management strategy may be different.

For better understanding, I have separately looked at two addresses, Binance14 and OKX3. Binance14 adopts the second method, while OKX should be using the first method. However, due to the significant difference in the volume and transaction volume of the two addresses, the data is for reference only.

As shown in Figure 1, the total scale of assets managed by the Binance14 address is nearly 110,000 ETH. As a receiving address, it has historically consumed 10,000 ETH in Gas. And on September 13th, the aggregation consumed 388 ETH in Gas in a single day. The highest daily consumption in history was 871 ETH, so it is normal business loss to consume millions of Gas for address aggregation. Don't let the responsible colleagues for aggregation lose their jobs just because others don't understand.

As shown in Figure 2, the asset scale managed by the OKX3 address is relatively small, but it has historically consumed 1,530 ETH as a receiving address. From the chart, it can be seen that OKX's daily consumption is relatively balanced, with a peak of only 15 ETH in a day, indicating that the first aggregation method is cost-effective during normal times.

As for which method is better, the exchange will definitely calculate and choose the most optimized option suitable for itself. There is no company that does not pursue cost optimization. Although Binance is rich, it will not neglect optimization.

In addition, everyone should understand that exchange asset aggregation management involves cost optimization, security risk control, internal approval processes, fund efficiency, and many other issues. Cost optimization is just one key factor, but not absolute.

  • Cost optimization: If we are serious, we can definitely optimize. I checked the data and found that over 140,000 transactions were sent out in just one afternoon (Beijing time). It is natural to wonder, can't it be spread out over 1-2 days? Can't the program be stopped when Gas congestion is detected? From an engineering perspective, of course it can. The problem is that spreading the time out over 1-2 days, or even 1-2 months, will definitely not cause Gas congestion issues and can save money, but it may also bring other risk issues, which is not much different from the first method.
  • Security risk control: The biggest consideration should still be security. The exchange manages a large number of address private keys, and permissions may be controlled by a system. For engineers to aggregate assets, it is equivalent to obtaining a high-level management permission from the system (calling for private key signatures). Assuming it is a set of HSM cold wallet systems, these systems should be kept off the network as much as possible. Compared to 2 days, having the permission for 2 hours obviously greatly reduces the attack surface, avoiding the system being attacked by hackers. Therefore, the reason 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 should be quite reasonable, right?
  • Internal control process: The exchange system is a large group organization, involving management and execution layers. In order to standardize the asset usage process internally, there will also be an approval process. The most efficient way to manage tens of thousands of EOA address private keys is naturally for the boss to have the highest authority, and then to sign uniformly for one-time processing. If it is divided into small portions and processed in batches, it will involve the distribution of management rights, and there will inevitably be the risk of some employees being a single point of failure. If managed by the boss, the ideal solution is to aggregate at a certain time, and only approve it once. If divided into many addresses, many batches will need to be approved for aggregation, which will tie the boss's energy to the asset aggregation. Is this appropriate?

As for fund efficiency issues, preventing unexpected emergencies, and so on, are all possible.

In short, the issue of exchange asset aggregation is not just a cost issue. It involves very complex aspects. Looking back at Binance14's history, it can be seen that similar high Gas aggregation situations are not isolated cases. Obviously, this is a consistent balanced solution that Binance has arrived at after considering various factors.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

欧易返20%,前100送AiCoin保温杯
链接:https://www.okx.com/zh-hans/join/aicoin20
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink