0

To be able to directly set bounties for issues without middle-person that takes a margin with complete transparency and a high-degree of trust, I was wondering about the following: how one can write a smart-contract that automatically pays out to an ethereum address that is commented* in a github pull request for the following scenario:

  1. A single Ethereum address is posted by the github account that submits the pull request.
  2. A particular set of- (or all) tests in a CI (e.g. Travis-CI) result is used by a distributed oracle to determine when to pay-out.
  3. The pull request and accompanying tests are passed before a certain date and time.
  4. Otherwise no bounty is rewarded.

Which leads me to ask: how can one write a smart contract that pays out x Eth if a github pull request satisfies a predefined set of CI tests before a certain date and time?

3
  • 2
    Unless you are an expert in smart contract development, it makes more sense to use ready-made Gitcoin Bounties, a ready made product gitcoin.co/bounties/funder Jan 4 at 19:52
  • @MikkoOhtamaa perhaps I can gain more knowledge on transaction fees of smart contract transactions and/or decentralized oracles. Or possibly I could obtain more insight in how fragile the security of a poorly designed smart-contract is. My first guess however is that you mean to suggest it is easier to do that. Yet point 7 of their terms: gitcoin.co/legal/terms state they take a 10% cut of bounties, which renders it a "middle-person" which is excluded in the scope of the question. Could you perhaps motivate your suggestion?
    – a.t.
    Jan 5 at 11:39
  • 1
    It costs you way more than 10% to roll out your own system, upfront costs are in thousands Jan 5 at 13:05
1

Your biggest problem is how to setup the connection between your contract and github. There is no decentralized way to do this because your contract has no idea what happens outside the blockchain unless someone inputs the data there.

As someone needs to input all the required data into the contract the question becomes: who or what should input the data? And how can users trust that the input data is correct and valid?

Typically some sort of oracles are used for getting data from outside the blockchain into the blockchain, but nothing stops you from writing your own data inputter. But the original problem about trust remains as users need to either trust your written input logic or an external oracle.

There are some attempts of creating decentralized oracles (for example Chainlink) but I doubt they can help you much with such custom data - but you can have a look at least.

1
  • Yes my search led me to chainlink as well, from what I understand here: blog.chain.link/what-is-the-blockchain-oracle-problem (under Chainlink: The Standard for Secure and Reliable Oracles, they have decentralized their oracle node systems, so I think it might be possible decentralized, but not with the level of security/determinism that is expected of the blockchain itself. Furthermore it appears they facilitate connecting with API's, (which I think perhaps could provide such custom data): docs.chain.link/docs/existing-job-request, thank you for the perspective and overview
    – a.t.
    Jan 4 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.