Insight into HbarSuite’s Zero Slippage DEX and Its Resilience Against Minor Issues

Insight into HbarSuite’s Zero Slippage DEX and Its Resilience Against Minor Issues

January 17, 2024

Introduction

At HbarSuite, we continuously strive for excellence and precision in our decentralized exchange (DEX) services. Recently, a keen observation by Matt Smithies brought to light a minor issue in our Zero Slippage DEX. This post aims to shed light on the intricacies of this issue and our proactive approach to resolving it.

The Discovery by Matt Smithies

Smithies noticed a peculiar behavior when swapping small amounts of 1 HBAR or less for HSUITE tokens on two separate machines. Occasionally, these swaps resulted in receiving identical token amounts, a scenario linked to the decimal limits on certain HTS tokens and minimal price oscillations. Example considering HSUITE has only 4 decimals:

  • First swap: 0.1 hbar = 1.2323..000 HSUITE
  • Second swap: 0.1 HBAR = 1.2323…493 HSUITE

Tomachi Anura’s (CTO) Insights on the Issue

Our CTO acknowledged Smithies’ observation, emphasizing the importance of community feedback in enhancing our systems. Despite two audits by Halborn Security, there’s always room for improvement. The identical swaps were not indicative of a flaw in handling high-traffic scenarios but rather reflected the DEX’s capability to offer optimal pricing under specific conditions.

Technical Details and Security Measures

The issue was rooted in the Smart-Rebalance Market Maker (SRMM) algorithm’s complexity. Our Zero Slippage DEX has been rigorously tested against large-scale bot attacks, demonstrating its robustness and balance. Additionally, our SmartNode technology incorporates comprehensive DDOS attack protection, ensuring uninterrupted and secure operations.

Conditions for Reproducing the Issue

To replicate the observed behavior, certain specific conditions were required, including both clients connecting to the same SmartNode and swapping minimal token amounts. The DEX’s design ensures an immediate rebalancing of prices, maintaining a consistent ratio.

Resolution and Community Involvement

Our team has effectively addressed the issue, enhancing the flexibility of token swaps. Users can now swap even the smallest amounts with either varied results or limitations on feasibility. We encourage our community to actively participate in testing our system, offering testnet environments for experimentation and feedback.

Closing Remarks

The proactive identification and resolution of this minor issue underscore our commitment to providing a secure, efficient, and innovative trading experience. We are grateful to Matt Smithies and our community for their vigilance and support in maintaining the high standards of HbarSuite’s Zero Slippage DEX.

We appreciate your ongoing support and look forward to sharing further updates.

Stay Tuned for more updates!