Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nationality set inclusion check to circuit #56

Closed
0xturboblitz opened this issue Jan 31, 2024 · 11 comments
Closed

Add nationality set inclusion check to circuit #56

0xturboblitz opened this issue Jan 31, 2024 · 11 comments
Assignees
Labels
help wanted Extra attention is needed medium

Comments

@0xturboblitz
Copy link
Member

0xturboblitz commented Jan 31, 2024

Some actors from traditional finance can't enter decentralised finance because of the lack of enforceable regulation. For instance, legislation prevents them from dealing with users from certain countries, but they have no way of checking reliably the nationality of users and heuristics such as IP address are not reliable enough.

Proof of passport could allow users to prove they are not citizens of a given subset of countries without revealing their nationality.

This would involve writing a disclosure circuit that extract the nationality and does an (non-)inclusion check over a group of countries.

Depending on the size and complexity of the circuit, this could be integrated in the main disclose.circom or be a separate disclosure circuit.

I think you would do it by passing the root of a sparse merkle tree representing a list of countries as a public input and do a inclusion check or a non-inclusion check in the circuit.

This system could be reused for #120

@rajeshkumarrobert
Copy link

@0xturboblitz I like to work on this, I'm a beginner in circom and I hope I can complete this

@0xturboblitz
Copy link
Member Author

Hi @rajeshkumarrobert, go for it and feel free to dm if you have questions

@sBaki92
Copy link

sBaki92 commented Jul 29, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi!
I am a freshman in the Starknet ecosystem. I've completed two Basecamps and the latest HackerHouse, and I would like to have this issue assigned to me so I can apply everything I've learned.

@the-first-elder
Copy link

the-first-elder commented Jul 29, 2024

I can do this

Copy link

onlydustapp bot commented Jul 29, 2024

Hi @the-first-elder!
Maintainers during the ODHack #6.0 will be tracking applications via OnlyDust.
Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

@Bosun-Josh121
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

software enginnering background and have worked on a similar project from contribution in previous odhacks and i'm confident in working on this

How I plan on tackling this issue

I would work on extracting the nationality and performing a check on the tree of countries representing the input countries as highlighted. This should take only a short while

@PavitraAgarwal21
Copy link

PavitraAgarwal21 commented Jul 29, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi, first of all, great project! To introduce myself, I have experience writing Circom circuits, particularly some what related to TornadoCash circuit . I used the nullifier and commitment hash components to verify tickets in a project that won the StarkNet hackathon. Additionally, I utilized their Merkle tree to verify if a person is whitelisted. You can check my GitHub repo for ZKTPS in the circuit section. I also have an in-depth understanding of how proof systems work, although it might not be directly required here.

How I plan on tackling this issue

First of all i think , what we have to do is to make the merkle root from the data through ofsn sdn webiste using any python library out there (easy to do with csv also ). Once the merkle root is created what we have to do is to make circuit which check the user country is not in the merkle tree , this is similar to the merkle tree proof circuit which is in the many of solution like in the tornadocash it use for the checking of the whitelisting of the users , but in this we have to check the non inclusion so it have some changes like we can have to ensure that the leaf is not equal to any of the path elements (sibling nodes ) which indicating non-inclusion . then i think all thing is similar to the merkle root proving circuit .

@0xturboblitz
Copy link
Member Author

will assign to @ashpect as we worked on similar things in #120

@juandiegocv27
Copy link

juandiegocv27 commented Jul 30, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

'm Juan Diego Carballo, currently engaged in the PSE Core Program where I am deepening my knowledge of circuit design, particularly in zero-knowledge proofs and their applications. My background in software engineering and blockchain technologies has provided me with a solid foundation in decentralized finance and smart contract development. My experience is complemented by my contributions to various blockchain projects, including the slot command documentation for the Dojo book, viewable here: Dojo Book - Slot Documentation, GitHub PR #271, and a recent contribution to the StarkNet.quest project: StarkNet.quest PR #713.

How I plan on tackling this issue

How I plan to tackle this issue:

Circuit Design: I will write a disclosure circuit to accurately extract the nationality from proof of passport without revealing more data than necessary.
Merkle Tree Implementation: Implement the Merkle tree by passing the root of a sparse Merkle tree representing a list of countries as a public input to the circuit.
Inclusion/Non-Inclusion Check: Design the circuit to perform a non-inclusion check to validate that a user’s nationality is not part of the specified countries, ensuring compliance with regulations.
This task aligns perfectly with my current studies and professional goals. I am enthusiastic about the possibility to apply and further my knowledge in a real-world application that bridges regulatory requirements with decentralized technologies.

I look forward to potentially contributing to this innovative solution and am ready to bring my recent academic learnings to practical implementation.

@ashpect
Copy link
Contributor

ashpect commented Jul 30, 2024

will assign to @ashpect as we worked on similar things in #120

Will be happy to work on this as well.

@ashpect
Copy link
Contributor

ashpect commented Aug 14, 2024

@0xturboblitz #175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed medium
Projects
None yet
Development

No branches or pull requests

10 participants