Hot answers tagged

4

Your answer is correct, except that the thing you say is impossible is actually easy. A Stellar transaction can contain up to 100 operations, and each operation can have its own source account. So it's trivial to form a transaction in which A pays some asset to B and B pays some asset to A. Because the transaction is atomic, either both will execute or ...


4

Taking a look at this with the assumption that the attacker controls some validators (as it makes it easier to exploit). So the way the network deals with transaction ordering is by making it as hard as it can to make it look random: the apply order sorts by account id xored with the hash of the transaction set the nomination protocol that gathers ...


4

I had the same problem with offer id after the ManageOffer operation, and I came to the same solution. If you don't have a lot of orders and don't mind to make an extra request, you can also pull account offers endpoint after submitting the ManageOffer to get all active offers and update you client-side offers state. Since OfferCreated/OfferRemoved effects ...


3

If you have both asset (USD and EUR) on Stellar, there's no problem at all. const {Server, Network, Keypair, TransactionBuilder, Operation, Asset} = require('stellar-sdk') Network.useTestNetwork() const server = new Server('https://horizon-testnet.stellar.org'), aliceAddress = 'GDE5SEXCPDZ4CSQSYUJNBBC27OXD2ORQLPU2MGI2QRVD3VMFBDXAZVLK', bobAddress ...


3

The behavior you encountered existed in protocol versions 1 and 2. Protocol version 10, the most recently released version, incorporates CAP-0003 and CAP-0004 which make changes to the functionality of the offer book. For example the situation you described in your question results in a crossed book, but CAP-0004 (https://github.com/stellar/stellar-protocol/...


2

I asked the same question earlier. Jed mentioned that trades are applied in random (actually, pseudo-random) order, and transaction fees do not affect the order in which transactions are applied within the ledger. So larger fees do not prioritize trading operations, preventing Low Latency HFT manipulations. EDIT (Detailed explanation of the tx ...


1

Each level has the AMOUNT parameter. If you want each level to have increasing sizes (for example) then you can adjust the appropriate AMOUNT parameter for each level. There is also the AMOUNT_OF_A_BASE param which is multiplied by each of these AMOUNT params to arrive at the final base value amount at each level. The purpose of the AMOUNT_OF_A_BASE is to ...


1

Effect id consists of two parts: {operation_id}-{effect_application_order}. Operation ID is an encoded unique identifier of the operation, which contains: Ledger sequence Transaction application order within ledger tx set Operation application order within tx The second part is a particular effect order (each operation yields zero or more effects). The ...


1

StellarPort allows this. Left click the asset and you can either get Info, or select. Select allows you to search for the asset you want. So if you already know the trading pair is there, you can find it.


1

As far as I know, there is no other way at the moment. If you would do 1 operation with base fee per second (which is most probably huge overkill) for one day it would cost you less than 1XLM. Even at 1 ops/sec it shouldn't be serious problem to the network because it's able to run about 1000 ops/sec. Also, fees are not going to be burn, but redistributed (...


1

According to the Stellar developers' guide, a trade is effected when a second offer matching the first is posted.


1

I'm operating anchor apay.io and half a year ago I was looking at Bifrost if it can be used for my anchor. Potentially yes, but: it requires some code changes you would still need to implement withdrawals, because Bifrost only covers deposits you still need to implement API according to standard for anchors https://github.com/stellar/stellar-protocol/blob/...


1

Whether counter_asset_type is required or not, you should not be seeing an internal server error. As the error document states, this is the server's fault, not yours. I took a quick look through the issues list and couldn't see this listed (though I'm not ruling out the possibility that I've overlooked it), so I raised it.


Only top voted, non community-wiki answers of a minimum length are eligible