Giter Site home page Giter Site logo

chainsfr_backend's Introduction

ventureum

Ventureum provides a platform for users to purchase third-party tokens. The platform provides a comprehensive monitoring system and a refund system. At the same time, the project funder can also sell Token through this platform.

Project Funder (owner):

As a project funder, you can create A,B token, and sell all B tokens through ventureum. Ventureum can make your token more competitive. You should finish all milestone one by one after token sale, there will be a regulatory agency to rate your milestone. After a milestone finished (finalized), you will receive reward for that milestone(unlock the fund from token sale).

Investor:

As an investor, you will see a list of investment project in ventureum platform. In each project, you can view the project information and decide whether to challenge it. After you buy some projects' token, you can monitor the milestone completion of this project and also the regulator evaluation. If you are not satisfied with this project, you can complete the refund during the refund phase.

Proxy:

As a proxy, you can bid a project milestone object in milestone regulator stage. After you bid an object, you can rate it in rating stage. After a milestone finalized, proxy can received the reward by your reputation.

How to start

Alpha:

Ventureum alpha website:

alpha.ventureum.io

Test:

also, if you want create a demo or test the platform, we do provide a test website for you :

demo.ventureum.io

Note: for demo reason, all time periods are different from normal version(formal ones). E.g.: In test, the minimum milestone length is 20 mins, it is 60 days in formal one.

How to use it

As an owner:

1, create a project (cost 50000 vtx)

2, wait the project to be approved (7 days)

If your project be challenged and success. Your project will be removed from ventureum project list. Your project will be added to whitelist if not be challenged or challenge failed

3, Add all milestone and milestone objects

4, start token sale.

5, active milestone and working on that.

In milestone stage, if you not finish your milestone on time or investors not satisfied with your results. Investors can refund in refund stage(normally the last 7 days).

6, When you finish your milestone, you can active next milestone in order to finalize this one.

To finalize this milestone, you need to activate next milestone. If this milestone is the last one, there will be a button called finalize After the milestone finalized, you can withdraw the ehter left.

As an investor:

1, Look the project information to decide whether to challenge

If you decide to challenge the project, it will cost you 50000 vtx. You will earn reward when the challenge succeeded.

2, Purchase token when project in token sale stage.

View the project information and milestone information before purchase.

3, Vote for the proxy in voting stage

For some reputable proxy, you can vote for them, and the result will affect the rewards that proxy finally receives. Your vote can motivate them to monitor next milestone.

4, If you are not satisfied with the project milestone, you can refund in refund stage.

All refund ether will be locked by one month, after one month, you can withdraw them.

As a proxy:

1, In milestone regulating stage, bid object that you can supervise.

Before you bid them, you can view the project object information and rewards.

2, In milestone rating stage, you should rate all objects that you bid.

Your rate have to be reasonable in order to gain the trust of investors.

3, You can withdraw reward after milestone finalized.

Development Environment

1. Install Docker

2. Run the Docker Container

./dock.sh

The Development Environment Contains the Following

Ubuntu 16.04
sudo
curl
git
vim
spacemacs
Node.js 8
truffle

chainsfr_backend's People

Contributors

davidhhshao avatar dependabot[bot] avatar guyuxiang avatar invincible2016 avatar timothywangdev avatar

Watchers

 avatar  avatar  avatar

chainsfr_backend's Issues

Email sending optimization

Currently, emails are sent out immediately after send() is called, which is not ideal since Tx takes ~15s to confirm. If the receiver tries to deposit the funds before the send tx is confirmed, an insufficient funds error will occur given the current implementation.

An alternative is to check whether the previous send tx is confirmed in the frontend, and disable the deposit function till the tx is confirmed. However, this approach is anti-intuitive for users who are expecting that they are able to deposit funds as soon as the email is received.

The above problem applies to transfer cancellations as well. The sender will receive a confirmation email immediately after send() is called, and the confirmation email provides a link to cancel the transfer. A cancellation is essentially decrypting the escrow wallet and transfer funds back to the sender's address. Again, if the sender tries to cancel the transfer before the send tx is completed. an insufficient funds error will occur.

A better solution is the track send tx, once is is confirmed, send out confirmation emails to both sender and receiver. This requires a lambda cron job, which periodically checks our database, looking for entries with only sendTxHash and no cancelTxHash or receiveTxHash, check sendTxHash status using infura (eth, erc20), ledger api (btc). Once the sendTxHash is confirmed, the send() function is invoked.

Maybe it is a good idea to separate database entries into three categories based on their transfer status:
0. pending_tx // sent, but the TX has not confirmed

  1. pending // sent, sendTxHash confirmed, but not received or cancelled
  2. received
  3. cancelled

Then we only need to search pending_tx database

Other suggestions are welcome.

Better delay control

Currently, the delay param is set to 30 seconds for all crypto types. Ideally, the delay should be adjusted based on block time.

Add the following config.js for better control:

DelaySeconds: {
    [cryptoType]: [int] \\ delay in seconds by crypto type
}

Script for generating email templates

Ideally, the usage should be like:

node generateTemplate.js --htmlPart [html file] --subjectPart [string] --templateName [string] > [templateName].json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.