The purpose of this function is uncross the L2 orderbook by modifying the bid/ask price at the top of the book
This will make the liquidity look worse but more intuitive (users familiar with clob get confused w temporarily
crossing book)
Things to note about how it works:
it will not uncross the user's liquidity
it does the uncrossing by "shifting" the crossing liquidity to the nearest uncrossed levels. Thus the output liquidity maintains the same total size.
The purpose of this function is uncross the L2 orderbook by modifying the bid/ask price at the top of the book This will make the liquidity look worse but more intuitive (users familiar with clob get confused w temporarily crossing book)
Things to note about how it works: