How does lightning compare with Monero in terms of privacy?
It doesn't. Monero is zero kyc on every level. Lighting is weighed down by, and doesn't exist, without bitcoin.
TLDR; Monero privacy is better The good: Lightning *sender* privacy is good (onion routed) and it is ephemeral (must actively probe and collect to get any data at the time transaction occurs or it's gone) The bad: Lightning *reciever* privacy sucks, your IP is not hidden by default, and even hidden balances can be discovered. "We identified 27,183 private channels, discovered hidden balances, and showed how a passive adversary can infer payment endpoints with very high probability." https://arxiv.org/pdf/2003.12470.pdf For Monero, IP address is hidden by default (Dandelion++), and amounts and addresses ARE NOT EVEN VISIBLE! (using Confidential Transactions and Stealth Addresses) They are completely hidden! I would strongly recommend Monero if privacy is priority. Although lightning is an improvement over on chain privacy.
Examples of default transactions for each... IP: ? ~6% chance Alice sent $[?] to [?] IP: Alice [?] sent $[?*] to Bob * = discoverable As you see, with lightning, your IP being exposed nullifies lightning's good sender privacy (You know based off IP that it was Alice who sent to Bob) Even if you optionally hide your IP when using lightning with Tor or at least a VPN: The receiver remains distinctly visible (non-ambiguous) and potential to discover amounts is still there. With Monero, the best an adversary has (all things equal) is a probabilistic ambiguous sender (AKA guess work). (1 real sender, 15 decoys) ~6% chance of a ring member being the true sender and that chance falls off rapidly even after 1 hop = ~0.4%, 2 hops = ~0.02%, etc... And unlike Lightning, amounts and recievers are completely hidden.