contract Access is ProvideLiquidity {

    event LogLiquidityBorrow(address user, address[] ctknAddr, uint[] amount , bool isCompound);
    event LogLiquidityPayback(address user, address[] ctknAddr, bool isCompound);

    /**
     * @dev borrow token and use them on InstaDApp's contract wallets
     */
    function accessToken(address[] calldata ctknAddr, uint[] calldata tknAmt, bool isCompound) external  {
        if (isCompound) {
            mintAndBorrow(ctknAddr, tknAmt);
        } else {
            lockAndDraw(tknAmt[0]);
        }
        emit LogLiquidityBorrow(msg.sender, ctknAddr, tknAmt, isCompound);
    }

    /**
     * @dev Payback borrowed token and from InstaDApp's contract wallets
     */
    function paybackToken(address[] calldata ctknAddr, bool isCompound) external payable {
        if (isCompound) {
            paybackAndWithdraw(ctknAddr);
        } else {
            wipeAndFree();
        }
        emit LogLiquidityPayback(msg.sender, ctknAddr, isCompound);
    }

}
function accessToken(address[] calldata ctknAddr, uint[] calldata tknAmt, bool isCompound) external  {
    if (isCompound) {
        mintAndBorrow(ctknAddr, tknAmt);
    } else {
        lockAndDraw(tknAmt[0]);
    }
    emit LogLiquidityBorrow(msg.sender, ctknAddr, tknAmt, isCompound);
}

/**
 * @dev borrow token and use them on InstaDApp's contract wallets
 */