currently i dislike it.
It prefetches everything, makes it slow.
First of all, make an aggregated single endpoint to fetch data so that it's temporarely faster. (Instead of doing Promise.all(20 diff endpoints))
Then, figure out how to make YC Models (open new branch) better in a way that it will not initiallize all the data upfront. And even if it did, you should aggregate calling (i.e instead of doing a single call of getTvl to onchain of all the vaults, make a single multicall and initiallize them all. Can be a static method on the YCStrategy model itself)
Figure out how to integrate that with the frontend, because it definitely has dependcies on the idea that it's all initialized upfront. It shouldnt be too much work i think maybe a few hours, just need to make sure it can handle undefined values and appear as loading for a little
currently i dislike it.
It prefetches everything, makes it slow.
First of all, make an aggregated single endpoint to fetch data so that it's temporarely faster. (Instead of doing
Promise.all(20 diff endpoints))Then, figure out how to make YC Models (open new branch) better in a way that it will not initiallize all the data upfront. And even if it did, you should aggregate calling (i.e instead of doing a single call of getTvl to onchain of all the vaults, make a single multicall and initiallize them all. Can be a static method on the YCStrategy model itself)
Figure out how to integrate that with the frontend, because it definitely has dependcies on the idea that it's all initialized upfront. It shouldnt be too much work i think maybe a few hours, just need to make sure it can handle undefined values and appear as loading for a little