Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store all orders in
order_execution
table (#2305)
# Description This PR addresses the issue identified in Sepolia where `total_surplus` was not computed correctly due to missing `order_uids` in the `order_execution` table. This miscomputation was a consequence of [recent changes](#2190) in the workings of the `order_execution` table. The identified problem impacted the `/api/v1/users/{address}/total_surplus` endpoint, leading to lower-than-expected surplus values. This fix aims to ensure accurate surplus computation by addressing the data retrieval process in the database. # Changes After thorough consideration, it was decided to go with the option of reverting the change and saving `order_executions` for all trades. The alternative of building a complicated subquery was deemed overly complex and unnecessary, especially given the context of moving towards a system where all orders are limit orders. This simplification aligns with the future direction and maintains system efficiency. ## How to test #2267 ## Related Issues Fixes #2289
- Loading branch information