return (curves.curvesTokenSupply(token) - curves.curvesTokenBalance(token, address(curves))) * PRECISION;
it("Selling can be bricked if all other tokens are in ERC20 contract", async () => {
    await testContract.setMaxFeePercent(parseEther('.4'));
    await testContract.setProtocolFeePercent(parseEther('.1'), owner.address);
    await testContract.setExternalFeePercent(parseEther('.1'), parseEther('.1'), parseEther('.1'));

    await testContract.buyCurvesToken(owner.address, 1);
    await testContract.connect(owner).withdraw(owner.address, 1);

    await testContract.connect(friend).buyCurvesToken(owner.address, 1, { value: parseEther("1")});
    await testContract.connect(friend2).buyCurvesToken(owner.address, 5, { value: parseEther("1")});
    await testContract.connect(friend2).withdraw(owner.address, 5);

    await expect(testContract.connect(friend).sellCurvesToken(owner.address, 1)).to.be.revertedWith("NoTokenHolders()");
});
if (curvesTokenSupply[curvesTokenSubject] == curvesTokenBalance[curvesTokenSubject][address(this)]) {
    (bool success, ) = feesEconomics.protocolFeeDestination.call{value: holderFee}("");
    if (!success) revert CannotSendFunds();
} else {
    feeRedistributor.onBalanceChange(curvesTokenSubject, msg.sender);
    feeRedistributor.addFees{value: holderFee}(curvesTokenSubject);
}
