Skip to content

Align dynamic pool default protocol fee with docs#260

Open
TUPM96 wants to merge 1 commit into
pancakeswap:mainfrom
TUPM96:codex/dynamic-pool-zero-protocol-fee-251
Open

Align dynamic pool default protocol fee with docs#260
TUPM96 wants to merge 1 commit into
pancakeswap:mainfrom
TUPM96:codex/dynamic-pool-zero-protocol-fee-251

Conversation

@TUPM96

@TUPM96 TUPM96 commented May 25, 2026

Copy link
Copy Markdown

Summary

  • Set the initial defaultProtocolFeeForDynamicFeePool to 0 so newly created dynamic-fee pools start with no protocol fee.
  • Update ProtocolFeeController test expectations/comments to match the documented 0% dynamic-fee pool protocol fee.

Fixes #251

Tests

  • C:\Users\tupm96\.foundry\versions\v1.7.1\forge.exe test --isolate --match-path test/ProtocolFeeController.t.sol -vv

Copilot AI review requested due to automatic review settings May 25, 2026 12:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the default protocol fee for newly created dynamic fee pools to be 0% (previously 0.03%), and aligns related test expectations and comments.

Changes:

  • Change defaultProtocolFeeForDynamicFeePool initial value from 300 to 0.
  • Update NatSpec/comments to reflect the new 0% default.
  • Adjust the corresponding test’s expectation/comment for the default value.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
test/ProtocolFeeController.t.sol Updates the test constant and assertion comment to match the new 0% default.
src/ProtocolFeeController.sol Changes the contract’s default dynamic-fee protocol fee to 0 and updates NatSpec text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/// every newly created dynamic fee pool will have this default protocol fee
/// @dev 1000 = 0.1%, the initial setting is 0.03% i.e. 3bps
uint24 public defaultProtocolFeeForDynamicFeePool = 300;
/// @dev 1000 = 0.1%, the initial setting is 0%
/// @notice Set the default protocol fee for dynamic fee pool, this will only impact the newly created dynamic fee pool
/// all those existing dynamic fee pools will not be affected, they will keep using the default protocol fee set at the time of creation
/// @param newDefaultProtocolFeeForDynamicFeePool 1000 = 0.1%, the initial setting is 0.03% i.e. 3bps
/// @param newDefaultProtocolFeeForDynamicFeePool 1000 = 0.1%, the initial setting is 0%
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.

Dynamic fee pools have 0.03% protocol fee instead of documented 0%

2 participants