What is on-chain scaling and off-chain scaling? What is the core difference between on-chain scaling and off-chain scaling?
Note, I use scaling, capacity, and scalability as follows:
Scaling: Growing the network's utility in any fashion.
Capacity: The number of transactions that can be processed on the network.
Scalability: Capability of the network to handle a growing amount of work.
The term "on-chain scaling" is frequently used to exclusively refer to increasing the blockchain capacity by means of bigger blocks.
However, in the literal sense of the term, it should refer to any sort of protocol change that improves the network's capacity at the blockchain layer, including changes that facilitate production of equivalent transactions at lower cost. These approaches tend to provide at most a linear capacity increase, although some are also scalability improvements.
- Blocksize/blockweight increase
- Faster blocks
- The witness discount of segregated witness
- More efficient new address formats
- Smaller size of Schnorr signatures
- Cross-input signature aggregation
- Key aggregation
The term "off-chain scaling" refers to approaches that increase the utility of the network without touching the blockchain, or by making superlinearly efficient use of the blockchain load they produce. I also include approaches that create non-equivalent transactions that result in more efficient use of blockspace.
- Batching multiple payments into one transaction
- Virtual payments within the system of a custodian (Tipbots, Coinbase,…)
- Payment Channels/Tumblebit/Lightning Network
- Colored Coins
Generally, off-chain solutions are scalability improvements but go hand-in-hand with a different trust model and different trade-offs. They often require additional software and complexity over on-chain scaling approaches.
For example, Lightning Network will require its users to be online to receive payments while on-chain transactions allow passive receival. On the other hand, it will easily scale the count of payments between participants, but only scale the number of participants in a limited fashion as becoming a LN user requires on-chain transactions.
On chain scaling requires you (or the developers) to change one of Bitcoin's properties (block size limit, transaction format, transaction signature format etc...), while off chain scaling requires building something on Bitcoin that is compatible with older software (for example the Lightning Network that is built on multisig addresses, or the more complex Omni layer).
Off chain is backwards compatible while on chain scaling isn't. On chain code is simpler and easier to maintain.
Also off chain used to be unable to scale without on chain scaling, before this, another complex trick.