In a decentralized application or dApp, the entire user activity will not happen on Blockchain. This is because it will unnecessarily clog the blockchain and cost the customer a gas fee. Therefore, only critical transactions that need to be immutable and trustless are uploaded on the blockchain. All such transactions in a local database are called off-chain transactions, and all the transactions uploaded on a Blockchain are called on-chain transactions.