[CIP-87] Expose penalty cap on /trades API - #4878
Conversation
|
Reminder: Please consider backward compatibility when modifying the API specification.
Caused by: |
|
Claude finished @fleupold's task in 2m 57s —— View job Review: [CIP-87] Expose penalty cap on /trades API
This looks solid and ready to merge. The implementation mirrors the existing What I checked:
Minor, non-blocking observations (no change required):
Nice touch making the API assertion part of the e2e test. |
MartinquaXD
left a comment
There was a problem hiding this comment.
Logic looks sound but wouldn't it make more sense on the /solver_competition endpoint? Quasilabs even said they would use the native prices from the competition endpoint to convert the native price to some unit they care about.
I'm okay to merge this as is because it's arguably also a property on the specific trade but for the purpose of reasoning about the performance of the solver having this data in the solver competition endpoint seems more practical.
Yes, I think that would make sense to. The reason I added it here is that, conceptually, I find it closest to the fee policies, which are also only exposed here. If we want to expose more things about the order on the solver_competition endpoint, I think we would need to redesign that schema a bit. If many solution settle the same order, we probably don't want to repeat a ton of information which is the same for the same order. |
Description
Quasilabs complained that the penalty cap is not readable from the API. Since - like protocol fees - they can change from auction to auction, this PR adds them on the same endpoint where executed fee policies can be found, namely the
/tradesendpoint.Changes
How to test
Made API check part of the e2e test