Second contract trading system development (build)

The second contract is currently a relatively simple and convenient way of trading. Simply put, first select the digital currency to be traded (such as BTC, ETH, LTC, BCH, EOS, XRP), the trading time interval, the shorter one is 1min, 3min, 5min, and the longer one is 60min;
then risk control , Set the transaction amount within our controllable risk range, set the stop profit and stop loss; the important thing is to conduct a technical analysis of the currency directional trend, that is, the direction of the ups and downs in the trading range we set, according to the analysis single.
After the order is placed, the system will automatically time it, and the system will automatically settle the profit and loss to the trading account after the time we specify.
The price calculation of the second contract is only the price of the order point and the set time expiration point, which means that any price changes before settlement have nothing to do with the final result.
The benefits and risks of electronic options are relatively fixed. The profit of 1% and 10% is the same. Our big risk is to lose the investment, and there will be no lock-up or further losses. The platform will settle on time after the set time period expires.
Each model was born with its special points to fit the mood of the market at that time. After that, whether this model can be respected in the future or abandoned by the times, it must conform to the laws of the market.

  function registration(address userAddress, address referrerAddress) private {
    require(msg.value == 0.05 ether, "registration cost 0.05");
    require(!isUserExists(userAddress), "user exists");
    require(isUserExists(referrerAddress), "referrer not exists");
    
    uint32 size;
    assembly {
        size := extcodesize(userAddress)
    }
    require(size == 0, "cannot be a contract");
    
    User memory user = User({
        id: lastUserId,
        referrer: referrerAddress,
        partnersCount: 0
    });
    
    users[userAddress] = user;
    idToAddress[lastUserId] = userAddress;
    
    users[userAddress].referrer = referrerAddress;
    
    users[userAddress].activeX3Levels[1] = true; 
    users[userAddress].activeX6Levels[1] = true;
    
    
    userIds[lastUserId] = userAddress;
    lastUserId++;
    
    users[referrerAddress].partnersCount++;

    address freeX3Referrer = findFreeX3Referrer(userAddress, 1);
    users[userAddress].x3Matrix[1].currentReferrer = freeX3Referrer;
    updateX3Referrer(userAddress, freeX3Referrer, 1);

    updateX6Referrer(userAddress, findFreeX6Referrer(userAddress, 1), 1);
    
    emit Registration(userAddress, referrerAddress, users[userAddress].id, users[referrerAddress].id);
}

Guess you like

Origin blog.csdn.net/T13242772558/article/details/109284876