After consulting with Mojtaba, we have decided to change the design of the protocol. To enhance privacy without involving zk solutions (which Mojtaba through would be a whole another project), we will move the view from one company and individual "comparison" of salaries within the company, to a more sector-wide view. In this model, a company submits its data, and an assumption is that this data is already "verified".
We will use two contracts for this:
Company contract
The contract owner is the person who created it using company factory contract.
Modifies the company's list of employees, including their digital wallet, title and salary (add, remove, contains)
Allows employees to verify the authenticity of their stated salary
Functionality of the company contract:
Add, remove and update employee data
Verify the salary
A lookup function:
a. Query digital wallet
b. Returns Title, Salary and if salary is verified by employee.
Company factory contract
Built on Company Contract
Creates a company contract, tied to the wallet of the person who invokes it
Can be used to query other contracts to get details about salaries
Requirements for creating a company contract:
Digital Wallet to connect the company to
Writing what sector the company operates in
Functionality of the company factory contract:
Company Contract creation
Storing companies based on sector
Allowing queries for look-ups
a. Specific companies in a sector
b. Bigger picture queries (average salary of the sector)
See total number of verified salaries for specific companies and the entire sector.
New Protocol Design
After consulting with Mojtaba, we have decided to change the design of the protocol. To enhance privacy without involving zk solutions (which Mojtaba through would be a whole another project), we will move the view from one company and individual "comparison" of salaries within the company, to a more sector-wide view. In this model, a company submits its data, and an assumption is that this data is already "verified".
We will use two contracts for this:
Company contract
The contract owner is the person who created it using company factory contract.
Modifies the company's list of employees, including their digital wallet, title and salary (add, remove, contains)
Allows employees to verify the authenticity of their stated salary
Functionality of the company contract:
Company factory contract