[Ethereum] difference between metamask and ethereum provider

blockchaingo-ethereummetamaskweb3-providers

enter image description here

I found this image online but I can't tell the difference between metamask and an Ethereum provider. Also doesn't metamask use a provider to connect to the network?
I'm confused

Best Answer

Yes, Metamask uses Infura in the background to connect to the network. So Metamask is a user interface on top of Infura service.

However, nothing forces you to use Metamask, it just happens to be handy for user interactions. But typically a dApp has also a separate backend connection to Ethereum: for example the backend needs to read token balances and present them for the user, so the backend uses a direct RPC connection to some Ethereum node (or to a node service provider, such as Infura).

So it all depends on your needs.

Related Topic