Closed kongzii closed 1 month ago
The flow I can imagine for this is something like the steps below:
This issue encompassesthe smart contract implementation (see reference and rough suggestion below) + python integrations on PMAT or PMA for processing tasks (i.e. fetching a new task, updating a task after a result has been obtained).
contract TaskHolder {
struct Task{
string identifier;
string prompt;
string promptResult;
bool completed;
}
mapping(uint256 => Task) public tasks;
uint256 taskCount; // for tracking number of submitted in total
function updateTask(){}
function addTask(){
// this triggers a send from msg.sender to address(this) to avoid spamming tasks
}
}
Mostly agree, but for paying we shouldn't be developing our own mechanism, rather use something that exists, for example reality
Based on the Gnosis' whitepaper and discussion with Martin, payment system will be solved using prediction markets.
How it works:
Someone will create a new PM in category jobs
, for example, Will someone calculate 10x10= by 12.9.2024?
, he will add X xDai into liquidity and skew the probabilities to 0% YES.
Agent can pick this up and after successfully finishing the job, the agent will buy all the YES tokens.
A good thing is that this way, we also have a way to resolve disputes. If job-creator complains that the job wasn't finished successfully, he can argue about it in Realitio.
Atm to move market with 7xDai -> 99% 'yes' takes ~700xDai. Is this too much? If so then maybe prediction markets aren't best payment approach. tbd
Subissue for https://github.com/gnosis/prediction-market-agent/issues/314, see that for details.