Repository navigation
Perps: the funding rate is fixed at creation, and Maria signs only collect_fees - #192
Merged
Merged
Conversation
…llect_fees quicknode/solana-program-examples#172 removed set_funding_rate(), and initialize_pool() now refuses a rate above MAX_FUNDING_RATE_PER_SECOND (277). The chapter follows: - The funding section says the rate is fixed at creation and capped. It says what Maria could have done if she could change it, and names test_operator_on_the_lighter_side_earns_only_the_fixed_rate. - The funding example uses the maximum rate (2.77 USDC over 2,000 seconds), in the text and in the funding-index figure. - The "payment goes to the pool" bullet said the lighter side is not paid. The pool pays the lighter side at the same rate, out of liquidity. - collect_fees() is again Maria's only signed handler once the pool exists. - The share-inflation paragraph uses the test's new figures: ten simulated years at the maximum rate. 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.
Follows quicknode/solana-program-examples#172, which removed
set_funding_rate(). Before that change, Maria could open a small position on the side that receives funding, raise the rate, and close the position to take the liquidity providers' deposits.initialize_pool()now refuses a rate aboveMAX_FUNDING_RATE_PER_SECOND(277, just under 0.1% of a position's size per hour), and nothing can change the rate afterwards.This PR was stacked on #190. It now targets
main, andmainhas been merged in.Changes to the Perpetual Futures chapter
initialize_pool(), and no handler can change it once the pool exists.set_funding_rate()sentence is replaced by the fixed, capped rate.test_operator_on_the_lighter_side_earns_only_the_fixed_rate.liquidity, and the bullet now says so.collect_fees()is again her only signed handler once the pool exists.npm run lint,node scripts/check-figure-geometry.mjsandnpm run build-pdfall pass. Every identifier named exists on the companion repo'smain.🤖 Generated with Claude Code
https://claude.ai/code/session_01JGEoAUjMm7Evv69k46eNcn