beefy-v2 icon indicating copy to clipboard operation
beefy-v2 copied to clipboard

Implement user-definable RPCs

Open DefiDebauchery opened this issue 1 year ago • 0 comments

Beefy's dapp config defines a single system RPC for each network which relies on the connection between the end user and that RPC.

Because routing (and overall uptime) of our chosen RPC endpoints are highly variable, this frequently results in one or more RPCs failing, with little recourse available. Allowing end-users to define their own endpoints in the case of an error (or simply improve throughput) would mitigate these issues.

These overridden values would be contained in localStorage, alongside other application data, and considered when fetching RPC URLs from the core configuration.

I imagine this could be done in three defined stages:

  1. Defining the format for localStorage and updating application code to consider the values.
  2. A UI component to interface with localStorage, displaying and allowing updates to those values (with appropriate sanitation, and validation using eth_chainId), as well as a control on the dapp to access this menu.
  3. Hooks that reload applicable RPC calls when a new value is stored, avoiding having to refresh the page.

DefiDebauchery avatar May 08 '24 14:05 DefiDebauchery