AMC screencap

The Robinhood trading app has a bug that's allowing users to trade with an infinite amount of borrowed cash, creating what one user called an "infinite money cheat code."

The bug was first discovered by the WallStreetBets sub-reddit on Monday after one user exploited the glitch to turn a $4,000 deposit into a $1 million position.

The company "is aware of the isolated situations and communicating directly with customers," according to a spokesperson.

Visit the Business Insider homepage for more stories.

Robinhood Markets' app has a bug that allowed users to trade with an unlimited amount of borrowed cash, creating what one user called an "infinite money cheat code."

The bug was first uncovered by members of the WallStreetBets sub-reddit. A Monday post showed user MoonYachts exploiting the glitch to turn a $4,000 stake into a $1 million position. He laid out how he pulled off the trades through the "free money cheat," and told other users "DON'T DO THIS."

Here's how the typically-unauthorized trade works:

Users who pay a premium for Robinhood Gold sell call options with money borrowed in the app.

Robinhood incorrectly adds the value of the options sold to the user's cash pile.

This gives the user more capital to trade with, and the more a user borrows, the more the app adds to their buying power.

There seems to be no limit to how much a user can exploit the trick.

Robinhood is "aware of the isolated situations and communicating directly with customers," spokesperson Lavinia Chirico said in an emailed statement. The company didn't comment on when the bug would be fixed, and users will most likely not see their gains realized once a solution is applied.

The traders using the bug could be held liable for their cash and guilty of securities fraud, Georgetown University professor Donald Langevoort told Bloomberg. He added that the participating users may need to "follow the basic law of restitution" and pay back the borrowed cash.

"If you take advantage of someone's mistake to line your own pockets, you need to pay them back," he said.

Read more: These 12 highly shorted stocks have suffered brutal losses this year — but one Wall Street firm says a major threat just passed, and it might be time to buy

Members of WallStreetBets pride themselves on generally ill-advised trading, bragging about "YOLOing" massive sums into high-risk options contracts. Recent posts in the online forum joke about using the glitch to buy everything from entire companies to the South Pacific island nation of Tuvalu.

"We are on path for the 4th time Robinhood has to release a patch/implement new rules to their platform due to one of y'all," WallStreetBets moderator TheDrallen wrote on a post about the bug. "I'd be lying if I said I wasn't proud."

The bug's discovery is loosely a result of the volatile trading behavior promoted on WallStreetBets. Forum member Eddie Choi became an overnight celebrity on the sub-reddit when two high-risk options trades led him to turn $766 into $107,758 in late September.

Not all users win notoriety with massive returns. User ControlTheNarrative used a $2,000 deposit to trade $50,000 worth of Apple put options. When the tech giant traded higher the day the options expired, the trader lost the borrowed money and subsequently posted a video of his reaction to YouTube.

"Why did I do this? Because I could. And if you don't, then you necessarily don't win," the forum member wrote in an October 31 post.

Robinhood's app allows users to trade stocks, options contracts, and cryptocurrencies without commission fees. The company opened a waitlist for its new cash management product on October 8, months after botching its first attempt at unveiling the feature.

Now read more markets coverage from Markets Insider and Business Insider:

US service industries bounced back from a 3-year low in October, bucking recession fears

The Chinese yuan is above the key psychological level of 7-per-dollar for the first time in 3 months. Here's why that's a big deal for markets.

See the pitch deck that landed this Y Combinator startup more than $3 million in funding before they took the stage at the accelerator's famed Demo Day

NOW WATCH: A big-money investor in juggernauts like Facebook and Netflix breaks down the '3rd wave' firms that are leading the next round of tech disruption