Skip to content

MF-L02-I03-I04_I05: fix(contracts): add more Node trust assumptions and requirements#738

Merged
nksazonov merged 3 commits into
fix/audit-findings-finalfrom
fix/sc-i03-i04-i05
May 11, 2026
Merged

MF-L02-I03-I04_I05: fix(contracts): add more Node trust assumptions and requirements#738
nksazonov merged 3 commits into
fix/audit-findings-finalfrom
fix/sc-i03-i04-i05

Conversation

@nksazonov
Copy link
Copy Markdown
Contributor

@nksazonov nksazonov commented May 8, 2026

Summary

  • L-03: Documented that tokens must implement IERC20Metadata.decimals()validateTokenDecimals() reverts with FailedToFetchDecimals for tokens that omit this optional ERC-20 extension. Updated contracts/SECURITY.md (new subsection), contracts/src/Utils.sol (NatSpec), and protocol-description.md (token compatibility bullet).
  • I-03: Added Trust Assumptions section to contracts/SECURITY.md documenting three explicit Node trust requirements: off-chain transfer routing, off-chain credit accounting, and signature validator selection. Consolidated scattered trust statements from the Invariants and Signature Validation sections.
  • I-04: Documented on-chain vs off-chain EIP-191/raw-ECDSA signature domain asymmetry in contracts/SECURITY.md (new subsection) and protocol-description.md (new security property bullet). All clients must use EIP-191.
  • I-05: Fixed stale SigQuorum comment on the UserState field in AppSessionsV1SubmitDepositStateRequest (pkg/rpc/api.go).

nksazonov added 2 commits May 8, 2026 16:50
- Fix stale SigQuorum comment on UserState field in AppSessionsV1SubmitDepositStateRequest (I-05)
- Add Trust Assumptions section to SECURITY.md documenting Node as off-chain transfer intermediary, Node off-chain credit accounting, and signature validator selection trust; consolidate scattered trust assumptions from Invariants and Signature Validation sections (I-03)
- Document on-chain vs off-chain EIP-191/raw-ECDSA signature domain asymmetry in SECURITY.md and protocol-description.md (I-04)
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8fea8ee4-534e-4010-be66-9a22496a1bb5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sc-i03-i04-i05

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nksazonov nksazonov changed the title fix(contracts): address security audit findings I-03, I-04, I-05, and decimals requirement MF-L02-I03-I04_I05: fix(contracts): add more Node trust assumptions and requirements May 8, 2026
Comment thread protocol-description.md
@ihsraham
Copy link
Copy Markdown
Collaborator

ihsraham commented May 8, 2026

small closure question: the pr body says L-02, but the attached l-02 i have is the first-enforcement-guarantee issue, and its remediation link points to #737.

this pr's l-02 change looks like the token decimals() note. can you confirm whether the attached l-02 should be closed by #737, and this pr is only covering the decimals finding plus i-03, i-04, and i-05?

@nksazonov
Copy link
Copy Markdown
Contributor Author

nksazonov commented May 11, 2026

@ihsraham , thanks for spotting the "L-02" finding discrepancy. I have already edited the description to reflect the correct "L-03" one

Copy link
Copy Markdown
Collaborator

@ihsraham ihsraham left a comment

Choose a reason for hiding this comment

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

approved, this now closes L-03, I-03, I-04, and I-05 for the stated doc and comment fixes.

@nksazonov nksazonov merged commit c5de723 into fix/audit-findings-final May 11, 2026
3 checks passed
@nksazonov nksazonov deleted the fix/sc-i03-i04-i05 branch May 11, 2026 08:12
nksazonov pushed a commit that referenced this pull request May 13, 2026
- MF-L01: fix(contracts/ChannelHub): cap ERC20 transfer returndata copy to 32 bytes (#726)                                                
- MF-H01: fix(nitronode): paginate get_last_key_states endpoints (#724)                                                                   
- MF-I01-I02: fix(contracts): address security audit findings I-01 and I-02 (#728)                                                        
- MF-C01: rpc: cap inbound WebSocket frame size and rate-limit per connection (#723)                                                      
- MF-L02: docs(protocol): qualify enforcement guarantee for intent-specific execution paths (#737)                                        
- MF-L02-I03-I04_I05: fix(contracts): add more Node trust assumptions and requirements (#738)                                             
- MF-M01: backfill state user_sig from on-chain events (#731)               
- MF-M02: fix(rpc): release Serve wait group on processSink overflow (#732)                                                               
- Fix SDK acknowledgement before home channel creation (#734)               
- MF-I06: fix(nitronode): gate escrow transitions on home channel onchain materialization (#730)                                          
- MF-M05: fix(nitronode): enforce TLS by default for Postgres (#733)                                                                      
- MF-M07: Unblock receiver states after finalized escrow operations (#735)
- MF-M04: feat: provide tooling for and enhance docs on ValidatorRegistered event (#744)                                                  
- MF-L04: fix(contracts): reject redundant native value (#741)              
- MF-H02: bind session key registration to a single owner per kind (#739)                                                                 
- MF-I07: fix(contracts): enforce max challenge duration (#752)             
- MF-M08: fix(rpc): replace Origin label with application_id on connection gauge (#745)                                                   
- MF-C02: fix(core): add ChannelStatusClosing to gate post-finalize state transitions (#746)                                              
- MF-L06: fix(contracts): clear stale challengeExpireAt on cooperative escrow finalization (#754)
- MF-I08: docs: document ChannelClosed event orientation ambiguity during abandoned migration (#755)                                      
- MF-M09: fix(nitronode): auto-challenge home channel on withheld escrow finalize (#753)
- MF-L09: fix(nitronode): validate parsed app session nonce (#751)                                                                        
- MF-L05: docs(contracts): document informational events not guaranteed to emit (#756)
- MF-L08: fix(nitronode/api): default get_last_key_states to active-only with include_inactive opt-in (#749)                              
- MF-L10: fix: emit escrowIds array in EscrowDepositsPurged event and handle it in Nitronode (#757)
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