Attached was a rather amusing ticker-tape of the bid/ask in a particular stock that I track:
So the algorithm is to raise the asking price a random and rising value from roughly 14-16 cents a share, increasing range, each and every second.
Just imagine if you were the programmer doing this and accidentally got the code mixed up so you were doing the OPPOSITE. Good programming has many layers of fail-safes to prevent this malicious code from ever breaking through, but once in awhile these result in flash crashes. Knight Capital on August 1, 2012 was another famous example (blowing up their own firm on a single trading day).
If you are the counter-party on these incidents you have to react very quickly to take advantage of errant trading. It is rare when this happens. Mistakes like this also affect illiquid products much more.
Did anyone read the book Flash Boys by Micheal Lewis? (same guy who wrote The Big Short) I found it to be a great read and hugely entertaining. The main Character is a young Canadian banker who worked for RBC at the time, and has since opened his own exchange.
https://en.wikipedia.org/wiki/Flash_Boys