feat: add builder parameters to order modification and creation#2140
Conversation
- Introduced `builder_idx` and `builder_fee_tenth_bps` to `OrderParams`, `ModifyOrderParams`, and `ScaleOrderParams`. - Updated `modify_order` and `place_perp_order` functions to handle builder parameters, preserving existing builder attribution when not explicitly provided. - Enhanced the SDK to support builder parameters in order placement and modification, ensuring proper escrow account handling. - Added tests to validate the propagation of builder parameters through order modifications.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
- Added `maker_builder_idx` and `maker_builder_fee` to `OrderActionRecord` and related functions to support maker-specific builder fees. - Updated `fill_perp_order`, `fulfill_perp_order`, and other relevant functions to handle maker builder parameters, ensuring proper fee calculations and escrow handling. - Enhanced SDK to accommodate new maker builder parameters in order placement and fulfillment processes. - Introduced tests to validate the integration of maker builder parameters across order operations.
crispheaney
reviewed
Mar 11, 2026
| pub auction_duration: Option<u8>, // specified in slots | ||
| pub auction_start_price: Option<i64>, // specified in price or oracle_price_offset | ||
| pub auction_end_price: Option<i64>, // specified in price or oracle_price_offset | ||
| pub builder_idx: Option<u8>, |
Member
There was a problem hiding this comment.
this is a breaking change and as is will break existing sdk users
I think you either have to:
- add a new ix with the new order param length
- add a custom ix handle like we did with the mm oracle that can handle deserialing order params of different lengths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
builder_idxandbuilder_fee_tenth_bpstoOrderParams,ModifyOrderParams, andScaleOrderParams.modify_orderandplace_perp_orderfunctions to handle builder parameters, preserving existing builder attribution when not explicitly provided.