contract hierachy - GenusDev/genie-portal GitHub Wiki

Contract Development

All contracts built use ERC20 standard to ensure they are tradable on secondary markets. Additionally we used the templated contracts available through the open source project Open Zepplin (OpenZepplin’s github). We are adapting the Crowdsale token open zepplin’s contract, which involves managing the distribution of tokens (a separate contract) through a ‘controller’. We also created a token contract specific to our proposed CrossFit Coin, which is separate from the Crowdsale contract. Instances of this contract represent the coin that will be distributed by the site.

Mapping addresses for contract deployment

Deploying a crowdsale contract requires a sending address that is calling the function to receive the tokens from the contract’s address, which holds the tokens until dispersed. This specific function has its own address that is a part of the ABI, which is essentially a list of the contract’s functionality. The token itself is a separate contract, and has its own address for creating instances of itself. Our contracts are mintable, meaning we can fix the supply of tokens for the contract / crowdsale, and then have the variability to mint new tokens if our goal for the time period is overshot. Each funding round will go until a certain number of fixed tokens are bought.

Gas and transaction costs

We expect that most minimal transaction will cost from 5 cents to 15 cents each. This might be more involved the more lengthy the contract. The cost of transaction varies in part with the value of ether, which can be checked on sites such as the ETH gas station. It may be best to set each transaction well above the gas price and the difference is assumed by the project.

“Users will generally have to trust the DApp they are using, and DApps that have good UI and UX, may indicate some estimated costs to the user, or possibly even hide such details by sending the user's account some ether, or giving a new user an account that has some ether.” -(how-much-gas)

The Blockchain framework will make use of the Ethereum Blockchain and its programming language, Solidity. In the short run, the intention is to allow security tokens to be exchanged for earnings made to date. The earnings will be invested and all growth will be transferred to the owners of each token upon realization. The idea is that this should give sufficient incentive for people to hold on to their tokens for as long as possible.

The solidity contract will need to Set up wallets Transfer tokens Read wallet addresses for each user Distribute earnings to wallets that contain the token.

It is important that the smart contracts are built with as much functionality as possible, which is why we are beta-testing building smart contracts using the crossfit coin so we can come up with a comprehensive list of considerations to integrate into the smart contract.

Ideal code size:

**** bites

⚠️ **GitHub.com Fallback** ⚠️