What is a layer 2 in Bitcoin?
A system built on top of Bitcoin that handles payments off the main chain, using it mainly to settle. The Lightning Network is the best known.
The main chain is layer 1: secure but limited in space. A layer 2 moves the frequent, small activity elsewhere and anchors back to the chain for finality, aiming for speed and low cost without changing Bitcoin's rules.
Lightning settles through payment channelsPayment channelA shared pot of bitcoin between two parties on the blockchain, which they can pay each other from, off-chain, as often as they like.; sidechainsSidechainA separate blockchain that bitcoin can move to and back from, trading Bitcoin's rules for different features or speed. like Liquid run a parallel chain with a peg. What a layer 2 gives up for that speed varies — channels need liquidity and watchfulness, sidechains need trust in their operators.