Trustline Onboarder - third-party trustline onboarding for classic assets #2008
Replies: 3 comments 6 replies
|
Reading sep_trustlineonboarder.md@6833212:
I'm reading the SEP and trying in my mind to separate what the requirements are of an implementer who wants to make a new implementation or tools/wallets that plan to interop with implementations, are the points of interop just the two functions above (onboard, authorize_trustline) and their respective status and error types? Are the other Authorizer functions and the admin-sep dependence just implementation details of the reference implementation or is every implementation dependent on those too? |
|
some thoughts on the UX of this - I think you could still keep the 2 steps of getting the trustline + getting authorized separate and achieve a better UX with a similar flow. I'm wondering if this is mostly already solve-able through application layer improvements. It seems like the common experience today is something like - don't applications already have what they need to do this better by polling authorized status on the asset? Applications could go much further by providing this state, and providing context on what it is, then notifying users when they are authorized. |
|
Reading sep_trustlineonboarder.md@6833212: The errors are defined as names without corresponding integer values:
Are the errors required for interop? Is the intent for contracts calling the contract to branch and change behaviour based on the error returned? Errors exist as numbers when encoded, so without specifying them implementations or integrations won't know what values to use. |
Uh oh!
There was an error while loading. Please reload this page.
Receiving a classic Stellar asset requires the holder to create a trustline, and an AUTH_REQUIRED asset stays unusable until the issuer authorizes it. In a CEX withdrawal this lands as a context-free "create a trustline" prompt mid-withdrawal.
The invariant we build on rather than fight: creating a trustline always requires the owner's own signature. No third party can create one for a non-custodial user. So onboarding someone into an asset can't mean signing for them. It means the third party does everything else: pays the reserve via CAP-33 sponsorship, authorizes on the issuer's behalf through a permissionless on-chain contract, and orchestrates the transaction. The user is reduced to at most one in-flow signature, and for an existing unauthorized trustline, zero.
The draft defines:
A Trustline Authorizer contract installed as the asset's SAC admin (building on admin-sep, SDF discussion #1670), exposing a permissionless authorize_trustline gated by a denylist or allowlist policy.
A one-signature onboard(sac, holder) router over CAP-73 trust() that discovers the asset's capability on-chain via CAP-68, so clients don't branch on asset class.
A [TRUSTLINE_ONBOARDER] stellar.toml block, an integrator interface, and an audit event per state transition.
It serves open assets (USDC, EURC) and regulated AUTH_REQUIRED assets (EURCV) under one interface, assuming the regulated model for all assets was our biggest early mistake.
Status: an authorizer of this shape has been live on mainnet as EURCV's SAC admin. The asset-agnostic version, the router, an SDK, an issuer CLI and an HTTP relayer run on testnet, with transaction hashes recorded in the draft. Apache-2.0, funded by SCF #44.
Draft: https://github.com/theahaco/authline/tree/main/sep
Feedback welcome.
All reactions