UXDProtocol / uxd-program

Implementation of a program that manages on chain accounts to mint and redeem Redeemables tokens (UXD), hedged by a delta neutral position on underlying DEXes.
https://uxd.fi/
Other
20 stars 5 forks source link

Sell collateral diff and Settle USDC balance after closing the short perp position #33

Open acamill opened 2 years ago

acamill commented 2 years ago

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

Screenshot 2021-10-27 at 7 46 40 AM Screenshot 2021-10-27 at 7 46 48 AM Screenshot 2021-10-27 at 7 47 00 AM
acamill commented 2 years ago

More on settlement image

acamill commented 2 years ago

This should be done only if it's positive, else we just sell the remainder collateral and keep the usdc on the account