Comments (9)
Can you expand on scenarios - properties on Offers themselves may help and be more generic
from stellar-protocol.
I have $10 and I want to send all of it to you but you only want EUR.
Actually maybe this should just be accomplished in 2 steps. a normal order to convert the USD -> EUR and then a payment. A little gross since you have to also add/remove the trust line to EUR.
from stellar-protocol.
@jedmccaleb I don't think that 2 step method works though (because an offer is a limit order and path payment is a market order).
To me, a path payment is mechanism for conversion between assets at market rate, a very useful function. While there are obviously scenarios where you want to specify the destination amount (like paying a merchant in their preferred asset), there are a host of scenarios where one would want to specify the source amount.
I think we should think about hard forking (or whatever the term is in stellar) to modify the protocol.
from stellar-protocol.
a limit order is a market order if you set the limit low enough. (path payment is also a limit order anyway since you put in the max to send)
The real issue is that the 2 step method isn't atomic. But this is probably solvable by allowing a payment that sends as much of an asset as it can. So then in one tx you would have 4 operations:
- add trust for EUR
- sell USD for EUR
- send as much EUR as you can to B
- remove trust for EUR
from stellar-protocol.
@jedmccaleb
Yeah, I guess you are right about the real issue (not having the two operations be atomic).
Couple of points with your proposed solution:
-
Why solve it that way? It seems like quite a roundabout way of solving the issue (as opposed to simply allowing a path payment that specifies a source amount)?
-
Also, I think that kind of a series of operations would run into issues if the user already has a balance of EUR (then that balance would get sent as well). Additionally, it seems to me that there is no way to specify a maximum amount on the payment operation since you don't know what cumulative rate the trade will execute at ahead of time.
from stellar-protocol.
Yeah I'm open to a protocol change to add this I just want to make sure we need to first
from stellar-protocol.
@jedmccaleb Wouldn't adding a maximum amount for a payment require a protocol change as well?
from stellar-protocol.
reason I was asking about offers and clarification on scenarios in the first place was that I was thinking we could create offers that cannot be taken partially for example which seems like a very useful building block.
from stellar-protocol.
Addressed by CAP-24
from stellar-protocol.
Related Issues (20)
- CAP-0054: Add Renounce Ownership Function to Admin Interface HOT 5
- CAP-0052 - provide a way to retrieve the return value of an on-chain contract call HOT 3
- SEP-9: add proof_of_liveness field HOT 1
- Transfer SEPs: add optional `refund_account` attribute to transaction initiation requests HOT 2
- SEPs (6, 12, 24, 31): Update callback header from `X-Stellar-Signature` to `Signature` HOT 4
- SEP-9: define a generalized account identifier format HOT 4
- SEP-9: add `bank_account_type` field HOT 2
- SEP-6: /deposit and /withdraw IDs should map to list of transactions rather than a single transaction HOT 22
- SEP-24: make `account` for deposit request optional to match withdraw request
- Add SEP for Soroban token interface HOT 1
- Nice
- SEP-7: thoughts on using "web+stellar://" instead of "web+stellar:"? HOT 1
- SEP-6: standardize structured off-chain deposit instructions for users HOT 1
- SEP-6: Providing deposit instructions asynchronously
- security HOT 1
- SEP-24: Layered fee structure HOT 1
- SEP-24: Configure fees by payment method HOT 1
- SEP-9: support `organization.referrer`
- Add deviation parameter instead of pure uniform periods HOT 8
- Support for `memo` field in SEP-9 Financial Account Fields
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stellar-protocol.