Xahau / xahaud

Codebase for Xahaud - The consensus, RPC & blockchain app for the Xahau network.
https://xahau.network
ISC License
24 stars 11 forks source link

Add tfBurnable logic to accounts for issued currencies #203

Open RichardAH opened 11 months ago

RichardAH commented 11 months ago

Rather than adding a clawback transaction type, if the Issuer has the flag set at the time the trustline was created then the issuer can unilaterally make a "negative payment" to the holder of the currency. A negative payment bypasses strong transactional stakeholder status on the destination, only allowing their hooks to be weakly executed so a clawback can't be blocked. In addition, the Issuer is a strong transactional stakeholder on all dealings.

WietseWind commented 11 months ago

Sending negative payments up to 0 balance is very clean.

A negative payment bypasses strong transactional stakeholder status on the destination, only allowing their hooks to be weakly executed so a clawback can't be blocked.

Perfect.

Something else to consider would be the use case of a mandatory hook to interact with a specific issued asset (IOU). Besides clawing back, there could be other regulatory/compliance requirements, e.g. spending limits, destination limits.

A hook on the holder's account could guard these requirements. Something to consider would be to consider the TL frozen if the Hook mandatory matching issuer Hook on the holder's account would be removed.

» Issuer » Holder Hook Hash » Holder can only use the TL if that Hook Hash is present.

Then the issuer's hook could implement things like upgrade path, limitations, etc. in their Hook that would be installed on the client side.

If the issuer releases a new Hook, they would change their account with a new Issuer Hook Hash, which means all clients don't have a matching Hook installed anymore. At this points clients (issuer's / third party apps, ...) could show an upgrade is required » HookSet » good to go.

Silkjaer commented 1 month ago

A strong TSH for the issuer could e.g. also enforce what pairs a currency can be traded in.