0

Hopefuly things are going fine with ya'll. I've created a [Custom Asset] asset_code="FAZ"(Alphanum_4) by set of Accounts (Source,Issuer,Distributor,Consumer) on Stellar Test-Net. Set [Trustline] from Distributor to Issuer and Consumer to Distributor, generate some (FAZ) by [Payment] some amounts (500000.00) from Issuer to Distributor. Sofar, [Custom Asset] created as expected but,the "Balance" of Issuer remains intact (still holds the same amount before payment)

Furthurmore ...

  1. After a successful [Payment] with some amounts of (FAZ) from Distributor to Consumer, the "Balance" of Consumer increments properly, but Distributor "Balance" stays the same (both on "native" XLM and "credited" FAZ).
  2. When tried to pay back some (FAZ) from Consumer to Distributor ([Trustline] for (FAZ) established from Distributor to Consumer) a "NEW Entry" created for that same Asset in Distributor account and any [Payment] from Consumer will store in this "NEW Entry" instead of adding to existing (FAZ)s in Distributor! and still the "Balance" of Consumer(Paying Account) stays solid, the same (both "native" XLM and "credited" FAZ)!

In a nutshell: [Payments] with a "Custom Asset" increase the "Balance" of "Reciever-Account" but has no effect on "Sender-Account", establishing a [Trustline] with the same [Asset], opens a "New Entry"(like it's a "New Asset") instead of holding the same! Worth noting: Even though all mentioned [Operation]s/[Transactions]s done successfuly on the network(Test-Net), the "native" (XLM) balance of Accounts didn't decrease as expected (for "Fees")?

My Dev. Environment: Win7-32bit, python 3.8.3, https://github.com/StellarCN/py-stellar-base 2.6.1

The Accounts Keys used in above scenario, are as follow:(in case) Both Source Account and Consumer Account are created by "friendbot" of course. Ssource Account Public_Key:GDP4HJRNBGEX5QCMJ7L54HYCIBRXH6IR6VUZ5HWBOLUPMALRKV4N2HHY Secret_Seed:SAM7ZNG4K6GCG5LCAOY4Z4XZD5IJ2EMJCJHA7IYKFNSEMURVK2BGAUVC Issuing Account: Public_Key:GADARWSV74FALR5ILJAXA7ICUDTUK5VLRFK4SLFC2QTI2ZOVBP5VNU64 Secret_Seed:SC4F3B65GDWVJ6R2BIQVHARFOQ7EJ2EAHWEKEJBGI25KTHN75JRR7GNJ Distributor Account: Public_Key:GCRH6K7FYR7QIFS7DR5RV7OWVH2RHFU4Z22O6PDYBZLN3Q5SCDWATKK5 Secret_Seed:SCSRPIEMKFAMXGOLURUEOWTSFZHTV6QCMIFH76CUUTUBUSVXQMRR2UUU Consumer Account: Public_Key:GAEINH2YYS57QGSR2M4VGU6XSILY3NQLFKVIQN7AJN545HK2UC6NV4SP Secret_Seed:SDQEEKBKL7MFILH2CQUBAJZU5AM5CX6RCHVYHITQKH43VVY7CIUYH3MP

Any Idea? Stay Safe

1 Answer 1

1

It sounds like your mistake is here:

[Trustline] from Distributor to Issuer and Consumer to Distributor

The flow should be as follows:

  1. [Trustline] from Distributor to Issuer and Consumer to Issuer
  2. Send asset from Issuer > Distributor > Consumer

The Issuer address does not maintain a balance of assets it issues, so you will see no changes in that account's balance. That is why a distributor account is necessary if you need to see a balance.

In your current setup you are creating an asset twice.

2
  • I gave a presentation on how assets work not too long ago that you may find useful: youtu.be/39Bk4BWkj2Y?t=606
    – kolten
    Jul 6, 2020 at 14:23
  • Great answer, the related question has been resolved here.
    – overcat
    Jul 8, 2020 at 3:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.