So, the word “lyam” is a slang term that is often used to refer to a million. You know how we say “shchuka” instead of a thousand? Well, similarly, “lyam” replaces the word “million.” So 1 lyam is one million.
Now imagine: you are working and have finally gathered 1 million hryvnias. Instead of saying “I have one million,” you can simply say “I have 1 lyam.” It sounds simpler and maybe even a bit cooler (not a fact).
Most likely, this slang expression was created like this: million -> lemon -> lyam.