# Сhoice of node rpc provider
For research we chose several blockchain node rpc providers: [ANKR](https://www.ankr.com/), [Alchemy](https://www.alchemy.com/), [Quicknode](https://www.quicknode.com/), [Flashbots RPC](https://docs.flashbots.net/flashbots-protect/rpc/quick-start), [Chainstack](https://chainstack.com/), [Bloxroute](https://bloxroute.com/), [blastapi]( https://blastapi.io/)
Things, that we are targeting: perfomance and latency, API functionality, blockchains support, product pricing and adoption of the project
### Perfomance and latency
It's hard to say, which rpc provider is the fastest one without conduction your own test. This requires benchmark development and payment for all paid accounts. So I decided to research open solutions for this. After researching several benchmarks:
* https://blog.quicknode.com/justifying-quick-in-quicknode-response-time-comparison-of-various-blockchain-node-providers/
* https://www.comparenodes.com/
* https://chainlist.org/chain/1
It looks like ANKR, Quicknode, Bloxroute are the fastest one. They have low latency and high response rate.
### API functionality
While all of the listed providers have default support of rpc api, it's great to have additional functionality. For us it's important to have possibility to get all tokens balances. While Alchemy and Quicknode has this possibility, ANKR provides the most advanced endpoint. They even return token price, which we can use for sorting tokens on our side.
### Blockchain support (for our current supported networks)
* **ANKR**: Ethereum, Polygon, BNB, Optimism, Arbitrum, Avalanche
* **Alchemy**: Ethereum, Polygon, Optimism, Arbitrum (No BSC and Avalanche)
* **QuickNode**: Ethereum, Polygon, BSC, Optimism, Arbitrum, Avalanche
* **Flashbots**: Ethereum only
* **Chainstack**: Ethereum, Polygon, BSC, Optimism, Arbitrum, Avalanche
* **Bloxroute**: Ethereum, BNB, Polygon
* **Blastapi**: Ethereum, Polygon, BSC, Optimism, Arbitrum, Avalanche
So by this criteria, Alchemy and Bloxroute are not suitable for us.
### Product pricing
* [ANKR](https://www.ankr.com/remote-procedure-call/) - 10 mln credits for 10$
* [Alchemy](https://www.alchemy.com/pricing) - 400 mln CU for 50$
* [Quicknode](https://www.quicknode.com/pricing) - 20 mln credits for 50$
* [Flashbots RPC](https://docs.flashbots.net/flashbots-protect/rpc/quick-start) - free usage, 80 rps rate limit
* [Chainstack](https://chainstack.com/pricing/) - 20 mln requests for 40$
* [Bloxroute](https://bloxroute.com/pricing/) - 300$ only for eth for up to 1500 tx/day
* [blastapi](https://blastapi.io/pricing) - 20 mln api calls for 50$
### Adoption
Most popular one and the most advanced in terms of offered products is the **Alchemy** (0x, rainbow, meta, opensea, zerion, etc). But for our usage we don't need most of the functionality.
**Quicknode** (Opensea, 0x, 1inch, Dune, etc), **ANKR** (1inch, sushiswap, zapper, aave, etc), **Chainstack** (1inch, LayerZero, Axelar, TWT, etc...) looks like popular one.
**Bloxroute** is targeting MEV traders, we don't need that functionality (at least for now).
And **Blastapi** doesn't have a lot of usage (Purestacke, Coingecko, DIA, etc)
### Final decision
For our use case, taking into account all the criterias ANKR will be the best choice to try. It has all the blockchain networks, fast response rate, good enough adoption and reasonable pricing.
After some extensive testing, decision was changed to switch to the quicknode. ANKR arbitrum is not reliable and don't even execute transactions.
### Plan to integrate
* Generate urls for every blockchain
* Update urls on the Backend and Frontend sides
* Try to move current implementation of getting token balances from DeBank API to ANKR API. There is API endpoint to try - https://api-docs.ankr.com/reference/post_ankr-getaccountbalance
* It would be great to have an opportunity for the user to make a private transaction instead of public. For this we need three things:
* Add setting on the frontend to select public/private transaction for Ethereum blockchain
* Add checker on DEMS side for private/public tx. If private, send to the flashbots endpoint, otherwise to the ANKR endpoint
* Update event structure on API/OMS/SE? side, so DEMS would be able to understand, is it private or public tx