feat: Dr. Fraudsworth TradingVenue integration#2
Open
MetalLegBob wants to merge 1 commit intoTitan-Pathfinder:mainfrom
Open
feat: Dr. Fraudsworth TradingVenue integration#2MetalLegBob wants to merge 1 commit intoTitan-Pathfinder:mainfrom
MetalLegBob wants to merge 1 commit intoTitan-Pathfinder:mainfrom
Conversation
Replace Raydium example with Dr. Fraudsworth DeFi protocol implementation. 6 venue instances covering 8 swap directions: - 2 SolPoolVenue (CRIME/SOL, FRAUD/SOL) — taxed constant-product AMM - 4 VaultVenue (CRIME<->PROFIT, FRAUD<->PROFIT) — fixed 100:1 rate Key features: - Dynamic tax rates (3-14%) from on-chain EpochState - Token-2022 with Transfer Hook (whitelist), no Transfer Fee extension - Protocol-wide ALT for v0 transaction compression - 50% minimum output floor enforced on-chain - Sub-100us quoting (pure integer math, zero heap allocation) 21 tests (8 construction + 13 quoting/parity/speed) Validated against real mainnet data and devnet TX execution. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Architecture
Swaps route through the Tax Program (not the AMM directly). Tax is deducted (3-14% dynamic, epoch-dependent), then CPI into the constant-product AMM. Full CPI chain: Tax -> AMM -> Token-2022 -> Transfer Hook.
Key Details
AddressLookupTableTraitTest Plan
Programs
43fZGRtmEsP7ExnJE1dbTbNjaP1ncvVmMPusSeksWGEj5JsSAL3kJDUWD4ZveYXYZmgm1eVqueesTZVdAvtZg8cR5uawA6ehYTu69Ggvm3LSK84qFawPKxbWgfngwj15NRJCiQPQrmQh6BPhb9k7dFnsEs5gKPgdrvNKFc5xie5xVGd🤖 Generated with Claude Code