Given a stream of transactions at Mercari, write a function to detect potentially fraudulent patterns in real time.