Skip to content

Commit

Permalink
OKX solver update (#109)
Browse files Browse the repository at this point in the history
# Summary
Addressing PR #104 comments.

# Details
1. Replaced `lru-cache` crate with `moka` to improve inserting data into
the cache (now using segmentation blocking).
2. Sending `/swap` and `/approve-transaction` requests in parallel to
improve latency.
3. Moved preparation and sending of the API requests to separate
function which is now instrumented using one tracing span for both API
calls.
4. Added test which checks if cache is used (evaluating two swaps of the
same tokens should result in only one `/approve-transaction` request).

# How to test
Existing tests and newly added test.
  • Loading branch information
mstrug authored Feb 7, 2025
1 parent 33c94ee commit 0fcbfe5
Show file tree
Hide file tree
Showing 6 changed files with 809 additions and 129 deletions.
Loading

0 comments on commit 0fcbfe5

Please sign in to comment.