High Gas Cost

Hello! I am a bit new to this world so I had a question. I'm trying to create my own crypto/exchange. I've managed to deploy all the contracts and link them to the front-end. Since I'm alone in the pools I gain a lot, but when I try to harvest I get hit by a huge gas price. Is the gas price determined by the amount i'm trying to pull out of the pool or could it be something else? (Note I am also getting these high gas price for anything I do, this gas increase started since I started staking.)

When I lower the gas limit I get this:

When I try to lower the gas limit manually it doesn't go through. So is this due to the amount i'm trying to pull or something else? Here is also the code for the deposit function, note that the pool has a depositFeeBP of 0.

// Deposit LP tokens to MasterChef for PONZI allocation.
    function deposit(uint256 _pid, uint256 _amount, address _referrer) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        if (_amount > 0 && address(ponziReferral) != address(0) && _referrer != address(0) && _referrer != msg.sender) {
            ponziReferral.recordReferral(msg.sender, _referrer);
        if (_amount > 0) {
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            if (address(pool.lpToken) == address(ponzi)) {
                uint256 transferTax = _amount.mul(ponzi.transferTaxRate()).div(10000);
                _amount = _amount.sub(transferTax);
            if (pool.depositFeeBP > 0) {
                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                pool.lpToken.safeTransfer(feeAddress, depositFee);
                user.amount = user.amount.add(_amount).sub(depositFee);
            } else {
                user.amount = user.amount.add(_amount);
        user.rewardDebt = user.amount.mul(pool.accPonziPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);

Thanks for your help.