Skip to content

Increase defi coverage#23

Open
jpsains wants to merge 17 commits intomainfrom
increase-defi-coverage
Open

Increase defi coverage#23
jpsains wants to merge 17 commits intomainfrom
increase-defi-coverage

Conversation

@jpsains
Copy link
Copy Markdown
Collaborator

@jpsains jpsains commented Apr 14, 2026

Note

Medium Risk
Adds new transaction action types and broadens heuristic matching for several major DeFi protocols, which can change categorization outputs for real user transactions. Also updates/introduces multiple recorded nock fixtures, so test stability depends on those fixtures matching the current API request shape.

Overview
Expands transaction categorization for DeFi activity. Adds new Action types COLLECT and MODIFY_LIQUIDITY (with i18n labels across locales) and updates heuristic determinants to recognize Uniswap V3 collect and liquidity modifications, plus Uniswap V4 ModifyLiquidity.

Broadens protocol/address/topic/method coverage. Extends the heuristic maps with additional contract identifiers and event/method signatures for Curve deposits and Convex/Aave/MetaMask staking/claiming, and standardizes several protocol naming/version fields.

Updates test corpus. Refreshes and adds txTestCases entries and introduces new nock fixtures for the added hashes while removing an outdated Uniswap V3 fixture.

Reviewed by Cursor Bugbot for commit 29c4b8a. Bugbot is set up for automated code reviews on this repo. Configure here.

@jpsains jpsains requested a review from a team as a code owner April 14, 2026 12:54
'0x1a88df1cfe15af22b3c4c783d4e6f7f9e0c1885d',
'0x9eda81c21c273a82be9bbc19b6a6182212068101',
],
name: 'AAVE_V3_STAKE_TOKEN',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move V3 to a version property

Copy link
Copy Markdown
Contributor

@blurpesec blurpesec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add example txs for each tx type to the test-cases https://github.com/MetaMask/tx-categorize/blob/main/packages/tx-categorize/src/testCases.mock.ts

so that we maintain coverage in tests and can guarantee tx categorizations don't conflict?

@jpsains jpsains requested a review from blurpesec April 14, 2026 14:01
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f441e83. Configure here.

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.

3 participants