---
# System prepended metadata

title: ETH Global Online 2023

---

# Samekh Protocol
![](https://hackmd.io/_uploads/S1o2H-gGa.png)


## Project idea
Wallets in web3 industry is not that friendly for mobile users. They have to **download the wallet app** and **use the browser in the wallet app** to launch a transaction to the contract or transfer tokens to other users. 

This system would provide a better environment for mobile users by using a zk proof system to build up a protocol that can be used in all conditions. 

![](https://hackmd.io/_uploads/HyGirnMza.png)

### Working flow:
Signup:
1. A user sign up the protocol in Semaphore
2. The protocol offers the identity secret for this user. The user should self-custody this secret, otherwise the power of controlling the account would be lost.

Pre-execution:
1. Users should lock some asset to relayer to make sure relayer getting reward and relayer has enough money to execute.

Execution:
1. Users use a proof to prove their identity and offer the script that wants the protocol do.
2. Verifier should verify the proof.
3. Call relayer to use an AA to do things on chain.

## Specs

### Frontend
> skill stack: prover in browser, Reactjs/Nextjs

- **[Prover]** Generate zk-proof based on user's identity
- UI for users to provide identity information
- Submit script to be executed

Questions:
1. How do users sign up an identity in this protocol?
2. 

### Backend
> skill stack: nodejs, circuits, snarkjs, express, a node to provide the server key

- **[Verifier]** Verify ZKP
- **[Relayer]** Receive verified zk-proofs and associated scripts
- **[Relayer]** Trigger the relayer to utilize AA for on-chain operations
- **[Relayer]** Execution result is generated and sent back to the user
- Interface with the XMTP to fetch and validate against merkle tree

### Smart Contract
> skill stack: solidity, Abstract Account, polygon-zkEVM, Scroll, XMTP

#### Abstract Account
> TODO
Reference: 
- [Blocknative ERC-4337 Impl explanation](https://www.youtube.com/watch?v=MHZ0LwpKcpI)
- [ERC-4337 Impl Repo](https://github.com/marshabl/erc-4337-examples)
- [Intent-based Arch](https://bwetzel.medium.com/intent-based-architectures-and-projects-experimenting-with-them-c3ee63ae24c)

![AA flow](https://hackmd.io/_uploads/SJq50jM-6.jpg)


#### Relayer Execution
> Handle the received script execution commands

### Backlog for now
> If we still have time, we could have done these

1. writing tests
2. comparison of user experience among the wallets on mobile phone and our protocol


## Milestones
> as well as the meeting time to report

| DDL         |       Frontend       |        Verifier         |     Relayer      | Contract | Submission |
|:----------- |:--------------------:|:-----------------------:|:----------------:|:--------:|:----------:|
| (Fri) 10/6  |          /           | create the boilerplate  |        /         |    /     |     /      |
| (Tue) 10/10 |          -           |   Circuits (identity)   |                  |    AA    |     -      |
| (Fri) 10/13 |    browser prover    |        verifier         |  Deploy script   | testing  |     -      |
| (Tue) 10/17 |          -           |            -            |     Subgraph     | testing  |     -      |
| (Fri) 10/20 | extension on browser | should verify the proof | others integrate | testing  |     -      |
| (Sat) 10/21 |       testing        |         testing         |     testing      | testing  |     -      |
| (Sun) 10/22 |         done         |          done           |       done       |   done   |   Video    |