[RFC] Public Access to ExploreStats API Endpoint

Uniswap DAO Proposal: Public Access to ExploreStats API Endpoint

Summary

We propose that the API endpoint:

https://interface.gateway.uniswap.org/v2/uniswap.explore.v1.ExploreStatsService/ExploreStats?connect=v1&encoding=json&message=%7B%22chainId%22%3A%22ALL_NETWORKS%22%7D

be made publicly accessible. This endpoint provides critical data that powers the Uniswap Positions page and offers invaluable insights into multi-chain and multi-version pools.

Motivation

  1. Public Utility: This API serves as a vital resource for developers, analysts, and DeFi enthusiasts to gain real-time statistics on Uniswap pools across different networks and protocol versions.
  2. Ecosystem Growth: Public access fosters the development of third-party tools, dashboards, and analytics platforms, which enhance the Uniswap ecosystem.
  3. Transparency: Making this data publicly accessible aligns with Uniswap’s ethos of decentralization and openness.

Benefits

  • Enhanced Developer Experience: Facilitates easier integration for dApps, wallets, and DeFi analytics platforms.
  • Cross-Chain Insights: Enables comprehensive multi-chain monitoring, supporting growth beyond Ethereum.
  • Community Engagement: Empowers the community to create new utilities and insights, driving innovation.

Technical Considerations

  • Stability: Ensure the endpoint can handle increased traffic from public usage.
  • Security: Monitor for potential abuse while maintaining open access.
  • Documentation: Providing API documentation would enhance usability.

Implementation

  1. Remove Access Restrictions: Adjust server configurations to allow unrestricted public access.
  2. Rate Limiting: Implement basic rate limits to prevent abuse without hampering legitimate use.
  3. Documentation: Publish API documentation for community use.

Conclusion

Making the ExploreStats API endpoint public aligns with Uniswap’s principles of decentralization, transparency, and community empowerment. We urge the DAO to support this proposal to foster a more open and innovative ecosystem.

Have you tried adding the Origin parameter to the header of the GET request with the value set to https://app.uniswap.org?

You’ll need to do this on the server side, as browsers don’t allow modification of this parameter.

I tested it with Postman, and it works.

2 Likes

Thanks. This works with curl and probably be enough for my needs.

Would you say it is reasonable to use it as is, or is Uniswap Labs going to consider it as an abuse of their API ?