-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump sor to 4.7.5 - fix: cached routes cache invalidation (#747)
- **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) Bug fix - **What is the current behavior?** (You can also link to an open issue here) if the cached routes is invalid, meaning it cant get any swap route at all, it does not get cache invalidated. - **What is the new behavior (if this is a feature change)?** we will invalidate the cached routes by checking to see if the swap route from cache is invalid - **Other information**: we have to roll out with percentage. because there's a chance there are many invalid cached routes in prod. This is somewhat critical to fix prior to V4, because there's a chance that routing caches invalid v4-pool routes. Previously this wasn't much of a concern,. since V3 launched in 2021, and cached routes was rolled out in 2023, so the v2 and v3 pool TVLs won't change that much, although concentrated liquidities can change based on the market pricing. I expect with v4, there will be more dynamics from 0 TVL to some TVLs, hence cached routes have more chance of caching invalid v4-pool routes.
- Loading branch information
Showing
9 changed files
with
321 additions
and
57 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// NOTE: intent is a routing-api concept, | ||
// but we have to introduce this strongly-typed enum in SOR to ensure some codepath only gets executed during async path | ||
export enum INTENT { | ||
CACHING = 'caching', | ||
QUOTE = 'quote', | ||
SWAP = 'swap', | ||
PRICING = 'pricing', | ||
} |
Oops, something went wrong.