Skip to content

Fix missing blacklist checks in NativeFiatTokenV2_2 transfer functions#656

Open
Kewe63 wants to merge 4 commits into
circlefin:masterfrom
Kewe63:fix/native-fiat-token-transfer-blacklist
Open

Fix missing blacklist checks in NativeFiatTokenV2_2 transfer functions#656
Kewe63 wants to merge 4 commits into
circlefin:masterfrom
Kewe63:fix/native-fiat-token-transfer-blacklist

Conversation

@Kewe63

@Kewe63 Kewe63 commented Apr 10, 2026

Copy link
Copy Markdown

Summary

Add missing notBlacklisted modifiers to transferFrom and transfer functions in NativeFiatTokenV2_2 to prevent blacklisted addresses from bypassing compliance controls.

Detail

The parent contract FiatTokenV1 correctly enforces all blacklist checks on transferFrom (msg.sender, from, to) and transfer (msg.sender, to). However, NativeFiatTokenV2_2 dropped most of these modifiers when overriding:

  • transferFrom: only had notBlacklisted(msg.sender) — missing notBlacklisted(from) and notBlacklisted(to)
  • transfer: had no blacklist checks at all — missing notBlacklisted(msg.sender) and notBlacklisted(to)

Without this fix, blacklisted accounts could transfer tokens via standard ERC-20 functions, completely bypassing the AML/compliance blacklist mechanism. The transfer function was particularly critical since it had zero blacklist enforcement.

Changes:

  • transferFrom: added notBlacklisted(from) and notBlacklisted(to)
  • transfer: added notBlacklisted(msg.sender) and notBlacklisted(to)

This restores full parity with the parent contract FiatTokenV1.

Testing

  • Verify blacklisted from address is rejected on transferFrom
  • Verify blacklisted to address is rejected on transferFrom
  • Verify blacklisted msg.sender is rejected on transfer
  • Verify blacklisted to address is rejected on transfer
  • Verify non-blacklisted addresses can still use both functions normally

Documentation

No documentation changes required. The function signatures remain the same; only modifier enforcement is added to match the parent contract behavior.


Requested Reviewers: @Kewe63

Kewe63 added 4 commits April 10, 2026 10:15
- Update @typechain/ethers-v6 from 0.4.3 to 0.5.1
- Update typechain from 8.3.1 to 8.3.2
- Resolves peer dependency conflicts that break project setup
Add missing notBlacklisted modifiers to transferFrom and transfer
functions in NativeFiatTokenV2_2:

- transferFrom: add notBlacklisted(from) and notBlacklisted(to)
- transfer: add notBlacklisted(msg.sender) and notBlacklisted(to)

The parent contract FiatTokenV1 correctly enforces all three blacklist
checks on transferFrom (msg.sender, from, to) and both checks on
transfer (msg.sender, to). NativeFiatTokenV2_2 dropped these when
overriding, allowing blacklisted addresses to send and receive tokens
via standard transfer functions.
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.

1 participant