← ClaudeAtlas

kintsugi-fintech-web3listed

Focused fintech-web3 anti-patterns and verified code templates compiled by Kintsugi Harness.
tunguyen1993/kintsugi-harness · ★ 0 · AI & Automation · score 73
Install: claude install-skill tunguyen1993/kintsugi-harness
# kintsugi-fintech-web3 (`@KML/1` Machine-Native AST-IR) ```bash kintsugi scan --staged --fail-on HIGH ``` ## `@KML/1` Symbolic Guardrail Specifications (`NEG_AST => POS_AST`) ### `KL-FIN-005` · `Deterministic Wallet Derivation & Closed-Loop Sign-Recover Gate` - `@WIRE`: `@KML/1|id=KL-FIN-005|sev=C|cat=fintech-web3|lang=py|op=DETERMINISTIC_WALLET_DERIVATION_CLOS|guard=RX#da25d8c0|neg=«except ImportError: ; wallet_addr = '0x' + os.urandom(16).hex() # UNBACKED_RANDOM_WALLET_»|pos=«from eth_account import Account # Fail hard if missing ; acct = Account.from_key(private_»|fp=65b20f5eabd99892` - `@TRAP`: `[Cognitive Trap] Added an `except ImportError:` fallback that generated random hex bytes when `eth_account` was missing in a virtualenv, creating unbacked payout addresses with no matching private key.` - `@LAW`: `[Mental Model] Never fallback to random bytes when deriving cryptographic addresses; fail hard if signing libraries are missing and require a closed-loop `recover(sign(msg, pk)) == address` assertion before registering any payout address.` `@NEG_AST` (`❌ FORBIDDEN`): ```python except ImportError: wallet_addr = '0x' + os.urandom(16).hex() # UNBACKED_RANDOM_WALLET_FALLBACK ``` `@POS_AST` (`✅ REQUIRED`): ```python from eth_account import Account # Fail hard if missing acct = Account.from_key(private_key) ``` ### `KL-FIN-003` · `Atomic Ledger Locking (TOCTOU) & Symmetric Decimal Scaling Guard` - `@WIRE`: `@KML/1|id=KL-FIN-003|sev=C|cat=fintech-web3|lang=py,dec