Simple Crowdfunding

A pledge of 250 Ergs by Foundation has been done https://explorer.ergoplatform.com/en/transactions/2fc882792b94f8210e4378f2f5bab90896523e212d927ed16600170d76f46ac9

The crowdfunding is already successful!

https://explorer.ergoplatform.com/en/transactions/555c5a3d07f8627f4b3e3b93f119d832df5dcfb9cdc5751b9fbf14061a067dd4

Successfully gathers two boxes, one of 250 Ergs (from foundation), another of ~357 Ergs, thus ~607 Ergs in total.

There’s also unspent pledge box of 10 Ergs created by the following transaction : https://explorer.ergoplatform.com/en/transactions/f6725cab9e734cd03bfe6917b9b7e9562ec4b5f6bbb47236a8bab6e9451f6b5f . It requires for 1000 Ergs to be collected by spending transaction, thus could not be spent at the moment.

3 Likes

This is great to hear. I would like to say thanks to the community and if anyone wishes to keep up with progress on the development of the crowdfunding CLI feel free to check out the github repo:

2 Likes

Just a note to say that this could be simplified by removing the constraint that the output must go to the project owner, since there is already a constraint further down that requires the transaction is signed by the project owner:

projectPubKey && OUTPUTS.exists(enoughRaised)

In other words, the project owner can already send the funds anywhere they want in the next transaction, so the script could be simplified by letting them send the funds wherever they want as soon as the threshold is met prior to the deadline.

The simplified condition looks like this:

val enoughRaised = { (outBox: Box) => outBox.value >= minToRaise }

1 Like

I’ve created a P2S web tool to help bookmark and share these types of contracts; if you click on this link you should get the above ErgoScript contract for which you will need to modify to include your backerPubKey refund address.

[Note: as I noted in my previous comment, I’ve removed the constraint that the project owner must send the funds to their own address, which simplifies the contract slightly.]

Click on “Get P2S Address” to generate the P2S address for a valid contract, otherwise it will show the error information.

As you edit the contact, it should automatically update the URL, so you can bookmark it and/or share (note that the URL can get quite long for longer contracts).

Obviously, use at your own risk etc. since you are trusting my node and trusting that my server hasn’t been hacked.

1 Like

That’s a good point on the redundant check. Currently I am using the original script for the CLI app, but I’ll look into making the edit tomorrow.

Edit: Just thinking about it, having to withdraw all funds to the project/campaign address could be a good way to really make it easy later on to see whether or not a campaign was successful and easier to track how the funds are spent later on since it all gets moved into a new box at the campaign address. I’ll keep it as is for now, but if people overwhelmingly prefer without this restriction then it can be changed.

2 Likes

After getting a bit excited to see this proceed forward I’ve pulled a couple late nights and pushed aside a few more responsibilities than maybe I should have, but nonetheless I bring you the Ergo Crowdfund CLI App in an early alpha yet functional form. (As such please take some time to test it first before trusting it with serious funds. It should all be relatively safe, but this is bleeding edge software after all.)

What currently works:

  1. Creating a local campaign/saving the data related to it
  2. Exporting said created campaign and sharing it with others via file
  3. Importing/tracking campaigns created by others and saving those campaigns locally.
  4. Backing/sending funds to tracked (locally stored) campaigns. (The app automatically fills out the crowdfund script, generates the P2S address, and then sends the specified number of Ergs to the P2S address via node wallet api)
  5. Saves data about backed campaigns (how many Erg you previously sent, and the tx id of said spend)

In the future, especially after EIP-1, tracking campaigns on-chain and seeing how they are progressing/the result will be implemented, and also the ability for a campaign creator (or technically the owner of the address a campaign is set up for) to be able to withdraw funds if the campaign was successful.

There’s an extensive readme/instructions, and for now you have to compile it yourself, but if you have any questions feel free to ask.

https://github.com/robkorn/ergo-crowdfunding-cli

2 Likes

There’s another box of 42 Ergs boxId: 1dc4f025cbf3331849bcb06e16fc46d7ce53938eef2d54299d915695f0a1c9a4 , transaction Id: 6e9a5544fae833dd2deb52b4a2203b3f50c322967d7542acb7bbc690b26dc59a . Unfortunately, I spent time around block #50,000 on the road mostly, not without some problems, thus was not able to collect the box :frowning: Will compensate 42 Ergs from my ergs then.

Respective owners of the two boxes above, please, withdraw them.

@robert will contact you directly to send the funds.

Now as we have a tool for the crowdfunding, what else can we crowdfund?

1 Like

Don’t worry, that was me! I’ve forwarded the 42 ERG to your projectPubKey: fc30c618c5f6bce72bc8e7806d0d526ca553b7d945d72e323a2853beb16224c4

1 Like

I’ve been looking into implementing the necessary primitives to support signing transactions and messages on Ledger (the hardware wallet). Still not quite sure how much work it will be, but I think this would be a good candidate.

1 Like

I think you forgot to link to the second donation that you weren’t able to claim:

  • boxid: b8a6a4b5ed10af873ce56f4e65feb99a600b82d04361291c0990545c0ae952e5
  • txid: f6725cab9e734cd03bfe6917b9b7e9562ec4b5f6bbb47236a8bab6e9451f6b5f
  • but in a strange twist, I think this donation was from your own address (9gBSqNT9LH9WjvWbyqEvFirMbYp4nfGHnoWdceKGu45AKiya3Fq) - and I’ve just realised you mentioned it earlier in the thread; it is only spendable if the crowdfund total ≥ 1000 ERG.

Thanks to you both.

I think that’s a great idea for crowdfunding. I’m sure a number of people would be interested in supporting that.

I would recommend that we have somewhat of a standard for crowdfunding campaigns to make it easy for people to find them, read about them, and back them. A separate category (or sub-category) on the forum which is specifically for crowdfunding campaigns would allow for easy cataloguing, and in the title having tags such as [Ongoing] or [Complete] or [Ended] would be a plus.

On top of that I think providing users with both the exported campaign file which they can download + import as well as a 1 liner for tracking the campaign which people can copy + paste to track the campaign locally would be ideal.
(ie. ./ergo_cf track "First Ergo Crowdfund" 9gBSqNT9LH9WjvWbyqEvFirMbYp4nfGHnoWdceKGu45AKiya3Fq 50000 500)

1 Like

After a week of updates from my previous post and the fact that users will be wanting to use the CLI tool in the near future for new campaigns, I decided to go ahead and officially release v0.1.0 of the tool and provide precompiled binaries for Linux x86, Linux ARM, and Windows.

If there is demand I can reasonably easily cross-compile for Android or other non-mac targets reasonably easily. If anyone runs into any issues please let me know.

2 Likes

I’ve been looking into implementing the necessary primitives to support signing transactions and messages on Ledger (the hardware wallet). Still not quite sure how much work it will be, but I think this would be a good candidate.

I think this is a perfect candidate for next candidate, and the Foundation can secure its success.

@robert played with the tool, well done!

1 Like

650 Ergs (250 + 357 + 42 = 649, and I’ve added 1 Erg) have been sent to @robert !

https://explorer.ergoplatform.com/en/transactions/3d9280861dc2e4ea259960ef906fda96b8c1c434ff3466e064de53df3e02f7d7

1 Like

Thank you once again to everyone that supported the project. I’ll be looking forward to passing some of these Ergs I just got on to others in the community to support new interesting crowdfunding campaigns as they pop up.

2 Likes

Thought it was worth posting here, about a month ago there were some properties of the crowdfunding smart contract which were formally verified which you can check out on github here

This means that currently one can argue that crowdfunding campaigns on Ergo are one of the most secure crowdfunding methods currently available just 3 months after launch of main net. Quite exciting.

3 Likes

Sounds really nice! Could you elaborate on how the verification works and the theory behind it? What exactly does this allow us to claim? (in particular, does it test for all inputs?)

In short they are using a scala library called Stainless which is a verification framework which allows for formally proving things about scala programs which use a certain functional subset of scala. This library then plugs into the Z3 Theorem Prover which is one of the most used automated theorem provers/SMT solvers.

To get a better understanding of how it works I’d recommend just taking an hour or two and digging into some material on SAT/SMT solvers online for how they go about proving theorems automatically.

2 Likes

Very interesting. So in theory, we could even create similar to TheDAO contract of Ethereum and additionally prove that it is bug-free.

2 Likes