contract ChronosFinance is ChronosBase, PullPayment {
    /// @notice The dev fee in 1/1000th
    /// of a percentage.
    uint256 public feePercentage = 2500;
    
    /// @notice The game starter fee.
    uint256 public gameStarterDividendPercentage = 1000;
    
    /// @notice The wager price.
    uint256 public price;
    
    /// @notice The wager price -- setting for the next game.
    uint256 public nextPrice;
    
    /// @notice The current prize pool (in wei).
    uint256 public prizePool;
    
    /// @notice The current 7th wager pool (in wei).
    uint256 public wagerPool;
    
    /// @notice Sets a new game starter dividend percentage.
    /// @param _gameStarterDividendPercentage The new game starter dividend percentage.
    function setGameStartedDividendPercentage(uint256 _gameStarterDividendPercentage) external onlyCFO {
        // Game started dividend percentage must be 0.5% at least and 4% at the most.
        require(500 <= _gameStarterDividendPercentage && _gameStarterDividendPercentage <= 4000);
        
        gameStarterDividendPercentage = _gameStarterDividendPercentage;
    }
    
    /// @dev Send funds to a beneficiary. If sending fails, assign
    /// funds to the beneficiary's balance for manual withdrawal.
    /// @param beneficiary The beneficiary's address to send funds to
    /// @param amount The amount to send.
    function _sendFunds(address beneficiary, uint256 amount) internal {
        if (!beneficiary.send(amount)) {
            // Failed to send funds. This can happen due to a failure in
            // fallback code of the beneficiary, or because of callstack
            // depth.
            // Send funds asynchronously for manual withdrawal by the
            // beneficiary.
            asyncSend(beneficiary, amount);
        }
    }
    
    /// @notice Withdraw (unowed) contract balance.
    function withdrawFreeBalance() external onlyCFO {
        // Calculate the free (unowed) balance.
        uint256 freeBalance = this.balance.sub(totalPayments).sub(prizePool).sub(wagerPool);
        
        cfoAddress.transfer(freeBalance);
    }
}
/// @dev Defines base finance functionality for Chronos.
function _sendFunds(address beneficiary, uint256 amount) internal {
    if (!beneficiary.send(amount)) {
        // Failed to send funds. This can happen due to a failure in
        // fallback code of the beneficiary, or because of callstack
        // depth.
        // Send funds asynchronously for manual withdrawal by the
        // beneficiary.
        asyncSend(beneficiary, amount);
    }
}

/// @dev Send funds to a beneficiary. If sending fails, assign
/// funds to the beneficiary's balance for manual withdrawal.
/// @param beneficiary The beneficiary's address to send funds to
/// @param amount The amount to send.