Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
MarketContractOraclize.sol currently sets up oraclize.it queries recursively to check for a price that will push the contract into settlement either due to a price band being breached or the timestamp being past the expiration date of the contract.
Although this process is outlined in the oraclize.it documentation - they are warning against this mechanism. The cost of the query from oraclize.it is pegged to USD and not to ETH. So a long running contract could experience substantial variation in the needed pre-funding that will allow for all of the needed queries to be completed. The alternative here is to schedule a single query for the contract on the intended expiration timestamp. This has the downside of not catching possible settlements based upon a price band being breached, but this can be enforced by end users, or an off chain application that can call queries on demand thus pushing the contract into settlement.
Recursive queries are not really functional with oraclize.it and the variable pricing mechanism
## Solution and Needed Changes For Bounty To Be Released
1. Remove all need for recursive queries
2. Change the constructor of `MarketContracOraclize.sol` to schedule a query only at expiration. We can remove the `ORACLE_QUERY_REPEAT` variable entirely.
3. In the constructor, `require` that sufficient funds are available to pay for the query
4. Remove `validScheduledQueryIDs` since we only will have one scheduled query
5. Modify `_callback` to handle the new functionality
6. Remove uneeded events `OracleQuerySuccess` and `OracleQueryFailed`
7. Create / modify all needed tests to maintain sufficient coverage