You captured the spread and still lost money
You sell shares at your offer of (mid was ), so you're short . Before you can buy back, the mid rallies to , and you cover by lifting the offer at .
Walk through the P&L. You "earned the spread" on both trades, how did you end up losing?
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.