Skip to content

Avoid 0 rewards conversions in MASP transactions #4789

@grarco

Description

@grarco

When building MASP txs we convert the assets of the user to their latest available counterpart. There's a chance though, that the applied conversion doesn't bring in any rewards but just converts the asset to the latest masp epoch (this could happen if no rewards had been produced for that specific asset).

In this case, the builder will include the conversion but this is technically useless, as it brings nothing to the involved amounts and only takes up resources, namely space in the transaction (which might also turn into possible issues with the hardware wallet) and gas to verify these conversions (both to verify their anchors and for the convert circuit).

We could try to modify apply_conversion to remove such conversion from Conversions if that's the case

cc: @mateuszjasiuk

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions