Let’s say one would build an awesome offer aggregator site with many great features.
Because of that, the site wants to add a fee to each offer that is displayed on its site, so that a taker pays an additional share of the offer value as a fee to the platform.
I think it should be possible, but it looks like it’s prevented by the assumption in the offer file that there is only one notarized_payment per coin type.
Is that use case something you explicitly wanted to prevent when building offers?
You can request multiple payments of the same coin type. That dummy spend really just acts as an encoding of data that could also encoded like this:
"asset_type": CAT w/ asset ID 0x...
The catch is that an offer aggregator can’t add this payment to the offer file once it’s created. The offer is only secured via announcements from the coins being offered and you can’t force more announcements into that coin after its spend has already been signed.
So you’d have to request that the offer maker include the payment to the aggregator when they create the offer. Unfortunately the chia wallet software is pretty simplistic in how it deals with offers atm so there’s not a way to request multiple payments of the same asset type using the current wallet, even though it’s theoretically possible.
Is it not possible to create a new offer which contains the fee (and offers nothing) and then aggregate both offers into a single offer file?
I’ve tried this and it seems to work.