ChristoferVikstroem / FaTS

An open-source repository for a smart contract implementation in the KTH course DD2485.
MIT License
1 stars 0 forks source link

Brainstorm and Questions 🧪 🧫 #4

Open vivi365 opened 8 months ago

vivi365 commented 8 months ago

Reporting salaries

We want to display salaries, and when a salary is updated or added it should be reflected in the state of the contract.

Q: How should the salaries be added? How do we know this is correct? In the real world, a salary is set when you sign a contract between the employer and the employee. Perhaps we should adopt this approach on the blockchain as well, with contracts for an employment being signed on-chain.

vivi365 commented 8 months ago

Anonymity

Q: Given the way salaries are reported, how can we make sure the identities are anonymous?

Identifying based on information in the contract, cryptographic keys etc. Look for standard solutions!

vivi365 commented 8 months ago

Verification

Q: How does an enmployee verify their salary? Is this done when signing the contract or do we count on some other process?

vivi365 commented 8 months ago

Storage

Q: How will all data be stored?

Can you sign a contract that is stored off-chain and keep the integrity of the contract?

Ref

On-Chain Storage

Refers to storing data directly on the blockchain. This means that the data is recorded in the blockchain’s ledger and is accessible to all participants on the network. This approach has several advantages, including transparency and immutability. Since the data is recorded on the blockchain, it is publicly accessible and cannot be tampered with. Additionally, on-chain storage allows for decentralized access to the data, which can be beneficial for certain types of applications.

Off-chain storage

Refers to storing data outside of the blockchain. This can be done through various methods such as centralized databases, InterPlanetary File System (IPFS), or other decentralized storage solutions. Off-chain storage is typically used when the data being stored is too large or too complex to be stored directly on the blockchain. This approach has several advantages, including scalability and cost-efficiency.

vivi365 commented 8 months ago

Data source

Q: How will the employee contract data be included in contracts/chain?

Is this inserted in a transaction with the contract?

Or is this added to some API endpoint, then retrieved from the contract and signed by both parties?

vivi365 commented 8 months ago

Design Patterns

A Pattern Collection for Blockchain-based Applications