Christian Rudder <
crudderp...@gmail.com> writes:
> My understanding was that the UX is under debate. "In the protocol group,
> we discussed whether it was better to consent to holding an asset before a
> payment or after, and the group seemed to feel
> that it was better to consent afterwards." I can't tell to what extent this
> idea of consent (before or after) is driving the drawbacks in David's
> proposal. Or to put it another way: what is the best we can do that treats
> the received asset exactly like any other asset B holds.
Let's separate the debate into three questions:
1. Can you implement the UX that you want on top of the pending
trustline interface?
2. What are the security considerations of a UX? A UX that mimics
traditional payment systems can still present vulnerabilities
because traditional payment systems aren't perfect and because
there are challenges unique to the blockchain setting.
3. What are are the requirements to get this into stellar-core?
I believe the answer to #1 is almost. There is no reason that a wallet
can't show both pending and regular trustlines side by side, and just
transparently accept a trustline the first time you try to use its
balance. The main issue here is the limit of 20 pending trustlines,
which is not fundamental, though it's there for a reason.
As for #2, the biggest issue is that Stellar is trivially vulnerable to
bogus assets. So the fact that non-blockchain users are used to having
payments just show up in their accounts is all the more reason to add an
additional verification step through which wallets can ensure their
users understand that this is a new, possibly bogus asset. That doesn't
prevent wallets from having a "never show me this message again"
checkbox or whitelisting well-known assets. But there's a good chance
that by default, wallets should warn users that arbitrary assets might
not be worth what they purport to be worth, as well as providing account
views that separate "real" balances from the spam.
As for #3, here are the things that I think are probably prerequisites
for getting into stellar-core:
* The new mechanism must not be able to make ACCOUNT_MERGE operations
unexpectedly fail.
* The new mechanism must not allow the creation of transactions that
touch the database arbitrarily many times (e.g., delete 1,000,000
trustlines simultaneously).
* Any change should not increase the difficulties associated with
increasing baseReserve (e.g., allow an attacker to disable accounts
whose owners deposited enough XLM for the new baseReserve).
* Since question #2 is obviously debatable, any changes to
stellar-core should be compatible with our most conservative idea of
what constitutes a secure UX. That doesn't mean all wallets need to
support the secure UX, but wallets need to be able to do so without
further changes to stellar-core.
* While less of a strict requirement, backwards compatibility with
things like trustlines would certainly help get the change in sooner
rather than later.
So if I were to sketch out the design point that meets the above
criteria and that I think most satisfies what you want, it would be
sponsored trustlines with the following tweaks:
A. Accounts can have an unlimited number of pending trustlines.
B. If an account is merged, the pending trustlines remain as permanent
crud in the ledger and their XLM gets burned (or maybe the asset
issuer can eventually garbage collect the trustline to claim the XLM
reserve).
C. Pending trustlines can receive ordinary payments and path payments
as well as special SponsorTrustLineOp payments.
The arguments for the original version of sponsored trustlines over this
tweaked one are first that A requires B (to avoid touching the database
an arbitrary number of times during ACCOUNT_MERGE) and B is kind of
ugly.
More importantly, C means that you can send a normal payment and have
the assets get burned, because the trustline was only pending. I might
look at my account and say "oh, I have only 0.00000001 of this asset,
let me just abandon it and delete the trustline or merge my account,"
but then my transaction doing so crosses with a very large payment whose
assets then get burned. SponsorTrustLineOp can get burned, but you know
that when you specifically select that operation instead of a payment.
So personally I'm opposed but probably persuadable on A+B, particularly
if Jeremy can convince me that channels need pending trustlines (though
since each stage of a channel is signed by all parties, I don't
understand why channels wouldn't always use normal trustlines). I'm a
lot more opposed to C, which seems like a footgun, but if C turns out to
be the majority opinion, then I'll just be overruled.
David