-
Notifications
You must be signed in to change notification settings - Fork 18
Initial implementation of payback loan #3793
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @Kailai-Wang's task —— View job PR Review: Initial implementation of payback loanTodo List:
SummaryThis PR implements a comprehensive payback loan feature for the Heima omni-executor system. The implementation includes order cancellation, position closing, fund transfers, and spot trading operations. The code quality is generally good with proper error handling and detailed logging. Code Quality AssessmentStrengths ✅
Areas for Improvement
|
This reverts commit ab18312.
|
Claude finished @Kailai-Wang's task —— View job PR Review: Initial implementation of payback loanTodo List:
SummaryThis PR implements a comprehensive payback loan feature for the Heima omni-executor system. The implementation includes order cancellation, position closing, fund transfers, and spot trading operations. The code quality is generally good with proper error handling and detailed logging. Code Quality AssessmentStrengths ✅
Areas for Improvement
|
|
As agreed with @kziemianek - we'll merge this PR first and address problems in separate PRs. |
Context
As topic - it follows the action of:
It fixes the price calculation too (using meta-and-asset-ctxs instead of mid price)
I detected some small issues in tests - still investigating them, but want to make changes after this PR is reviewed/merged to make it more clear
Edit:
I had a few more commits trying to fix the bugs that I found:
position_sizeinto the loanRecord, which will be used when closing the position - we can't fully rely on theposition_sizefrom the clearingHouseState as it could be the sum of multiple positions (of the same ticker)markPxin the metadata could denote either the highest buy order or lowest sell order, to figure that out, we'll need to compare it withmidPxNote:
occasionally, I still see position opening order gets silently ignored (I get
unknownOidif I query it) - the encoding of price and size looked ok. I don't know the reason yet..