AugurProject / turbo

Simple, AMM-based Prediction Markets backed by Chainlink Oracles.
MIT License
27 stars 23 forks source link

Reducing RPC requests #1557

Open akreider opened 2 years ago

akreider commented 2 years ago

For long term sustainability, it is important that the number of RPC requests is limited to an amount that can be handled by a free, or relatively low cost, service. For instance, I have maxed the free Infura plan (100k requests/day) once - so I upgraded to a paid plan.

Ideally there would be so few requests that Augur (or an Augur affiliated organization) could run a proper RPC service for all users.

Now I don't really know what the RPC requests are doing - but assuming they are fetching price data and data on the user's position - here are some brainstormed ideas:

1) Let users specify which markets they are interested in and filter the requests. Ex. I might want to only trade NFL markets.

2) Create an oracle for the market prices and then have users querying that instead of using RPC requests.

3) Filter requests based on what page you are viewing (maybe this is already happening?). For instance, if you are viewing a single market page - don't fetch the data for the other markets.

4) Filter requests based on user activity. If they just left a tab open with a single market, say for 5 minutes during which they haven't opened other pages, you could limit RPC data requests to that market and the user's balances.