| Algorithms A10. Smart Contract 10: Remove Stakeholder |
| Input: name, type, location, details, addr, stakeholder_id |
| 1. if addr is valid && addr has adding authentication |
| 2. if stakeholder_id==Distributor |
| 3. x[]=getDistributor(Stakeholder_id) |
| 4. if x.fraudCount >= 3 |
| 5. addDistributor(name, type, location, details, x.id, false) |
| 6. Distributor Removed from the supply chain |
| 7. end |
| 8. else |
| 9. x[]=getRetailer(Stakeholder_id) |
| 10. if x.fraudCount >= 3 |
| 11. addRetailer(name, type, location, details, x.id, false) |
| 12.Retailer Removed from the supply chain |
| 13. end |
| 14. else |
| 15. Invalid or authorised address |
| 16. go to step 1 and enter a valid address |
| 17. end |