-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Reserved-Assets]: Sending reserved-assets updates to frontend #273
Comments
Also, Pai is ashamed of himself for doing this to the code. |
The purpose here for RESERVE_UPDATE_TRANSACTION is to modify 2 new variables introduced - reservedCash and reservedStocks, since the structure of the transaction was not changed, it required a hack ie. the update transaction. To remove this - FromExchangeTransaction ASK FOR 5 stocks by user 1 USER 1 AFTER STOCK GETS MATCHED // say it gets matched for 4 stocks at 250 rs transaction( id, 2, stockId, OrderFillTransaction, 0, 4, 250, -1000,0, createdAt) @PaiAkshay998 @Harsh2098 your views on this approach |
I'm not entirely sure if this is the best way to go. Feel like our current transaction is able to handle / contains all the necessary information about each type of transaction. However, the reserve stock changes had a few issues with us manually resetting values of Ask Order fill transaction or something of that sort which has been discussed in greater detail in #289. The issue deals with not having to do that which requires some fundamental change in how our matching engine works. |
|
And also there would be one more advantage, uniformity in the way we handle transactions in Main.tsx, we won't require a switch, just add to the corresponding variable irrespective of transactions. |
This is bad. The first thing to do for next year is to undo whatever this issue asks you to. Since we now reserve assets prior to execution of requests, all subsequent OrderFillTransactions received to the frontend will only contain partial information. OrderFillTransactions will no longer have details like how much stocks were sold for an AskOrder, how much cash was taken from reserved cash for a BidOrder.
Solution
The text was updated successfully, but these errors were encountered: