I am trying to understand how MetaMask works in browser.

Metamask, as a browser extension, is used to send transactions for ethereum blockchain. After reading some articles, I think one of important things Metamask does is to inject a Web3 instance into the browser's global variable window so that DApp's script could find a provider to make JSON_RPC call.

In web3 instance, there is a currentProvider already defined by MetaMask. I am wondering where this currentProvider pointing to.

I develop and test my own dApp based on a my local private chain so I have an IP and port to create a HttpProvider to allow Dapp to connect to. But I don't know what is the IP and Port used by MetaMask to create a provider.

My questions:
1. Is there a server or cluster set up by MetaMask itself in order to receive transactions from MetaMask browser extension?
2. If no, what mechanism for MetaMask to get active node?
3. Can you provide source code for this part? There are too many projects under metamask so that I cannot find it.

1 Answer 1


Metamask uses Infura as you can see here:


EDIT: It seems they have made some changes and now they are using this package: https://github.com/kumavis/eth-json-rpc-infura

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.