Skip to content
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

program: validate fee structure #1075

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- program: add oracle id for wen ([#1129](https://github.com/drift-labs/protocol-v2/pull/1129))
- program: track fuel ([#1048](https://github.com/drift-labs/protocol-v2/pull/1048))
- program: validate fee structure ([#1075](https://github.com/drift-labs/protocol-v2/pull/1075))

### Fixes

Expand Down
2 changes: 1 addition & 1 deletion programs/drift/src/validation/fee_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn validate_fee_structure(fee_structure: &FeeStructure) -> DriftResult {
)?;

validate!(
fee_structure.flat_filler_fee <= OPEN_ORDER_MARGIN_REQUIREMENT as u64,
fee_structure.flat_filler_fee < OPEN_ORDER_MARGIN_REQUIREMENT as u64 / 2,
ErrorCode::InvalidFeeStructure,
"invalid flat filler fee {}",
fee_structure.flat_filler_fee
Expand Down
Loading