SMART CONTRACT STATE MACHINE – CROWD – FUNDING

1. so let us look into one example where you can represent a smart
contract as a state machine
2. so in a crowdfunding platform you have a set fund set of people
who have certain funds available who are agreed to donate the fund if certain
jobs are being done
3. so they are at the project proposals which are coming from the
proposals
4. so the proposal proposes certain jobs certain projects and if
certain funding agencies are funder they find that particular proposal
interesting they may found for the proposal in a collective way
5. so
that is a kind of crowdfunding platform like a Kickstarter with the example we
have looked something back
6. so let us look into that how we can represent a crowdfunding
application in the form of a state machine
7. so
here the system has an initiation state where some users they have submitted
certain proposal now that proposal once this someone likes this proposal they may transfer the money
8. so
here say Bob has transferred the committed money to the system
9. so you are reaching to a state that Bob has donated the money
similarly, if Alice has transferred the committed money
10. you
are reaching a state that Alice has donated the money now after bob has donated
the money
11. Alice
may donate the money after that or it may happen that Alice
has first donated the money
12. after
that bob has donated the money now when both of them
has donated the money either in the order of Bob Alice or Alice Bob
13. you
have the money available in the system now once you have the money available in
the system you can initiate the job and say there are two jobs that need to be
executed but there is no specific sequence in which the jobs need to be getting
executed
14. so it may happen that the job one is first to complete and then
the job two is complete so then you follow this path to make both job one and
job to complete or it may happen that the job to first get finished
15. after
that job one is get finished so in this particular order
you may again have this job one and job to get complete
16. so
once both the job is done then your smart contract will transfer the money from
the funders which are here the Bob and Alice to the project proposal say if Eve
has transferred that project proposal the money will be transferred to you
17. so
that way you can represent a smart contract in the form of a state machine in
it any algorithm you can represent it in the form of a finite state machine.