Hi,
1. I mean the calculation for all coins , not only bitcoin . Because renters will mine many ico coins ?
2. Conflict means any trouble appears between both parties. Because i want to make automatic platform with very least human involve.
Anyway , thank you for 2 suggestions above bro.
You'll have to create your own script to calculate the profitability for all coins... The link i gave you was just a starting point that can be used to create your own scripts
If you use that formula, change the parameters (like diff and block reward) you can get the formula for other coins, multiply by the number of hashes per second and use an api from one of the bigger exchanges to get the BTC/altcoin exchange rate (maybe even use BTC/USD and show the prices in FIAT). It's not rocket science, but it does require a couple of hours to really dig into it and figure everything out.
For the second part of your question: i know miningrigrentals only releases funds to the rig owner 12 hours after the renting has been finished. Since they route all requests trough their proxy, they have a pretty good idear of what happened during the renting period. In case a renter is unhappy with the rent, they have 12 hours to lodge a complaint.
Offcourse, complaint handling is always a manual process, i don't think you'll be able to programatically find a way to listen to both parties and release or refund the rent without any human interaction...