Skip to content

Bounty smart contract #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

czechdave
Copy link
Contributor

No description provided.

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #18776: Question/Answer smart contract.

@czechdave czechdave force-pushed the feature/sc-18776/question-answer-smart-contract branch 2 times, most recently from 83c069e to 5af29d9 Compare October 17, 2022 14:19
bytes16 predicateUUID,
uint256 bounty
) public returns (address) {
// TODO: Creating new contracts is going to be very expensive.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can get this cost lower by using an l2 chain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could be a way to get it down. At current prices for this function on mainnet ETH is ~$30.

return newQuestionAddress;
}

// TODO: This is not going to scale well... how to keep track of questions without this?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may not be a requirement, each question contract can handle its own business

Copy link
Contributor Author

@czechdave czechdave Oct 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what's happening now. The open question is how will a user get the open questions without any central book keeping. We could provide some off chain index from solidity Events.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generating an event and then index them off-chain sounds good.

i think over time the question contract will need to be upgradeable somehow too, but it could be just deploying a protocolv2 contract...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way is to have the Question contract pull threshold values or even functions from the Master that could have a governance contract to change those thresholds/functions in order to "upgrade" the question contracts.

For example the consensus function can be on the Master and the Question just supplies it with it's state to check if it reached consensus or not.

That way you wouldn't need to spend potentially infinite gas on upgrading all existing Question contracts one by one. Instead just'd upgrade the Master contract once.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yeah, i just think the computation complexity of a good consensus algorithm almost necessitates it being off-chain. elvis is working on a proof of concept for performing the actual calculation of consensus (settlement?) off-chain but in a provable way.

I think there is value in this "query contract" approach for connecting demand directly, staking per-submission and per-vote.

Payout is likely a single contract that we pass the "query contract" address to and it reads the state and has token transfer abilities if the state is settled? I don't know, a lot of moving parts.

If we want to continue on this query contract approach you should pivot towards the blockchain infrastructure for polygon edge so we can gauge the costs more accurately. You can one-click a polygon edge without "supernets" (built in validator network) using https://www.kaleido.io/polygon-edge

@czechdave czechdave force-pushed the feature/sc-18776/question-answer-smart-contract branch 2 times, most recently from fc53953 to a2a9ce5 Compare October 18, 2022 13:21
@czechdave czechdave force-pushed the feature/sc-18776/question-answer-smart-contract branch from a2a9ce5 to fa58768 Compare October 18, 2022 13:46
@ezpuzz
Copy link
Contributor

ezpuzz commented Oct 19, 2022

• support PO or SP tuples for query
• support multiples answers that can be paid out
• implement sharing of the query bounty to the answerers and voters
• check NFT contract for entity being eligible as an answer

  • support "is this entity unique and self consistent and meets MDT?" use case
  • add bounty to existing question as a second asker

@czechdave czechdave changed the title Question/Answer smart contract Bounty smart contract Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants