Fee display component
We need a component to display the price structure with fees. It will be used in the Use tab. It is needed in the following places
Download : for the price
Compute: for the asset price , for each algorithm price, for the whole job price .
Preliminary structure:
publisherMarketOrderFee: string
publisherMarketPoolSwapFee: string
publisherMarketFreSwapFee: string
consumeMarketOrderFee: string
consumeMarketPoolSwapFee: string
consumeMarketFreSwapFee: string
// fee set by the provider
providerFee: string
// fee in percent for swaps involving OPC approved tokens
opcSwapOceanFee : string
// fee in percent for swaps involving non OPC approved tokens
opcSwapNonOceanFee: string
// fee in percent taken by OPC from consumeFees
opcConsumeFee
// fee in percent taken by OPC from providerFees
opcProviderFee
The opc fees are fetched from the subgraph based on chain
Basically this needs to look something like
Total price : x BaseToken
- fee1 : y BaseToken
- fee2: z BaseToken
To avoid confusion between Fre and Free I propose changing
publisherMarketFreSwapFee: string
consumeMarketFreSwapFee: string
To:
publisherMarketFixedSwapFee: string
consumeMarketFixedSwapFee: string
@mihaisc I noticed the list doesn't include provider fees? I thought we were also introducing these?
This was just a random example at that time, the component shouldn't care , it just needs to display something like name : value for fees that are not 0.
ok cool
This is an example of hopefully the final version of the structure that we pass to this component https://github.com/oceanprotocol/market/blob/7336224f387ca36e3c62b83a5f82e7505691f706/src/%40types/Price.d.ts#L16 . For now it assumes all fees are in ocean.
Not that relevant now. Will open another issue in the future if needed