Skip to content

Add set-market-fee-recipient, and SET_MARKET_FEE_RECIPIENT to run it - #357

Merged
rbcp18 merged 1 commit into
developfrom
claude/determined-gauss-64nhor
Sep 23, 2026
Merged

rbcp18 merged 1 commit into
developfrom
claude/determined-gauss-64nhor

Conversation

@rbcp18

@rbcp18 rbcp18 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

A market with no fee recipient pays its marketplace fee to its owner, and every market bootstrap-markets creates is owned by the deployer. This adds a task to point a market's fee at another address, and a deploy-chain.sh mode to run it.

  • helpers/tasks/set-market-fee-recipient.ts: same shape as set-market-payment-default.
    • Market ids come from the registry, so it runs on any chain.
    • Markets owned by another signer are reported and skipped.
    • The recipient is checksum-validated and may not be the zero address, which the registry would read as "unset".
    • The value is read back after the write.
    • --markets is required; it never sweeps every market by default.
  • scripts/deploy-chain.sh: SET_MARKET_FEE_RECIPIENT=true with MARKET_FEE_RECIPIENT, MARKET_FEE_MARKETS and MARKET_FEE_DRY_RUN, placed after SET_PAYMENT_DEFAULT and listed in the "nothing to do" help.

The change applies to loans funded from now on; fees already paid are unaffected.

Testing

  • bash -n scripts/deploy-chain.sh
  • The task typechecks under tsc --strict against ethers 6 and hardhat 2.
  • It will be exercised as a dry run first, against Robinhood market 3.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DPGQ6yZrEK3E9QwXesRojq


Generated by Claude Code

A market with no fee recipient pays its owner, and every market the
bootstrap creates is owned by the deployer. This points a market's fee
elsewhere: ids from the registry, markets owned by another signer skipped,
the value read back after the write. Market ids are required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPGQ6yZrEK3E9QwXesRojq
@rbcp18
rbcp18 merged commit d31849b into develop Sep 23, 2026
2 checks passed
@rbcp18
rbcp18 deleted the claude/determined-gauss-64nhor branch September 23, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants