Could we say that layer 2 always uses the native currency of the mainnet?
For example, layer 2 of Ethereum, and that sidechain uses its own currency, its own consensus algorithm...
This is actually not an accurate distinction.
For example the lightning network is NOT a side chain it is a layer 2 and it uses real bitcoin and nothing else to make transactions.
The liquid network IS a side chain AND uses real bitcoin AND uses other currencies which it can create through covenants.
The rootstock network IS a side chain, uses real bitcoin and also allows for other smart-contract style assets.
Effectively both need to use the native currency of the base layer in order to operate AT ALL.
To go into consensus algorithm, a layer 2 generally does not implement consensus it WORKS WITH the available consensus at the base layer.
Side chains on the other hand REQUIRE a consensus mechanism as they are distributed chains of their own who need Sybil resistance in order to work.
Lightning doesn't have a "consensus mechanism" but they do have a TON of best practices for not allowing your atomic multi-path payments to become lost to counter-parties. All of this work is settled on the base layer of bitcoin so anything that happens in the lightning network happens at the whim of each individual user and their responsibility.over their assets on the channels.
To talk (briefly) about Ethereum (please dont discuss that shit here there's a dedicated altcoin space)
They have a few "roll ups" which are effectively groups of trusted parties who allow multiple users to batch transactions from the l2 to the main chain in one transaction. This is problematic because the trusted parties and the l2 itself become a censorship (and other exploit) vector because they behave effectively like an account with custody control. Since there has been NO attempt to build sybil resistance at the l2 layer on Ethereum (or at the base layer for that) and there has been no attempt to create a side-chain on Ethereum (because their community does not believe in distributed decentralized consensus mechanisms) you can HARDLY call any of these implementations a REAL l2 .