You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.
Mainnet is generally slow, therefore we need to find ways to improve the dapp responsiveness.
One part of the job is to optimize the number of calls to the back-end node (currently Infura).
At the moment the dapp gathers info by doing various calls to various methods. For example:
let dragoData = poolApi.contract.drago.getData()
let dragoTotalSupply = poolApi.contract.drago.totalSupply()
let dragoETH = poolApi.contract.drago.getBalance()
let dragoWETH = poolApi.contract.drago.getBalanceWETH()
It would be very helpful if that could be accomplished with a single call. The above is just an example, therefore we should review the protocol contracts to see what information can be centralized in a single proxy contract. The most, the better.
A further step could be to have the proxy to return an array of funds, so for example we could call the proxy and pass an array of pools' addresses, and the fund would return ad array of information (those previously suggested).
This would help a lot when we need to show information for many funds, for example in the home page:
In the above screen I would like to show the fund's prices, supply and so on. This means that dapp needs to make calls for each funds. A good solution would be to call the proxy funds with batches of 5 funds each time (or more if feasible), so that the dapp would only make 1 single call for each page.
The text was updated successfully, but these errors were encountered:
Mainnet is generally slow, therefore we need to find ways to improve the dapp responsiveness.
One part of the job is to optimize the number of calls to the back-end node (currently Infura).
At the moment the dapp gathers info by doing various calls to various methods. For example:
It would be very helpful if that could be accomplished with a single call. The above is just an example, therefore we should review the protocol contracts to see what information can be centralized in a single proxy contract. The most, the better.
A further step could be to have the proxy to return an array of funds, so for example we could call the proxy and pass an array of pools' addresses, and the fund would return ad array of information (those previously suggested).
This would help a lot when we need to show information for many funds, for example in the home page:
In the above screen I would like to show the fund's prices, supply and so on. This means that dapp needs to make calls for each funds. A good solution would be to call the proxy funds with batches of 5 funds each time (or more if feasible), so that the dapp would only make 1 single call for each page.
The text was updated successfully, but these errors were encountered: