📜 ⬆️ ⬇️

Decentralized crowdfunding for any projects

What I don't like in crowdfunding sites:

- A huge commission - up to 10%;
- Hard moderation - not any project can be published;
- the absence of a multilingual description of projects and great difficulties with the transfer of money, if the backer, for example, from China;
- the inability to return at least part of the money if the author of the project does not fulfill its obligations within the specified period.

I have solved all of the above problems partially or completely in my cryptocurrency, in which I have integrated the decentralized crowdfunding mechanism.
')

In 2 words about what I did




Pro Dcoin


Dcoin is a decentralized cryptocurrency, which has been functioning since April 2014. It has 2 types of accounts - anonymous and mining. If you buy coins on the exchange, you can use a simple anonymous account. Anonymous accounts and funds in their wallets can neither be blocked nor deleted.

Some more details about Dcoin
Dcoin has been working alone for over 3 years. In Dcoin there are no central servers, just as in Bitcoin, each node stores a complete copy of the database . The exchange of new data between nodes takes place using blocks . Each block contains a hash of the previous block. Each transaction from the user contains a signature that proves that the transaction is from this user.



Unlike Bitcoin, Dcoin has not one, but 66 types of different transactions , thanks to which Dcoin can exist in the form in which it is presented.

Example transaction structure:

FieldDescriptionThe size
TYPETransaction type1 byte
TIMETransaction time4 bytes
USER_IDID of the user who created the transaction5 bytes
CURRENCY_IDCurrency ID1-3 bytes
AMOUNTThe size of the promised amount1-12 bytes
VIDEO_TYPEyoutube, vimeo, youku, null4-7 bytes
VIDEO_URL_IDID from video hosting5-32 bytes
PAYMENT_SYSTEMS_IDSPayment systems id1-24 bytes
SIGNFrom 1 to 3 signatures (TYPE, TIME, USER_ID, CURRENCY_ID, AMOUNT, VIDEO_TYPE, VIDEO_URL_ID, PAYMENT_SYSTEMS_IDS) from USER_ID128 to 4096 bytes


The header (TYPE, TIME, USER_ID) and SIGN are in all transactions, and all other fields change depending on the purpose of the transaction.

Block structure:

FieldDescriptionThe size
BLOCK_IDBlock sequence number4 bytes
TIMEThe time when the block was created4 bytes
USER_IDID of the user who created the block5 bytes
LEVELThe level at which the miner was at the time of block creation2 bytes
SIGNSignature from (TYPE, BLOCK_ID, PREV_BLOCK_HASH, TIME, USER_ID, LEVEL, MRKL_ROOT) made with the node-keyfrom 128 bytes to 512 bytes
TRANSACTIONSTransaction listUp to 3Mb

A more detailed description of the work of Dcoin can be found in the wiki .

Adding a new project


Starting a new project is very simple. You just need to fill in a few fields.





A few minutes after being sent to the DC network, when the transaction enters the block, your project will be available for funding, and it will be possible to send coins to it.

What it looks like from the inside

Transaction structure

FieldDescription
TYPETransaction type
TIMETransaction time
USER_IDID of the user who created the transaction
CURRENCY_IDCurrency ID
AMOUNTDesired amount
END_TIMEEnd of fundraising
LATITUDELatitude
LONGITUDELongitude
CATEGORY_IDCategory ID
PROJECT_CURRENCY_NAMEName for new cryptocurrency
SIGNFrom 1 to 3 signatures (TYPE, TIME, USER_ID, CURRENCY_ID, AMOUNT, END_TIME, LATITUDE, LONGITUDE, CATEGORY_ID, PROJECT_CURRENCY_NAME) from USER_ID

Transaction example


 (
    [type] => 35
    [time] => 1408470376
    [user_id] => 1
    [currency_id] => 72
    [amount] => 1000
    [end_time] => 1409075213
    [latitude] => 39.94887
    [longitude] => -75.15005
    [category_id] => 4
    [project_currency_name] => TEST003
    [Sign] => 820100701a18c4e8f3f92a109ff347784bcd1b78325e8ccbb4b69693b509a211212a7d3306268347c2228de0d395f11368358c52141c8fe6056d63b520942d8f1434722b5bdbf97c412099f20b3f82fc48dc484db93baf78084583134b0f0b9b667cabc5b842befa6ad4519677241f37de8ecdac6ac9026bfe2454810f267fe8f6547516e358cdf9eb3f705085833aa37f4c8a6cb046949f415085e56a537698b0c6d762840b82188ebfe86736d5b7ac47823bc4a25d72065208f082968377c902a757bfe6fd10225d1f7c96fcb860543d8e5c2cae92baa67fb705560e437141f6610798f58e6564b24ef8dbbc0a00011f7e21cc399f941babaab3637f6555f2077170
 )

After processing such a transaction, an entry is created in the cf_projects table

Add description for project


You can attach up to 10 descriptions in different languages. Descriptions can be added only in the form of URL images. This is necessary in order to shift responsibility for the content of the content from unmoderated nodes to the hosting where the picture will be placed, as well as to save space in the database of the nodes.



What it looks like from the inside

Transaction structure

FieldDescription
TYPETransaction type
TIMETransaction time
USER_IDID of the user who created the transaction
PROJECT_IDProject ID
LANG_IDLanguage ID
BLURB_IMGImage for the catalog
HEAD_IMGCap image
DESCRIPTION_IMGProject Description Picture
PICTUREMain picture
VIDEO_TYPEIf there is video, then video_type
VIDEO_URL_IDIf there is video, then video_url_id
NEWS_IMGProject news picture
LINKSLinks for picture descriptions in the format [["url1", x1, y1, x2, y2], ["url2", x1, y1, x2, y2], ...]. up to 512 characters.
HIDEYou can hide if you accidentally added a description in an unnecessary language
SIGNFrom 1 to 3 signatures (TYPE, TIME, USER_ID, PROJECT_ID, LANG_ID, BLURB_IMG, HEAD_IMG, DESCRIPTION_IMG, PICTURE, VIDEO_TYPE, VIDEO_URL_ID, NEWS_IMG, LINKS, HIDE) from USER_ID

Transaction example


 (
    [type] => 40
    [time] => 1408470908
    [user_id] => 1
    [project_id] => 4
    [lang_id] => 42
    [blurb_img] => http://i.imgur.com/BBnBbC5.png
    [head_img] => http://i.imgur.com/BBnBbC5.png
    [description_img] => 0
    [picture] => http://i.imgur.com/BBnBbC5.png
    [video_type] => youtube
    [video_url_id] => 0
    [news_img] => 0
    [links] => 0
    [hide] => 0
    [Sign] => 82010085c558dd411e816f589d57e48a02bf9231c9dcc55994568e0e00a7db3980c7005d91e88815e5e5a3dc5908a7c4f97c1f973f7ba576c86621f59b608e9d84ce9595710050a42a72e12fa78eb6dd12f8ff90f7004d8b8426a7cf714d7707899e8aafd9dc4534b94292fe849cce765ca975af88f2524874e22439716a59d1473baf115da4d67193320a33f36a442aa1c9711c3145c7499c207fbcc2846f9712bb0dc96c6c59708fd8d25e36a631213679a060a728473be8f23b8f8591bce50b64c67cca00d970fce93a714d2678119b1e67324e9b462986d11239337532a179a6f455f68d3a2e59df24f34590bc032b7c8cc5d633add4bef4c8c18efe7100a5a873
 )

After processing such a transaction, an entry is created in the cf_projects_data table, or if an entry with the same language for the same project already exists, then the existing one is updated.



Sending coins to a crowdfunding project


In order to finance a project, you just need to click “Finance”, after which this form will open:





What it looks like from the inside

Transaction structure

FieldDescription
TYPETransaction type
TIMETransaction time
USER_IDID of the user who created the transaction
PROJECT_IDProject ID
AMOUNTAmount
COMMISSIONCommission, which will go to the miner, who signed the block
COMMENTNote encrypted by the project author’s public key
SIGNFrom 1 to 3 signatures (TYPE, TIME, USER_ID, PROJECT_ID, AMOUNT, COMMISSION, COMMENT) from the user USER_ID

Transaction example


 ([Type] => 48 [time] => 1408471786 [user_id] => 1 [project_id] => 4 [amount] => 100 [commission] => 0.1 [comment] => 4793010de6e65288fba7ba71e93883cafc0c724fb6306cc77b0525721b5e76883234997bcb4bda16e2568e5c1c30fb53fdb61999aa0c066189352d8ebc9d4dfb58d298d997cfdcf60c10d89815a4f620a68bbc690f95503e50e1913b3f82322df37895587413fde1b09c8acc4d746a145027b4753f180b073c31c8ab199f475d5c9c86841aaee506cb97bebe799e7497bf5765f848d9bfda3c58a44be9da4e86bb319d6580c5a35a8e49ec3a519bbfb53b33d590f691247929c2d489bcd8fa0d70c78c0b302edd39a474f116cfbf0d972ce0dee3999525d021161a6c5492c9a895eb01e764ee4fc1287ac41d3aea1b251108f362eb4984f01acf34ab0d202991 [sign] => 820100766b5e41a7fcc473912dfc74afdd7f47dbacbf0a8ebd6b3f552a3d58972cbd979c61e1942b59b1cfaa74b89a8bbc30849b7e9942e1fd16be2a48ccc0b2ffb1152bc737967ec3330b4225b4f195d7d7f8356c15ab72ccbaed9587445bacd45f367d7d20a34ed546b0d48dafe1cb4cf3a3d3187a50a52eafd09d874da67f7e2ccfd861a17b5ee91bbcf5cd92565faf5b2d25d249d0f6fe307d63cb883343eb9c9be4ff4c0ed2ca83ea3e5e8c54bf9d780d8  19e3f5ca2495c5aab4dff6c34bfa8d5bde60beeb84c6474305c968920a5526a6c563c96abdd4a67efb793637d009f0878bbec56e277b87ad4675098a4eb650c6910ab9734e4e4f4a4f4a2772639dbfc663cd6bf6bd60bd6bde60beeb84cfcfcfcfcfcdcdcbcdcbcbcbcd6bf6bfbcbfcb6c563cd6bfbcbfcbcc663cd6bfbcbcbcc663cd6bf6b34cb 

After processing such a transaction, an entry is created in the cf_funding table, where the amount from the transaction is written, and the sender deducts this amount from the account.


If the end_time of the project <= time from the block, then the project is closed - in cf_projects in the close_block_id indicates the ID of the current block. Further 2 scenarios are possible:
1. The required amount is typed. In the cf_currency table, an entry is created with the name of the project currency. The project author is charged the collected amount. Backer's accrued project currency in proportion to the amount with which they financed the project.
2. The required amount is not recruited. All backers return the coins that they sent to this project.



Cancellation of financing


If you change your mind, you can return your coins until the project is completed. You just need to click cancel in the list of operations on your account.


What it looks like from the inside

Transaction structure

FieldDescription
TYPETransaction type
TIMETransaction time
USER_IDID of the user who created the transaction
FUNDING_IDID from the cf_funding table
SIGNFrom 1 to 3 signatures (TYPE, TIME, USER_ID, FUNDING_ID) from the user USER_ID

Transaction example


 (
    [type] => 44
    [time] => 1408472956
    [user_id] => 1
    [funding_id] => 40
    [Sign] => 8201001245f8abcaf636c43ddecd54348c1f3462ce3ef3179c5da246e221f09567dc909ba1c477e62ed1a3bb4909230045eda3476c3a69ac602730f6f47955ca67b030011872b0f780c1f4a8e140f2e90e2f76de8781c372922c172c07e8065227f04fb7bf16b810c884f4c190915f9c9d40ee03bed24cfa239ef1400b536511150201a87c125467cc08253647d53381f75baf791f42d68cd707f61c13c4efeb780f1ae7ed3bb6915a4a4e666ace825bf64bdd0bc7246869cb1d1c76f16d377b9d543c085b1b4062e5602fe2bc919c6f54805a8ad1cd9fbb97e03e68c57f56eac96810a60f6d5529dcb143c39920bcd46391d489adf3bbddcea4d3fdbe9e53267ae828
 )

After processing such a transaction, del_block_id is specified in the cf_funding table for the specified ID. And the sender returns his coins.




Delete project


Until the fundraising is completed, you can delete your project. In this case, all funds will be returned to the backers.


What it looks like from the inside

Transaction structure

FieldDescription
TYPETransaction type
TIMETransaction time
USER_IDID of the user who created the transaction
PROJECT_IDProject ID
SIGNFrom 1 to 3 signatures (TYPE, TIME, USER_ID, PROJECT_ID) from the user USER_ID

Transaction example


 (
    [type] => 46
    [time] => 1408473247
    [user_id] => 1
    [project_id] => 3
    [Sign] => 82010034492a93753feb86a4ef56ec465f67eca9ad6969867e9f59ccbf93e5e729ea645de0848f5501366f4bc0db4be41ceef8fe0650962323b7ba41f328af4d2f3228a7a0ce0865b05d1e7e27c075f779db6af864b914281d97d5c4445ec94fe15667197496d7363a2036ed5d829ceeb73056e31888abc8988164a9ec30bd9f133776288bce53200654d09cd5630e57fb38ff8dfc7f820e37bf7985f20c29030f84abb6f03ebfc170fdee7ebec99c777a7bdd4ac01e2ea1a50cb88f7ae9f127cabe33fd3f4a25effd321f0fc5e3c196db64d51d4adfc52e0d878a5fb1f5863facabd34d33a41cfa62d196e67f5c209b48310e78524e3a3a2be1564a5eb7d5af3f33e4
 )

After processing such a transaction in the cf_projects table for this project, del_block_id is indicated. And all the backers return their coins.




Category change for project


The project category can be changed at any time.


What it looks like from the inside

Transaction structure

FieldDescription
TYPETransaction type
TIMETransaction time
USER_IDID of the user who created the transaction
PROJECT_IDProject ID
CATEGORY_IDCategory ID
SIGNFrom 1 to 3 signatures (TYPE, TIME, USER_ID, PROJECT_ID, CATEGORY_ID) from the user USER_ID

Transaction example


 (
    [type] => 50
    [time] => 1408475554
    [user_id] => 1
    [project_id] => 4
    [category_id] => 13
    [Sign] => 8201004155bf4df043e9c7d450d66ff24a6c139f0943fc1572b5ecb95cbaa0d390f374f1a3f968e779b7dc067aff5a7dfcd353d53aa533c0c4f85c429954176bcb2136e63fa985008b889c5aa69c2eb2c65d0bf08bcf61cc66da18d70df5e07d9fcb484207ea98fb60b2fca6e5657b7d0d3c55f13e6e3a12840eb7162807fc54be5af15b32403a40d33b11e8130cf152a204c5bc235cd5e1b7665083a26425807512b09a6adf894d2e2b9c74a88112bf4962e1592cdbdd2fbdf7095f1c70b599f2b8b3afcc9a47935f49696316bb76ede1b999a7b62fc6de138e1be9948f222df8ab57457325a3197a03ca1c954a75cc8ba830bc9adbf34a25c77ddfe97ba8ec76fba1
 )

After processing such a transaction in the cf_projects table for this project, the category_id changes.




Comments


Comments can be written only by those who funded the project, or the author of the project. You can not delete comments.





What it looks like from the inside

Transaction structure

FieldDescription
TYPETransaction type
TIMETransaction time
USER_IDID of the user who created the transaction
PROJECT_IDProject ID
LANG_IDLanguage ID
COMMENTComment
SIGNFrom 1 to 3 signatures (TYPE, TIME, USER_ID, PROJECT_ID, LANG_ID, COMMENT) from the user USER_ID

Transaction example


 (
    [type] => 47
    [time] => 1408475862
    [user_id] => 1
    [project_id] => 4
    [lang_id] => 42
    [comment] => Test
    [Sign] => 820100beb4a532f32b465b86d4ad54245e121d083a031e75da6c270af906ea55914bbc51ec6dcbfde872600b3d154d7f72dc70706a76ef153ec693dc2baf8f5938e393dc91fdc376cf5beada0bcf51aa4d409cf802b01738aae8c709b7734d68a84addd8bebd9079a4843a746fa209e350b656dee5038540099e809de6850907103d41561ef67757a02f68f8f19822ed7e33a4698cc45d17c2de02ff8530dba4a9a9b3866a518e3aeb31488321439d31a24e8d5fbd711a2f120d6e714e061427916c9f22a7553395772aec400c8305d156b30bdd7ed568d1826f005b56a2ad2ac6aed607a1c204e8c39b07513435cff0b9c56746d39017f5dd4fe20b7ac2c83cb39959
 )

After processing such a transaction in the cf_comments table, a row is added with a new comment to the project.




That's all the transactions that are responsible for the functioning of Dcoin's crowdfunding.



The designer from me is useless, in order not to frighten people with his arts, I redraw the design of the pages with the projects of the kicksterter.



"All or nothing"


The author of the project can not pick up the coins if the project has not yet completed. It is necessary to combat fraud. Suppose 80% of the amount is accumulated, and suddenly one of the backers finds out that this is, for example, the resale of some goods from ebay in the third. He writes about this in the comments, and this comment is seen by all the old and new backers. Some of the old backers will cancel their payment, the project will not collect the required amount, and all coins will be returned.



Anonymity and security


With 3 keys associated with one user_id, you can safely and anonymously use Dcoin. You simply enter the address of any pool in the browser, enter the 1st key and get into your account. No trace of your stay will be left in the pool database. In this mode, you can transfer and receive coins, create and finance crowdfunding projects. If the admin pool integrates a script that will send your key to its server, then he can not do anything with it, because for any transaction on your behalf 2 more signatures will be required.

Source: https://habr.com/ru/post/234519/


All Articles