Skip to content

Cap order money counted toward sell multipliers - #24

Merged
Faboit1 merged 2 commits into
mainfrom
c/trusting-bell-9rzxb2
Oct 4, 2026
Merged

Faboit1 merged 2 commits into
mainfrom
c/trusting-bell-9rzxb2

Conversation

@Faboit1

@Faboit1 Faboit1 commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Fix from a duplication/economy audit.

Problem (High, economy exploit)

With orders.count-toward-multipliers: true (the default), every dollar an order paid counted toward the seller's category multiplier progress. An order's price is whatever its owner typed, so two accounts could:

  1. Account A opens an order for diamonds at $100,000 each.
  2. Account B sells 64 diamonds into it, gaining $6.4M of multiplier progress for items the shop values at a few thousand.
  3. B sends the money back to A, and they repeat.

The money just goes back and forth between the two accounts, but B's multiplier keeps climbing, which permanently raises everything B sells to the shop.

Fix

Each sale's order earnings count toward progress for no more than the shop would have paid for those same items. StackSale now carries that figure (orderShopValue), and SaleTally counts min(orderEarned, orderShopValue). The option keeps its meaning: selling through an order still counts like selling to the shop, just not for more. The order still pays its full price.

Testing

Paper 1.21.10 with FoOrders and a connected client, selling 64 diamonds into a $100,000/each order:

main this PR
seller paid $6,400,000 $6,400,000
multiplier progress gained +6,400,000 +20,736 (= shop value of 64)

The existing sell-into-orders scenarios all still pass.

The companion FoOrders fixes are in Faboit1/FoOrders-Folia (same branch name).

🤖 Generated with Claude Code

https://claude.ai/code/session_01U5jqQqtiAZknExc2x6jFwQ


Generated by Claude Code

claude added 2 commits October 4, 2026 02:26
An order's price is whatever its owner typed, so counting order payouts
toward multiplier progress in full let two accounts pass money through
an overpriced order and raise a multiplier without limit. Each sale now
counts for no more than the shop would have paid for those items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5jqQqtiAZknExc2x6jFwQ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5jqQqtiAZknExc2x6jFwQ
@Faboit1
Faboit1 marked this pull request as ready for review October 4, 2026 02:31
@Faboit1
Faboit1 merged commit 5220ccc into main Oct 4, 2026
1 check passed
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