Skip to content

fix(genesis): pass creatorFeeShare in the Raydium fee-collect examples - #570

Open
brandontulsi wants to merge 2 commits into
mainfrom
brandon/genesis-creator-fee-share
Open

brandontulsi wants to merge 2 commits into
mainfrom
brandon/genesis-creator-fee-share

Conversation

@brandontulsi

Copy link
Copy Markdown
Contributor

Summary

metaplex-foundation/genesis#465 added a required creatorFeeShare account to collectRaydiumCpmmFeesWithCreatorFeeV2. It is Raydium's CreatorFeeShare PDA, which Raydium's CP-Swap creator-fee-share upgrade takes on every creator-fee collect. The two collect examples on the Creator Fees page don't pass it, so they no longer compile against the current client or succeed on-chain.

  • Pass creatorFeeShare: pdas.creatorFeeShare in both collect examples. deriveRaydiumPDAsV2 already returns it.
  • Require @metaplex-foundation/genesis 0.43.0 or later in Prerequisites.
  • Add a Notes bullet: the account doesn't need to exist on-chain and must come from the same deriveRaydiumPDAsV2 call as ammConfig. A mismatch fails with InvalidRaydiumCreatorFeeShare (260); clients older than 0.43.0 fail with NotEnoughAccountKeys.
  • Same changes in ja/ko/zh, and bump updated.

Why the examples break today

Component State
@metaplex-foundation/genesis client 0.43.0 (2026-09-19) and 0.43.1 type creatorFeeShare as required
Genesis program, mainnet Redeployed 2026-09-22; the deployed binary includes the creator_fee_share PDA seed
Genesis program, devnet Redeployed 2026-09-24; same

On 0.43.x the current examples fail to type-check with Property 'creatorFeeShare' is missing. Run as plain JS, the client puts the Genesis program ID in that slot and the program rejects it with InvalidRaydiumCreatorFeeShare. Clients on 0.42.0 or earlier fail with NotEnoughAccountKeys.

Protocol fee tables are unaffected

Raydium's upgrade lets it keep a share of the creator fee when the fee is collected. For Genesis pools that share is 0 today:

  • creator_fee_share_rate is 0 on all four Genesis AMM configs (mainnet and devnet, creator rewards on and off).
  • No CreatorFeeShare override exists for the Genesis Raydium signer on either network.
  • Mainnet CP-Swap hasn't shipped the upgrade yet (last deployed 2026-09-10).

If Raydium sets a rate later, the CPMM protocol fee and creator revenue rows (#566) both shrink by that fraction, since Genesis splits whatever Raydium releases.

Testing

  • Type-checked both collect examples against @metaplex-foundation/genesis 0.43.1 with tsc --strict: they pass, and the versions on main fail with Property 'creatorFeeShare' is missing.
  • next dev: the page renders the new code line, Prerequisites line and Notes bullet in en, ja, ko and zh.
  • markdownlint-cli2 on the changed pages and validate-translations pass.
  • The ja/ko/zh code blocks are byte-identical to en, and the translated text reuses each locale's existing terms. A native-speaker skim is welcome.

metaplex-foundation/genesis#465 made `creatorFeeShare` a required account
on `collectRaydiumCpmmFeesWithCreatorFeeV2`. The 0.43.0 client requires
it and the program that checks it is live on mainnet and devnet, so the
collect examples no longer compile or land on-chain.

- Pass `creatorFeeShare: pdas.creatorFeeShare` in both collect examples
- Require `@metaplex-foundation/genesis` 0.43.0 or later
- Note the account, the `InvalidRaydiumCreatorFeeShare` (260) and
  `NotEnoughAccountKeys` failures, and bump `updated` (en/ja/ko/zh)
@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
developer-hub Ready Ready Preview Sep 25, 2026 7:08pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Essentials

Run ID: 585c4b76-645d-4efa-8d6d-741c911d96c1

📥 Commits

Reviewing files that changed from the base of the PR and between 80e3a83 and adb2ffb.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Essentials

Run ID: 9f2566e3-e9fc-46f8-8f27-da4e5d855390

📥 Commits

Reviewing files that changed from the base of the PR and between b2bf7ba and 80e3a83.

📒 Files selected for processing (4)
  • src/pages/en/smart-contracts/genesis/creator-fees.md
  • src/pages/ja/smart-contracts/genesis/creator-fees.md
  • src/pages/ko/smart-contracts/genesis/creator-fees.md
  • src/pages/zh/smart-contracts/genesis/creator-fees.md

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Summary by CodeRabbit

  • Documentation
    • Updated the creator-fee guides to require Genesis SDK 0.43.0 or later and include the required account in Raydium fee-collection examples.
    • Added guidance on deriving and matching the account, and clarified the errors that occur with mismatched accounts or older SDK versions.

Walkthrough

The Genesis creator-fee guides in four locales now specify the creatorFeeShare requirement and Genesis SDK version, document related failure cases, and update both Raydium collection examples.

Changes

Creator-fee guide

Layer / File(s) Summary
Account requirements and failure cases
src/pages/{en,ja,ko,zh}/smart-contracts/genesis/creator-fees.md
The guides require Genesis SDK 0.43.0 or later and describe deriving creatorFeeShare, account mismatch errors, and the error from older SDK versions. They also update the document date.
Raydium collection examples
src/pages/{en,ja,ko,zh}/smart-contracts/genesis/creator-fees.md
Both collection examples pass pdas.creatorFeeShare to the collection instruction.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 80e3a

The four localized guides consistently document the required account and updated collection examples. No material merge risk is evident.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: passing creatorFeeShare in the Raydium fee-collection examples.
Description check ✅ Passed The description directly explains the required account change, SDK prerequisite, error behavior, translated pages, and reported validation results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

This branch was successfully deployed

1 active deployment
Preview — adb2ffb1 Deployed Sep 25, 2026 by vercel[bot]
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