CIP21 - Dispensers

Thanks for writing up your thoughts on these great features… All of them sound good to me. Some additional thoughts below.

  • Delayed closing
    Rather than closing the dispenser immediately, all dispenser closing are delayed by 5-10 blocks to prevent a dispenser operator from closing a dispenser with a high fee after buyer sends funds.

I support this idea, but I propose a tweak to this, which is that we only delay closing the dispenser if there is a pending dispense. This would solve the problem of dispenser operators closing dispensers with a pending dispense, but also allow dispenser operators to close their dispenser immediately if there is no pending txs (BTC incoming) to the dispenser address. Thoughts?

I too have been thinking about various features that we could add to the dispensers to make them more usable in various cases. Here are some of my thoughts on additional dispenser upgrades…

  • Use/Reuse any bitcoin address as a dispenser
    Currently Counterparty only allows opening of new dispensers on a different address if that address is a fresh/empty addresses with no transaction history.

    We could update Counterparty to allow opening up of a dispenser on any address, once that address ownership has been verified via a signed message. Perhaps we standardize the message that is to be signed to be the current date in YYYY-MM-DD format like ‘2023-01-23’, then update Counterparty API with a open_address_signature field, which users can provide the message signature. The API would simply verify if the message signature was valid (proving ownership of the open_address), and then would allow opening of the dispenser on the open_address.

  • Allow dispensers to sell ‘packs’ of cards
    Currently Counterparty dispensers only sell one card at a time, and to sell multiple cards at the same time, you need to setup multiple dispensers on the same address.

    We could update counterparty to allow users to specify a list of what assets/tokens/quantity get dispensed when a dispense is triggered. We could have the wallet allow users to provide a simple list of assets to dispense similar to MPMA sends:

    BACON, 1.00000000
    RAREPEPE, 1
    PEPECASH, 1000000.00000000
    XCP, 1.23456789
    

    In the API we would have the following changes :

    • asset field would change to support array of assets [‘BACON’,‘RAREPEPE’,‘PEPEPCASH’,‘XCP’]
    • give_quantity field would change to support array of quantities [100000000,1,100000000000000,123456789]
    • escrow_quantity field would change to support array of quantities [1000000000,10,1000000000000000,1234567890] (10x dispenses)
2 Likes