-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
This pull request has been linked to Shortcut Story #18776: Question/Answer smart contract. |
83c069e
to
5af29d9
Compare
contracts/GoldenProtocol.sol
Outdated
bytes16 predicateUUID, | ||
uint256 bounty | ||
) public returns (address) { | ||
// TODO: Creating new contracts is going to be very expensive. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
contracts/GoldenProtocol.sol
Outdated
return newQuestionAddress; | ||
} | ||
|
||
// TODO: This is not going to scale well... how to keep track of questions without this? |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
fc53953
to
a2a9ce5
Compare
a2a9ce5
to
fa58768
Compare
• support PO or SP tuples for query |
No description provided.