Skip to content

feat(privacy): screening policy decides an open-note deposit's subject - #946

Open
avi-starkware wants to merge 1 commit into
avi/screening-v3/requirement-collectionfrom
avi/screening-v3/invoke-generator
Open

feat(privacy): screening policy decides an open-note deposit's subject#946
avi-starkware wants to merge 1 commit into
avi/screening-v3/requirement-collectionfrom
avi/screening-v3/invoke-generator

Conversation

@avi-starkware

@avi-starkware avi-starkware commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

An Invoke returning open-note deposits now consults its target's OpenNoteScreeningPolicy, inside
the existing non-empty-deposits guard so an Invoke funding nothing is still never screened.
Required — every unlisted address — makes the target itself the tx's screening subject; Exempt
raises no requirement; Delegated reverts with the new DELEGATED_SCREENING_UNSUPPORTED until the
pool can ask a target which addresses to screen. The devnet e2e now lists the swap and lending
executors Exempt, the posture the deployed pools carry, since Required would refuse their notes.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com


This change is Reviewable

An Invoke returning open-note deposits now consults its target's OpenNoteScreeningPolicy, inside
the existing non-empty-deposits guard so an Invoke funding nothing is still never screened.
`Required` — every unlisted address — makes the target itself the tx's screening subject; `Exempt`
raises no requirement; `Delegated` reverts with the new DELEGATED_SCREENING_UNSUPPORTED until the
pool can ask a target which addresses to screen. The devnet e2e now lists the swap and lending
executors `Exempt`, the posture the deployed pools carry, since `Required` would refuse their notes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@avi-starkware
avi-starkware force-pushed the avi/screening-v3/requirement-collection branch from c814217 to c027b93 Compare August 18, 2026 14:31
@avi-starkware
avi-starkware force-pushed the avi/screening-v3/invoke-generator branch from 627a712 to 9d4b353 Compare August 18, 2026 14:31

@remollemo remollemo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@remollemo reviewed 10 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on avi-starkware and Yoni-Starkware).


packages/privacy/src/privacy.cairo line 1013 at r1 (raw file):

            // Apply deposits to open notes returned by Invoke. `contract_address` is the depositor,
            // and its policy decides what the deposits require. An Invoke returning no deposits
            // never consults the policy list.

Suggestion:

            // Apply deposits to open notes returned by Invoke. `contract_address` is the depositor.
            // Screening - if reqruired, and its subject is defined by the depositor screening policy. and applicaband its policy decides what the deposits require. An Invoke returning no deposits

packages/privacy/src/privacy.cairo line 1017 at r1 (raw file):

                match self.open_note_depositor_screening_policies.read(contract_address) {
                    // The depositor funds open notes only under a screening attestation for its
                    // own address.

remove

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.

2 participants