Skip to content

Add fees for unshielding from the MASP #4876

@batconjurer

Description

@batconjurer

We would like to charge a fee from users when they unshield from the MASP. The fee should be proportional to the amount unshielded and the proportion should depend on which token is being unshielded. See this forum post.

There is a current challenge to implementing this: It is possible for a tx to pay gas fees by unshielding to a temporary address which then pays the fees. Whether or not this will happen is not transparent from the tx itself. In the protocol, we execute the first transfer in the tx and see if it paid for gas or not.

We would prefer not to take unshielding fees from an unshielding transfer paying gas. For one, it is difficult to know at tx creation time how much gas is going to paid and thus to calculate the unshielding fees. However, as the above paragraph details, it is difficult to determine if gas will be paid via unshielding at all. A carefully made decision must be made on this point.

Other considerations of lesser importance include the flexibility of specifying the fee payer. Can be an arbitrary address? Can it also be paid by unshielding to a burner account to help preserve privacy?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions