Skip to content

feat: Raise Delegation & Commit Fees 10x - #204

Open
snawaz wants to merge 5 commits into
mainfrom
snawaz/mimd-0030
Open

feat: Raise Delegation & Commit Fees 10x#204
snawaz wants to merge 5 commits into
mainfrom
snawaz/mimd-0030

Conversation

@snawaz

@snawaz snawaz commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Implements MIMD-0030 fee changes:

  • Raise delegation session and commit fees 10x.
    • SESSION_FEE_LAMPORTS: 300_000 -> 3_000_000
    • COMMIT_FEE_LAMPORTS: 100_000 -> 1_000_000
  • Add AccountSpace so PDA creation can use either current rent or legacy rent for funding.
    • Use AccountSpace::LegacyRent(usize) from Delegate* instructions only.
    • Use AccountSpace::CurrentRent(usize) from all other places.

Legacy Rent is computed using information provided in SIMD 0194.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@snawaz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3594e7a5-7a1c-4905-bced-95330fa46b4b

📥 Commits

Reviewing files that changed from the base of the PR and between ba42bb6 and 4ae062a.

📒 Files selected for processing (2)
  • dlp-api/src/consts.rs
  • src/processor/fast/utils/pda.rs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a4e2d21c-a50c-44a6-8276-9f14aa88decc

📥 Commits

Reviewing files that changed from the base of the PR and between 9b95c46 and ba42bb6.

📒 Files selected for processing (7)
  • src/processor/fast/commit_state.rs
  • src/processor/fast/delegate.rs
  • src/processor/fast/delegate_with_actions.rs
  • src/processor/fast/request_undelegation.rs
  • src/processor/fast/undelegate.rs
  • src/processor/fast/undelegate_confined_account.rs
  • src/processor/fast/utils/pda.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds current and legacy funding modes to PDA creation. Fast commit, delegation, and undelegation processors now pass explicit account-space values. Legacy rent calculations and delegation account balances receive test coverage. Public commit and delegation-session fees increase tenfold, while the legacy rent percentage remains for compatibility.

Suggested reviewers: gabrielepicco

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch snawaz/mimd-0030

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@snawaz
snawaz marked this pull request as ready for review August 19, 2026 19:34
@snawaz
snawaz requested a review from GabrielePicco August 19, 2026 19:36
Comment thread dlp-api/src/consts.rs
Comment on lines -5 to -7
/// The delegation session fees (extracted in percentage from the delegation PDAs rent on closure).
pub const RENT_FEES_PERCENTAGE: u8 = 10;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed because it was unused.

@snawaz snawaz self-assigned this Aug 20, 2026
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.

2 participants