    function listVesting(
        address _vestingPlan,
        uint256 _amount,
        uint256 _price,
        uint256 _discountPct,
        ListingType _listingType,
        DiscountType _discountType,
        uint256 _maxWhitelist,
        address _currency,
        uint256 _minPurchaseAmt,
        bool _isPrivate
    ) external isFreeze {
        require(
            _listingType != ListingType.SINGLE || (_minPurchaseAmt > 0 && _minPurchaseAmt <= _amount),
            "SS_Marketplace: Minimum Purchase Amount cannot be more than listing amount"
        );
        require(_price > 0, "SS_Marketplace: Price must be greater than 0");
        require(
            (_discountType != DiscountType.NO && _discountPct > 0) || (_discountType == DiscountType.NO),
            "SS_Marketplace: Invalid discount amount"
        );
        require(_amount > 0, "SS_Marketplace: Invalid listing amount"); // 3.10. Inefficient _listingType check
        require(isTokenSupport[_currency], "SS_Marketplace: Payment token is not supported");


        require(
            doesFunctionExist(
                address(
                    IVestingManager(IMarketplaceSetting(marketplaceSetting).vestingManager()).getVestingTokenAddress(
                        _vestingPlan
                    )
                ),
                "decimals()"
            ),
            "SS_Marketplace: No decimals function"
        ); // 3.1. Rounding issue leads to total drain of vesting entries


        uint256 baseAmount = (_amount * _price) /
            uint256(
                10 **
                    (
                        IERC20Extended(
                            address(
                                IVestingManager(IMarketplaceSetting(marketplaceSetting).vestingManager())
                                    .getVestingTokenAddress(_vestingPlan)
                            )
                        ).decimals()
                    )
            ); // 3.1. Rounding issue leads to total drain of vesting entries
        require(baseAmount > 0, "SS_Marketplace: Cannot list amount it is too little"); // 3.1. Rounding issue leads to total drain of vesting entries


        IVestingManager(IMarketplaceSetting(marketplaceSetting).vestingManager()).listVesting(
            msg.sender,
            _vestingPlan,
            _amount
        );


        uint256 listingId = nextListingId[_vestingPlan]++;
        address whitelistAddress;


        if (_isPrivate) {
            require(_maxWhitelist > 0, "SS_Marketplace: Minimum whitelist user cannot be 0");
            whitelistAddress = SecondSwap_WhitelistDeployer(IMarketplaceSetting(marketplaceSetting).whitelistDeployer())
                .deployWhitelist(_maxWhitelist, msg.sender);
            emit WhitelistCreated(_vestingPlan, listingId, whitelistAddress, msg.sender, _maxWhitelist);
        }


        listings[_vestingPlan][listingId] = Listing({
            seller: msg.sender,
            total: _amount,
            balance: _amount,
            pricePerUnit: _price,
            listingType: _listingType,
            discountType: _discountType,
            discountPct: _discountPct,
            listTime: block.timestamp,
            whitelist: whitelistAddress,
            currency: _currency,
            minPurchaseAmt: _minPurchaseAmt,
            status: Status.LIST,
            vestingPlan: _vestingPlan
        });
        emit Listed(_vestingPlan, listingId);
    }
    function listVesting(address seller, address plan, uint256 amount) external onlyMarketplace {
        require(vestingSettings[plan].sellable, "vesting not sellable");
        require(SecondSwap_Vesting(plan).available(seller) >= amount, "SS_VestingManager: insufficient availablility");


        Allocation storage userAllocation = allocations[seller][plan];


        uint256 sellLimit = userAllocation.bought;
        uint256 currentAlloc = SecondSwap_Vesting(plan).total(seller);


        if (currentAlloc + userAllocation.sold > userAllocation.bought) {
            sellLimit +=
                ((currentAlloc + userAllocation.sold - userAllocation.bought) * vestingSettings[plan].maxSellPercent) /
                BASE;
        }


        userAllocation.sold += amount;


        require(userAllocation.sold <= sellLimit, "SS_VestingManager: cannot list more than max sell percent");
        SecondSwap_Vesting(plan).transferVesting(seller, address(this), amount);
    }
+  require(_discountPct <= 10000, "SS_Marketplace: Invalid discount amount");
