    function _checkSender(address _from) internal view {
        require(_from == msg.sender, "MagnetarV2: operator not approved");
    }
            else if (_action.id == MARKET_BUY_COLLATERAL) {
                HelperBuyCollateral memory data = abi.decode(
                    _action.call[4:],
                    (HelperBuyCollateral)
                );

                IMarket(data.market).buyCollateral(
                    data.from,
                    data.borrowAmount,
                    data.supplyAmount,
                    data.minAmountOut,
                    address(data.swapper),
                    data.dexData
                );
            }
    function _allowedBorrow(address from, uint share) internal {
        if (from != msg.sender) {
            if (allowanceBorrow[from][msg.sender] < share) {
                revert NotApproved(from, msg.sender);
            }
            allowanceBorrow[from][msg.sender] -= share;
        }
    }
        // deposit to YieldBox
        if (depositAmount > 0) {
            _extractTokens(
                extractFromSender ? msg.sender : user,
                assetAddress,
                depositAmount
            );
            IERC20(assetAddress).approve(address(yieldBox), depositAmount);
            yieldBox.depositAsset(
                assetId,
                address(this),
                address(this),
                depositAmount,
                0
            );
        }
