Double Transaction Signing with SEP-8

45 views
Skip to first unread message

dexter

unread,
Sep 17, 2021, 5:38:48 PM9/17/21
to Stellar Developers
NiceTrade recently integrated with DSTOQ via SEP-8 which went pretty smoothly. There is however a UX hiccup when using wallets like Freighter, Albedo and Ledger that prompt the user to sign each transaction. DSTOQ's approval server modifies the initial transaction (by sandwiching MANAGE_OFFER between ALLOW_TRUST and AUTHORIZED_TO_MAINTAIN_LIABILITIES operations) before signing it, resulting in the user getting prompted a second time to sign the new transaction. SEP-8 works pretty well, but it would be great if there was a way to avoid this extra prompt.

Leigh McCulloch

unread,
Sep 17, 2021, 6:11:45 PM9/17/21
to Stellar Developers
The SEP-8 client can choose to prepare the transaction ahead of time such that the server does not need to revise it. That is documented in the Transaction Composition section: https://stellar.org/protocol/sep-8#transaction-composition

However, SEP-8 doesn't define how a client could determine exactly which alterations were required. SEP-8 shows two typical configurations, one where the liabilities are maintained and one where the accounts are completely deauthorized afterwards.

Maybe SEP-8 needs an /info endpoint that would tell a client the strategy the server uses. Clients that don't recognize a strategy can simply send the transaction and handle the revised response. Clients that choose to optimize the UX can implement the strategies on their side to avoid the revised response.

All of this assumes the strategy servers use is consistent for all customers and all transactions for each customer, which I'm not sure, but may not be the case.
Reply all
Reply to author
Forward
0 new messages