I am learning to build Dapp in solidity. The use case is as follows : There are two users on the platform(Dapp) 1. Service Provider: the one who provides services to the customer such as electricity, gas, newspaper, etc 2. customer: They utilize the services of various service providers.

There are two ways to design the system 1. For every service provider or customer who registers on the platform, a new smart contract is created having the functions and variables of the service provider and customer respectively. 2. Creating only one smart contract for service provider and one for customer initially when the platform is initiated and inside both the contracts, have an array of structure. The structure inside the service provider contract and the customer contract defines the variables of the service provider and customer respectively. When a service provider (or customer) registers on the platform, a new array element is created inside the service provider contract (customer contract) and the new user's details are stored in the structure of the newly created array element.

What are the pros and cons of each of the system design?

1 Answer 1


Having centralized service makes administration more simple and allows to have more control over things. Users also will have to deal only with one service, which they will perceive as convenient.

On the other side, decentralizing the services even within the ethereum network makes the service robust to failure, and increase security. This is in great part because the contract's logic of each service is simpler than the global contract. Here some work will be needed to make things easy for users that are part of two or more of the services so that they do not feel the distributed system is complex or inconvenient.

I hope this help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.