-
Notifications
You must be signed in to change notification settings - Fork 25
Provide Default Sponsored RPC Endpoint in SDK #765
Description
taco-web currently requires integrators to provide their own RPC endpoint when interacting for encryption & decryption. However, this endpoint is not used for adopter logic, but exclusively for TACo protocol (specifically, this endpoint should be Polygon Mainnet or Amoy). This is particularly confusing if developers are not using the same chain ecosystem that our protocol (currently Polygon).
Example from our docs:
const signerProvider = new ethers.providers.Web3Provider(window.ethereum);
// Protocol-exclusive RPC provider here !!!!!
const polygonProvider = new ethers.providers.JsonRpcProvider("https://polygon-amoy.drpc.org");
const message = "my secret message";
const ritualId = 6
// encrypt data
const messageKit = await encrypt(...);This has caused recurring UX issues:
- Developers frequently connect to the wrong chain
- Incorrect RPC configurations cause hard-to-debug errors
- Rate limits and archive support vary between providers
- Increased support overhead for potential integration
Proposal: Introduce a default, protocol-sponsored RPC endpoint in the SDK. The API doesn't change much, since it's only a default: If no RPC is provided, SDK falls back to our managed endpoint, but of course, developers can override with their own RPC if desired. This is the same approach we currently have for Porter.
Sponsored endpoint may restrict usage to:
- Whitelisted protocol contract addresses
- Specific method selectors (optionally)
- Read-only calls
Estimated Monthly Infra Cost: Based on analysis of major RPC providers:
| Provider | Monthly Cost |
|---|---|
| Alchemy | $49–$299 |
| Infura / QuickNode | $50–$300 |
| Blockdaemon / Chainstack | $20–$200 |