Anchors: SEP 31 Clarifications

60 views
Skip to first unread message

Severiyos Aydin

unread,
Mar 9, 2021, 3:13:38 PMMar 9
to Stellar Developers
Hello, we are planning to setup an anchor model based on SEP-31.

If I were to set up a two anchor system where one Anchor is the issuing anchor(IA) and the second is a receiving anchor (RA), what is required of the user that wish to send the IA custom tokens to a receiving user via the RA? I have read the docs and they state it is possible (remittance model) but there is nothing about what is required of the users accounts.

Do they need funded wallets or just an account? It is my understanding the Anchors can hold the users balance. So they shouldn't need wallets? If they need wallets, how many lumens are required? For example, if only a trust line to the IA is needed then in theory the users wallet should only need at most 2XLM to cover the minimum balance(1XLM) + trust line(0.50XLM) + any fees(0.00001XLM)? But would they also need an additional .50XLM per transaction?

I am assuming that a receivers wallets, if needed, would also required the same "base" balance.

Any support would be appreciated. Many thanks in advance. 

Severiyos

Eric Holland

unread,
Mar 9, 2021, 5:21:02 PMMar 9
to Stellar Developers

I am also curious about this.
I'm implementing a service that allows users to send assets to other users using SEP31, seems rather cumbersome if they need 1-2 XLM just to have an account setup. Another thing to consider, the price of XLM fluctuates, if it ever gets above $1, or even $10, this would be an excessive price to create an account. 

Just my thoughts, I'm new to the space so I'm very interested in the reply. 

Jake Urban

unread,
Mar 10, 2021, 1:21:13 PMMar 10
to Stellar Developers
Hello Severiyos,

What asset will your receiving user receive? Is it the same custom token sent by the sending user? If thats the case, a non-anchor application can facilitate the payment between the two Stellar accounts using the payment operation. If a different asset is received, a path payment operation can be used, but there must be a liquid market between the two assets on the DEX to enable that. 2XLM for each account would be sufficient, but there's no reason for an additional 0.5XLM per-transaction unless you intend to charge that as a service fee.

If both the sending and receiving users are using the application, then it is even simpler because you can hold the funds for both users in a single Stellar account and update the balances of each user in the application's database. If only one user is using the application, then one additional Stellar account is required for the other user, or you could onboard them into your application.

Regardless, anchors are only needed to trade on-chain assets for off-chain assets and vice-versa. In SEP-31, two anchors are necessary because funds originate from the senders off-chain account, are traded for on-chain tokens with the sending anchor, sent to the receiving anchor, and traded again for off-chain funds and sent to the receiving user. It sounds like your use case doesn't align with this protocol. Hopefully this answered your questions.

Jake Urban

unread,
Mar 10, 2021, 7:58:57 PMMar 10
to AIDONIC AG, Stellar Developers, Ryan Carville
Take a look at the documentation on Minimum Balances, 0.5XLM in base reserve is required for every "entry", where entries are trustlines, signers, offers, or data entries. Payments between two Stellar account accounts do not require an additional 0.5XLM in the receiver's account.

On Wed, Mar 10, 2021 at 3:08 PM AIDONIC AG <in...@aidonic.org> wrote:
Hi Jake,

We currently have the recommended asset issuer/distributor system in place but have consistently run into lumen base reserve issues on the user wallets that interacted with this asset.  With an initial funding of 2XLM, a single wallet(A) can be created and create 1 trust line to the asset (plus .50XLM for any stellar fees) and then that asset is distributed.  Then another wallet(B) creates a trust line to the same asset and receives a payment from the wallet A.  Wallet B is required to increase its base reserve by .50XLM to complete the transaction.
 
 From our research, communications with other stellar experts and confirmation in the documentation, every transaction between two wallets requires an additional 0.50XLM base reserve in the receivers wallet. Not a fee from us or Stellar. A deposit on account for the new transaction.  We came to the conclusion this must be why we couldn't preform any new transactions for a wallet.
 
 So if one wallet transacts with multiple wallets (even with a trust line to the same asset), the receiver wallet has to increase 0.50XLM*numOfTrans.  If that's 1000's of transactions that's a lot. And if that wallet also needs to connect to 100's of other assets we go into a massive growth in base reserves.
 
 So we have been searching for a way to minimize this and anchors seemed to be the only option. Each user gets an account and trusts the anchor to facilitate its balances and transactions for the anchors asset. Then the anchor transacts on behalf of the accounts to another anchor that holds the accounts of the recipient wallets.
 
 We are humbly looking for a solution to make Stellar work for our platform, but it's proving difficult from a business perfective. So any suggestions on how we can navigate the base reserves would be much appreciated.

Thanks,
Severiyos 




--
You received this message because you are subscribed to the Google Groups "Stellar Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stellar-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stellar-dev/b7fb2cc6-2f6b-408c-8b37-c1466feddae4n%40googlegroups.com.


--
Jake Urban
Software Engineer (Partner Engineering)
Stellar Development Foundation

AIDONIC AG

unread,
Mar 10, 2021, 8:28:12 PMMar 10
to Jake Urban, Stellar Developers, Ryan Carville
Hi Jake,

We currently have the recommended asset issuer/distributor system in place but have consistently run into lumen base reserve issues on the user wallets that interacted with this asset.  With an initial funding of 2XLM, a single wallet(A) can be created and create 1 trust line to the asset (plus .50XLM for any stellar fees) and then that asset is distributed.  Then another wallet(B) creates a trust line to the same asset and receives a payment from the wallet A.  Wallet B is required to increase its base reserve by .50XLM to complete the transaction.
 
 From our research, communications with other stellar experts and confirmation in the documentation, every transaction between two wallets requires an additional 0.50XLM base reserve in the receivers wallet. Not a fee from us or Stellar. A deposit on account for the new transaction.  We came to the conclusion this must be why we couldn't preform any new transactions for a wallet.
 
 So if one wallet transacts with multiple wallets (even with a trust line to the same asset), the receiver wallet has to increase 0.50XLM*numOfTrans.  If that's 1000's of transactions that's a lot. And if that wallet also needs to connect to 100's of other assets we go into a massive growth in base reserves.
 
 So we have been searching for a way to minimize this and anchors seemed to be the only option. Each user gets an account and trusts the anchor to facilitate its balances and transactions for the anchors asset. Then the anchor transacts on behalf of the accounts to another anchor that holds the accounts of the recipient wallets.
 
 We are humbly looking for a solution to make Stellar work for our platform, but it's proving difficult from a business perfective. So any suggestions on how we can navigate the base reserves would be much appreciated.

Thanks,
Severiyos 




'Jake Urban' via Stellar Developers <stell...@googlegroups.com> schrieb am Mi., 10. März 2021, 19:21:
--

AIDONIC AG

unread,
Mar 11, 2021, 3:23:28 PMMar 11
to Jake Urban, Stellar Developers, Ryan Carville

Thank you Jake for the solid information. There was a flaw in our code base that was requiring the extra .50XLM. There was no trust line check before the payment. Would be a nice feature to include in future releases. 

Excited to see how Stellar will support our eco system. 

More info at: www.aidonic.io 



Best,
Severiyos 


Reply all
Reply to author
Forward
0 new messages