Skip to content

Experiment with funds sourcing logic #1290

@shekhirin

Description

@shekhirin

Currently, we query all supported chains for the asset we're interested in, wait for responses, and source funds starting from highest balances

relay/src/rpc/relay.rs

Lines 1237 to 1238 in d9181d8

// highest balances first
sources.sort_unstable_by(|a, b| b.2.cmp(&a.2));

This requires us to wait for slower RPCs, such as Arbitrum, but we could also limit our waiting to say 50ms and get highest balance from those who replied. An obvious issue is that we'll first drain faster RPCs.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions