Pad Digest #6: Development Update

Pad.Fi | NearPad
4 min readNov 8, 2023

Hello there!

It’s been some time since our last update, in which we highlighted the need for subtransactions to overcome the inherent rigidity of the blockchain when it comes to executing on-chain transactions. To successfully complete large orders, multiple part-fill attempts are necessary. Smart routing is used to split the order and get the order filled optimally. However, before we dive into that, we want to address the unexpected break in communication over the past couple of months.

Integrating disparate protocols through a router can be challenging, especially when the protocols do not adhere to the same routing interface. Since routers can sometimes be set up differently across different protocols, it is important to make sure that the settings are the same on each router to ensure that the data exchange between the two protocols is not only completed successfully but also securely and efficiently. However, the slightest disparity can lead to slippage issues, significantly impacting the liquidity and trading experience. Add Cross-chain compatibility to this mix, and suddenly, you’re dealing with all sorts of edge cases.

Yes, folks, you heard it here first. Pad is shedding its single-chain trappings and embracing the Multi-chain capabilities that are rapidly becoming a staple of the DeFi landscape. The move to support multiple chains is a strategic decision aimed at improving the overall efficiency and flexibility of our operations based on our internal comparative test analysis against some of the industry stalwarts.

By going multi-chain, Pad will be able to offer its users more competitive rates and returns, especially on emerging DeFi ecosystems. The focus on returning maximum value to traders brings us back to some of the complexities we encountered, which include:

  • Proxy Token List: Everything around the algo rests heavily on finding a very good path. The more pairs added, the harder and longer it takes to search for the optimal path. proxy tokens are the most significant tokens that take part in facilitating the swap pools. In other words, they are the assets that provide a high enough liquidity base for swaps. For example, on PAD, that will be ETH, USDT, and NEAR. On most EVM chains, ETH remains the primary proxy token for routing liquidity, followed by the gas-fee token of the blockchain and, finally, Stablecoins. However, this is not standard operating procedure for all protocols, resulting in cases where you may have more than 4. For our algorithm, the difference between 4 and 5 proxy tokens is not 1; rather, it’s roughly 225 operations vs 5000 operations, resulting in a delicate balancing act between maximising returns to traders and minimising the cost of operation.
  • UniV3 Integration: Unlike UniV2, where Liquidity Providers distribute liquidity across all prices, thereby exposing them to the market’s often aggressive volatility, Univ3 enables providers to focus their liquidity provisioning on particular price ranges. Not only does this provide LPs with granular control in hedging risk, but it also allows market makers to support it efficiently. With UniV4 just around the corner and promising more innovations, the need to fully support UniV3 cannot be overstated. Building the initial data state and handling the fees for UniV3 ranges on supported DEXs, especially in cases where the graph’s instance is either missing, glitching out, or slow, took us back to the drawing board to develop our own redundancy systems for handling these problems when they crop up.
  • Data Service Layer Stability: An amusing edge case we came across while stress-testing our algorithm’s performance was getting hit with a ban by our own data infrastructure. Though we succeeded in identifying and resolving the issue, it got us thinking about how to better identify and process genuine, high-frequency trades without having the security systems throw a hissy fit. Turns out there is more than one way to skin a cat or, in our case, make things work out

In conclusion, Pad is embarking on a significant transformation by adopting multi-chain capabilities, marking a strategic pivot within the DeFi landscape. This article has shed light on the technical hurdles we’ve encountered during this transition, emphasising our unwavering commitment to enhancing efficiency and adaptability for our users. The complexities we’ve delved into, including proxy token lists, UniV3 integration, and data service layer stability, reflect our dedication to optimising the trading experience. By navigating these challenges and embracing multi-chain functionality, Pad is poised to deliver more competitive rates and returns to our traders in the dynamic world of DeFi.

As we continue on this transformative path, Pad’s influence on the future of decentralised finance is set to grow, promising further exciting developments on the horizon.

Stay tuned for our next update

Pad.fi Links
Website: https://pad.fi/
Twitter: https://twitter.com/pad_finance
Discord: https://discord.gg/wUzSSUFkc9

--

--