Skip to content

feat: add builder parameters to order modification and creation#2140

Draft
ChesterSim wants to merge 2 commits intochester/be-211-enforce-builder-codes-for-swift-orders-add-builder-params-tofrom
chester/be-211-enforce-builder-codes-for-swift-orders-add-builder-params-to-2
Draft

feat: add builder parameters to order modification and creation#2140
ChesterSim wants to merge 2 commits intochester/be-211-enforce-builder-codes-for-swift-orders-add-builder-params-tofrom
chester/be-211-enforce-builder-codes-for-swift-orders-add-builder-params-to-2

Conversation

@ChesterSim
Copy link
Collaborator

  • 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.

- 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.
@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 87bd7d43-ba92-45d7-ba56-396de5927ae4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

- 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.
@ChesterSim ChesterSim marked this pull request as draft March 11, 2026 09:58
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>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a breaking change and as is will break existing sdk users

I think you either have to:

  1. add a new ix with the new order param length
  2. add a custom ix handle like we did with the mm oracle that can handle deserialing order params of different lengths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants