diff --git a/CHANGELOG.md b/CHANGELOG.md index ec7dbfa06..fee2b8cc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/programs/drift/src/validation/fee_structure.rs b/programs/drift/src/validation/fee_structure.rs index d84bb345a..b07c78dba 100644 --- a/programs/drift/src/validation/fee_structure.rs +++ b/programs/drift/src/validation/fee_structure.rs @@ -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