Skip to content

program: Cap increase to 50 basis points#791

Draft
joncinque wants to merge 2 commits into
solana-program:mainfrom
joncinque:cap-fee-increase
Draft

program: Cap increase to 50 basis points#791
joncinque wants to merge 2 commits into
solana-program:mainfrom
joncinque:cap-fee-increase

Conversation

@joncinque

Copy link
Copy Markdown
Contributor

Problem

The program currently caps the withdrawal fee increase to 1.5x, which can be a lot at higher numbers.

Summary of changes

Also cap any increase to 50 basis points.

Note: this PR builds on top of #790, so should be merged afterwards. It is also included in the most recent release of the stake pool program on mainnet: https://github.com/solana-program/stake-pool/releases/tag/program%40v2.1.0

joncinque added 2 commits July 9, 2026 18:02
#### Problem

The fee check is using `map` instead of `and_then`, allowing for an
incorrect comparison between `Option::Some(...)` and `Option::None`.

#### Summary of changes

Use `and_then` instead to compare numbers instead of options.
#### Problem

The program currently caps the withdrawal fee increase to 1.5x, which
can be a lot at higher numbers.

#### Summary of changes

Also cap any increase to 50 basis points.
@joncinque joncinque requested a review from 2501babe July 9, 2026 16:06
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.

1 participant