-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property Based Orders #43
Comments
This ZEIP is needed by NFT open finance. By allowing the maker to supply a predicate, we are making subsets of NFTs fungible(i.e. buy any axie with plant attribute or any 10x10 plot on Maldives) which allows for traditional order books on these specific subsets creating price support due to volume in limit orders. This is a needed step to create NFT markets that can be used in defi protocols such as Maker CDPs, Dharma Loans, etc. Match Orders makes sense for this use case. In addition to the following use cases: We would also be able to sign orders such as: |
Been thinking about this recently from the perspective of V3. I think we could pull this off with a small change to The idea is to exploit the fact that This actually sort of works right now, but because the order hash will be different for every fill, There is some extra data you would need to encode in the order signature for safety and maybe flexibility, but I don't think it's too bad. |
I've been thinking about this in light of #74. What is being proposed here are ways to make it work with minimal changes to the existing exchange, mostly using Also consider that this not only applies to We also need to think carefuly about how it changes the meaning of Anyway, Currently the maker fully specifies the allowed assets for the trade on signing. What we want here is that instead the maker signs a predicate that defines what allowable assets are. The maker part of this is easy, we can add a new asset id that specifies the predicate and use that as the asset string. Where we currently have an asset strings like So far so good, the problems start with the So it seems like this can not be solved without compromise, workaround or major change. :/ One useful compromise might be to only support cases where the the asset proxy knows by itself what the correct asset id is. Either because taker told the proxy in advance, or because it can be computed during the fill. I'd need to think further about what this allows. |
Superseded by #75 |
Summary
Allow the trading of assets based on their properties, rather than their exact identifier.
Motivation
Creating liquidity for NFT's is a challenge as the AssetProxy requires the identifier in its encoding. Traders currently create orders for specific NFTs,
1 DAI for Axie #123
. This ZEIP makes it possible to create general standing orders, such as1 DAI for an Axie
and100 Dai for 100 Axies
. It is also possible to createOR
orders such as1 DAI for an Axie or Etheremon
.Property Based Orders allow the trader to specify the exact properties of the asset they require, such assets may not even exist yet. Having a number of these orders in an order allows a base line price discovery mechanism.
Specification
Implementation
A simple way to achieve the challenge of taker supplied data is by using the
matchOrders
function in Exchange. This receives 2 orders as input, allowing the taker to supply parameters in the second order.Challenges
It is not currently possible for a taker to supply additional data using fillOrder and the batch variants. The taker does supply the signature, though adding additional encoding here is not ideal.
The order may be for a number of assets, i.e
100 DAI for 100 Axies
, the design should allow the taker to supply an arbitrary number of assets (via the MultiAssetProxy). This will need to be enforced by the maker predicate. As such it will need to handle MultiAssetProxy encoded data.The text was updated successfully, but these errors were encountered: