uxd-program
                                
                                
                                
                                    uxd-program copied to clipboard
                            
                            
                            
                        Sell collateral diff and Settle USDC balance after closing the short perp position
The verification of "filled" quantity did not work...
Putting these here to remember. Will do today.
The settling need to be caller right before doing a new order seems. Might be costy computing wise
                                    
                                    
                                    
                                
More on settlement 
This should be done only if it's positive, else we just sell the remainder collateral and keep the usdc on the account