Increase Trust Operation #285
Labels
CAP
Represents an issue that requires a CAP.
enhancement
CAP that adds or changes functionality as opposed to a fix.
needs draft
This an issue that has no corresponding draft, and as such has not entered the CAP/SEP process.
One of the issues with trust lines is that when they need to be increased, it requires an out-of-band read of the current value.
This issues proposes a new operation which combines a read with a write (similar semantics to fetch_add).
What the new operation should do is to have an increment and a maximum value for the trustline. e.g.:
The increment saturates up to the limit. Therefore, if the account exists, increment should never fail -- it can only succeed less.
If limit < the trust line's limit, nothing happens.
This makes it easier to have multiple pending payments from different parties without ever giving a user more trustline capacity than they need to have to hold the assets sent to them.
This is useful because otherwise every trustline increase before a payment sent has an inherent race condition, and every transaction with a increase and a send must happen serially otherwise. It also makes it impossible to have long standing smart contracts which pay to trustlines.
The trustline itself may also require Authorization, in which case this operation should either automatically require an Allow Trust or should be paired with an allow trust.
Opening for discussion now.
The text was updated successfully, but these errors were encountered: