Bug
src/components/ReaderPortfolio.tsx fetches every non-hidden storyline from the DB, then calls balanceOf() for each one to check if the user holds tokens. With N storylines, this is N RPC calls just to find holdings.
Impact: Does not scale. With 100+ storylines, the reader dashboard becomes very slow.
Fix options:
- Use viem
multicall to batch all balanceOf checks into a single RPC call
- Add a subgraph or indexer for token holdings (heavier lift)
- At minimum, add caching with a reasonable TTL
Context: Introduced in PR #87.
Checklist:
Labels: bug, agent/T3
Bug
src/components/ReaderPortfolio.tsxfetches every non-hidden storyline from the DB, then callsbalanceOf()for each one to check if the user holds tokens. With N storylines, this is N RPC calls just to find holdings.Impact: Does not scale. With 100+ storylines, the reader dashboard becomes very slow.
Fix options:
multicallto batch allbalanceOfchecks into a single RPC callContext: Introduced in PR #87.
Checklist:
balanceOfcalls usingmulticallnpm run lintandnpm run typecheckpassLabels:
bug,agent/T3