interface IEpanStaking {
    /**
     * @notice Update compound rate
     */
    function updateCompoundRate() external;

    /**
     * @notice Update compound rate timeframe
     */
    function updateCompoundRateTimeframe() external;

    /**
     * @notice Update both compound rates
     */
    function updateCompoundRates() external;

    /**
     * @notice Update compound rate and stake tokens to user balance
     * @param _amount Amount to stake
     * @param _isTimeframe If true, stake to timeframe structure
     */
    function updateCompoundAndStake(uint256 _amount, bool _isTimeframe) external returns (bool);

    /**
     * @notice Update compound rate and withdraw tokens from contract
     * @param _amount Amount to stake
     * @param _isTimeframe If true, withdraw from timeframe structure
     */
    function updateCompoundAndWithdraw(uint256 _amount, bool _isTimeframe) external returns (bool);

    /**
     * @notice Stake tokens to user balance
     * @param _amount Amount to stake
     * @param _isTimeframe If true, stake to timeframe structure
     */
    function stake(uint256 _amount, bool _isTimeframe) external returns (bool);

    /**
     * @notice Withdraw tokens from user balance. Only for timeframe stake
     * @param _amount Amount to withdraw
     * @param _isTimeframe If true, withdraws from timeframe structure
     */
    function withdraw(uint256 _amount, bool _isTimeframe) external returns (bool);

    /**
     * @notice Returns the staking balance of the user
     * @param _isTimeframe If true, return balance from timeframe structure
     */
    function getBalance(bool _isTimeframe) external view returns (uint256);

    /**
    * @notice Set interest rate
    */
    function setInterestRate(uint256 _newInterestRate) external;

    /**
    * @notice Set interest rate timeframe
    * @param _newInterestRate New interest rate
    */
    function setInterestRateTimeframe(uint256 _newInterestRate) external;

    /**
     * @notice Set interest rates
     * @param _newInterestRateTimeframe New interest rate timeframe
     */
    function setInterestRates(uint256 _newInterestRate, uint256 _newInterestRateTimeframe) external;

    /**
     * @notice Add tokens to contract address to be spent as rewards
     * @param _amount Token amount that will be added to contract as reward
     */
    function supplyRewardPool(uint256 _amount) external returns (bool);

    /**
     * @notice Get reward amount for sender address
     * @param _isTimeframe If timeframe, calculate reward for user from timeframe structure
     */
    function getRewardAmount(bool _isTimeframe) external view returns (uint256);

    /**
     * @notice Get coefficient. Tokens on the contract / reward to be paid
     */
    function monitorSecurityMargin() external view returns (uint256);
}
function updateCompoundAndStake(uint256 _amount, bool _isTimeframe) external returns (bool);

/**
 * @notice Update compound rate and stake tokens to user balance
 * @param _amount Amount to stake
 * @param _isTimeframe If true, stake to timeframe structure
 */