Repository navigation
Adversary: every role holder is also a user - #193
Merged
Merged
Conversation
A new section before What You Learnt: an operator, manager or admin can also call every public handler, from a wallet the program cannot link to them, so each role's power has to be weighed against what it is worth to someone who also trades. It uses the perps funding rate (test_operator_on_the_lighter_side_earns_only_the_fixed_rate) and the managed fund's limits on its manager (test_add_asset_rejects_unapproved, test_initialize_rejects_excessive_fee) as examples, and points to Offchain Truth for a role that reports a result. The summary gains a matching bullet. Claude-Session: https://claude.ai/code/session_01JGEoAUjMm7Evv69k46eNcn
mikemaccana
changed the base branch from
claude/plain-wording-sweep
to
main
September 30, 2026 23:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new section in The Adversary, before What You Learnt. An operator, manager or admin can also call every public handler, from a wallet the program has no way to link to them. So for each role, the section asks what its handlers can change, and what that change is worth to someone who also trades, deposits or bets in the same program.
This PR was stacked on #190. It now targets
main, andmainhas been merged in.Examples, each naming the test that checks the defense:
test_operator_on_the_lighter_side_earns_only_the_fixed_rate), from quicknode/solana-program-examples#172.test_add_asset_rejects_unapproved).test_initialize_rejects_excessive_fee).The chapter summary gains a matching bullet.
npm run lint,node scripts/check-figure-geometry.mjsandnpm run build-pdfall pass. Every test named exists on the companion repo'smain.🤖 Generated with Claude Code
https://claude.ai/code/session_01JGEoAUjMm7Evv69k46eNcn