DAPP代币合约做市流程质押挖矿分红系统开发(开发规则及详细)
区块链技术概括起来是指通过去中心化和去信任的方式集体维护一个可靠数据库的技术。其实,区块链技术并不是一种单一的、全新的技术,而是多种现有技术整合的结果,这些技术与数据库巧妙地组合在一起,形成了一种新的数据记录、传递、存储与呈现的方式
//Contract to sell and distribute VEN tokens
contract VENSale is Owned{
///chart of stage transition
///
///deploy initialize startTime endTime finalize
///|<-earlyStageLasts->||<-closedStageLasts->|
///Created Initialized Early Normal Closed Finalized
enum Stage{
NotCreated,
Created,
Initialized,
Early,
Normal,
Closed,
Finalized
}功能及逻辑技术I59系统2OO7开发3O69
using SafeMath for uint256;
uint256 public constant totalSupply=(10**9)*(10**18);//1 billion VEN,decimals set to 18
uint256 constant privateSupply=totalSupply*9/100;//9%for private ICO
uint256 constant commercialPlan=totalSupply*23/100;//23%for commercial plan
uint256 constant reservedForTeam=totalSupply*5/100;//5%for team
uint256 constant reservedForOperations=totalSupply*22/100;//22 for operations
//59%
uint256 public constant nonPublicSupply=privateSupply+commercialPlan+reservedForTeam+reservedForOperations;
//41%
uint256 public constant publicSupply=totalSupply-nonPublicSupply;
uint256 public constant officialLimit=64371825*(10**18);
uint256 public constant channelsLimit=publicSupply-officialLimit;
//packed to 256bit
struct SoldOut{流程及详情:yy625019
uint16 placeholder;//placeholder to make struct pre-alloced
//amount of tokens officially sold out.
//max value of 120bit is about 1e36,it's enough for token amount
uint120 official;
uint120 channels;//amount of tokens sold out via channels
}
SoldOut soldOut;
uint256 constant venPerEth=3500;//normal exchange rate
uint256 constant venPerEthEarlyStage=venPerEth+venPerEth*15/100;//early stage has 15%reward
uint constant minBuyInterval=30 minutes;//each account can buy once in 30 minutes
uint constant maxBuyEthAmount=30 ether;
VEN ven;//VEN token contract follows ERC20 standard
address ethVault;//the account to keep received ether
address venVault;//the account to keep non-public offered VEN tokens
uint public constant startTime=1503057600;//time to start sale
uint public constant endTime=1504180800;//tiem to close sale
uint public constant earlyStageLasts=3 days;//early bird stage lasts in seconds
bool initialized;
bool finalized;
function VENSale(){
soldOut.placeholder=1;
}