Skip to content

Commit 74125c2

Browse files
committed
update docs
1 parent 5a3e936 commit 74125c2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,8 @@ const pipeline = [
157157

158158
Additionally there is a script to generate auxiliary config files, executed by `pnpm run generate-config`. Currently it fetches the list of supported [Pendle aggregators](./src/swapService/strategies/aggregators/sources/pendle/pendleAggregators.json) for all chains
159159

160+
## Selecting providers
161+
Instead of fetching all quotes in a single call, which is as fast as the slowest provider's response, clients can send parallel requests with providers preselected in the optional `provider` query param. The endpoint `\providers` lists available providers per chain. The list is rarely updated so it can be cached on the client.
162+
160163
## Tokenlists
161164
The router relies on tokenlists for all swapped tokens. They can be fetched from `TOKENLIST_URL` or read from JSON files in `tokenLists` folder if the configuration is missing. Note the files are not updated currently. Please reach out on [Euler discord](https://discord.com/invite/pTTnr7b4mT) if you need access to the tokenlist endpoint.

src/swapService/strategies/strategyERC4626Wrapper.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,12 @@ export class StrategyERC4626Wrapper {
287287

288288
if (!result.supports || !result.match) return result
289289

290+
// if the swap is between a vault and it's asset, which is handled directly,
291+
// only proceed if the provider is not set (all providers) or it's the "custom" provider.
292+
// Otherwise return an empty result, which will end the pipeline and return 404.
293+
// Without this, the client would receive duplicate internal quotes
290294
if (this.isDirectSwap(swapParams) && !includesCustomProvider(swapParams)) {
291-
result.quotes = [] // this ends the pipeline and returns empty results
295+
result.quotes = []
292296
return result
293297
}
294298

0 commit comments

Comments
 (0)