# Smart Routing Engine

**WHY ROUTING MATTERS**

• Pain point: Liquidity is scattered across many DEXs; naïve swaps suffer high slippage and fees.&#x20;

• Goal: Return the optimal route—by amount or cost—faster than a blink.

**CORE CAPABILITIES**

• Multi-factor path scoring – What it does: Weighs maximum output, total cost, gas and fees. – Benefit: Always gets the best deal.

• Multi-hop routing and order splitting – What it does: Breaks one swap into N pieces and executes them in parallel. – Benefit: Lower slippage and stronger MEV resistance.

**KEY FACTS**

PinkPunk used to do routing with famous dex aggregators, no matter what third party provider, the time consumption of locating a usable path would be **over 150ms** for certain. \
\
By developing our own routing engine, we successfully compress that time to **50ms max**, in most of the cases, the number would be around **20ms**.

| Action            | With 3rd party dex aggregator | With PinkPunk routing engine                 |
| ----------------- | ----------------------------- | -------------------------------------------- |
| Routing           | \~150ms                       | <mark style="color:green;">**<50ms**</mark>  |
| Full Swap Process | \~750ms                       | <mark style="color:green;">**<150ms**</mark> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pinkpunk-1.gitbook.io/pinkpunk-docs/technical-excellence/smart-routing-engine.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
