Skip to content

Commit

Permalink
program: validate fee structure (#1075)
Browse files Browse the repository at this point in the history
* program: validate fee structure

* CHANGELOG
  • Loading branch information
crispheaney authored Jul 15, 2024
1 parent 7ff716b commit 1837f3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

0 comments on commit 1837f3f

Please sign in to comment.