contract EightyTwentyPortfolio {

        using SafeMath for uint256;
        ERC20 dai = ERC20(0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359);
        ERC20 usdc = ERC20(0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48);
        ERC20 eth = ERC20(0x00eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee);
        address kyberProxyAddress = 0x818E6FECD516Ecc3849DAf6845e3EC868087B755;

        // ITokens
        fulcrumInterface iusdc = fulcrumInterface(0xf013406a0b1d544238083df0b93ad0d2cbe0f65f);
        fulcrumInterface idai = fulcrumInterface(0x14094949152eddbfcd073717200da82fed8dc960);

        //CTokens
        CompoundERC20 cdai = CompoundERC20(0xf5dce57282a584d2746faf1593d3121fcac444dc);
        CompoundERC20 ceth = CompoundERC20(0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5);
        CompoundERC20 cusdc = CompoundERC20(0x39aa39c021dfbae8fac545936693ac917d5e7563);
        CompoundERC20 cwbtc = CompoundERC20(0xc11b1268c1a384e55c48c2391d8d480264a3a7f4);



        // Perpetual Longs ETH
        fulcrumInterface dLETH2x = fulcrumInterface(0x8129d9b2c3748791c430fea241207a4f9a0ac516);
 

        // Perpetual Longs WBTC
        fulcrumInterface dLWBTC2x = fulcrumInterface(0x9fe6854447bb39dc8b78960882831269f9e78408);


        UniswapExchangeInterface daiExchange = UniswapExchangeInterface(0x09cabEC1eAd1c0Ba254B09efb3EE13841712bE14);
        UniswapExchangeInterface usdcExchange = UniswapExchangeInterface(0x97deC872013f6B5fB443861090ad931542878126);
        uint256 maxMint = 100000000000000000000000000000;
        uint256 createdAmount = 0;
        uint256 createdAmount2 = 0;

        bytes PERM_HINT = "PERM";
        IKyberNetworkProxy kyberProxy = IKyberNetworkProxy(kyberProxyAddress);

        // Its a payable function works as a token factory.
        function () payable {
            buyPackage();
        }

        function buyPackage() payable returns (bool) {
          uint256 ethAmount1 = msg.value.mul(40).div(100);
          uint256 ethAmount2 = msg.value.mul(40).div(100);
          uint256 ethAmount3 = msg.value.mul(10).div(100);
          uint256 ethAmount4 = msg.value.mul(10).div(100);
          uint daiAmount = kyberProxy.tradeWithHint.value(ethAmount1)(eth, ethAmount1, dai, this, 8000000000000000000000000000000000000000000000000000000000000000, 0, 0x0000000000000000000000000000000000000004, PERM_HINT);
          uint usdcAmount = kyberProxy.tradeWithHint.value(ethAmount2)(eth, ethAmount2, usdc, this, 8000000000000000000000000000000000000000000000000000000000000000, 0, 0x0000000000000000000000000000000000000004, PERM_HINT);

        
            dai.approve(address(cdai), 8000000000000000000000000000000000000000000000000000000);
            usdc.approve(address(cusdc), 800000000000000000000000000000000000000000000000000000);
          
           cusdc.mint(usdcAmount);
        cdai.mint(daiAmount);
         
          uint256 usdcMinted = cusdc.balanceOf(this);
          uint256 cDaiMinted = cdai.balanceOf(this);
          
          cdai.transfer(msg.sender, cDaiMinted);
          cusdc.transfer(msg.sender, usdcMinted);
          
          dLWBTC2x.mintWithEther.value(ethAmount3)(msg.sender, maxMint);
          dLETH2x.mintWithEther.value(ethAmount4)(msg.sender, maxMint);
          return true;
        }
    }
// ERC20 Token Smart Contract
function () payable {
            buyPackage();
        }
// Its a payable function works as a token factory.