In the smart contract, the fee is taken from the order's sell token. As Ethereum's gas price and the relative price between the sell token and buy token change, so does the minimum fee that makes it viable for a solver to include an order. Because of changing conditions, CoW Protocol is able to execute orders in a full or partial style, meaning that if the order is completely filled, the fee taken by the protocol is 100%, while if the order is partially executed, a prorated amount of the total fee is taken.