Skip to content

feat(registry): configurable protocol-fee recipient (#99) - #226

Merged
samjay8 merged 2 commits into
Stellar-VaultLink:masterfrom
ZacLou:feat/set-fee-recipient-99
Sep 4, 2026
Merged

feat(registry): configurable protocol-fee recipient (#99)#226
samjay8 merged 2 commits into
Stellar-VaultLink:masterfrom
ZacLou:feat/set-fee-recipient-99

Conversation

@ZacLou

@ZacLou ZacLou commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #99

Adds a configurable protocol-fee recipient address to the Registry contract:

  • set_fee_recipient(address) is admin-gated (same threshold pattern as set_fee) and emits a ee_rcpt governance event.
  • get_fee_recipient() returns the configured address, defaulting to the admin for existing deployments.
  • Repayment now routes fee transfers to
    egistry.get_fee_recipient() instead of always using the primary admin signer.

Fee rate and collection math are unchanged per the issue scope.

cargo test -p invofi-registry and cargo build --workspace pass.

…k#99)

Closes Stellar-VaultLink#99

- Add Registry::get_fee_recipient and Registry::set_fee_recipient,
  admin-gated and stored in instance storage, defaulting to the admin.
- Emit a fee_rcpt governance event when the recipient changes.
- Wire Repayment to route fee transfers to registry.get_fee_recipient()
  instead of always using the primary admin signer.
- Add registry tests for default, set/get, and unauthorized access.
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: b40d8636-f736-4d8e-88a5-646ff150f687

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "path_rules"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@samjay8 samjay8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Auto-merge bot⚠️ You are not assigned to issue #99.

Please request assignment before opening a PR. Maintainers assign issues to avoid duplicate work and ensure quality review.

Once assigned, this PR will be re-evaluated automatically.

@samjay8 samjay8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Auto-merge bot — ❌ CI failed. What broke:

  • Soroban Scout (failure)
    (no details — see the check log)

Please fix and push — I will re-check automatically.

@samjay8 samjay8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Auto-merge bot — ✅ All required CI checks and the CodeRabbit review passed.

This PR accomplishes:

  • set_fee_recipient(address) is admin-gated (same threshold pattern as set_fee) and emits a ee_rcpt governance event.
  • get_fee_recipient() returns the configured address, defaulting to the admin for existing deployments.
  • Repayment now routes fee transfers to
    egistry.get_fee_recipient() instead of always using the primary admin signer.
    Diff: the diff — verified within scope.
    CI is green — merging now.

@samjay8 samjay8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Approved — all required CI checks and the CodeRabbit review passed.

@samjay8
samjay8 merged commit e0a0bc3 into Stellar-VaultLink:master Sep 4, 2026
9 of 10 checks passed
@samjay8

samjay8 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🎉 Merged — thanks for the contribution!

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.

Configurable protocol-fee recipient (admin-set, with event)

3 participants