Giter Site home page Giter Site logo

Comments (6)

fleupold avatar fleupold commented on August 11, 2024 2

call the function including the right settlement price without involving the solver.

What exactly does this part mean?

You mean that SC orders have a way to "guaranteed" receive the same price as the EOA signed orders, right? I was confused since these prices also rely on the solvers. However the attack would be that a solver settles signed orders with price p1 and smart contract orders with p2.

from gp-v2-contracts.

josojo avatar josojo commented on August 11, 2024 1

My fear is the attack (as I understand from @fleupold) that there is nothing preventing a solver from specifying a different price for this kind of order (by having the same token with two separate prices in the settlement).

Yes, nothing is preventing them, besides the dao rules. And in order to make the dao-rules easily enforceable, we need to know which smart contract orders are allowed to be called with arbitrary call-data and which ones not. Especially for this distinguishment, I think it is nice to have this interface defined.

But If there is another easy way to distinguish these two types of smart contract orders, I am happy to not implement this feature.

from gp-v2-contracts.

josojo avatar josojo commented on August 11, 2024

If we would not implement an "official interface for smart contract orders dealing with the current clearing price", how would we distinguish a smart contract order that wants to trade "all the time" and another one trading only at the current clearing price?

I think that the additional protection for smart contract orders is not significant, as it could also be enforced by the dao. Though, if we end up not implementing it, then we need another way to mark these orders.

The use-case that I could heavily benefit from the features is CMMs designed to pocket surpluses.

from gp-v2-contracts.

nlordell avatar nlordell commented on August 11, 2024

The use-case that I could heavily benefit from the features is CMMs designed to pocket surpluses.

My fear is the attack (as I understand from @fleupold) that there is nothing preventing a solver from specifying a different price for this kind of order (by having the same token with two separate prices in the settlement). In that sense, it doesn't really offer any additional protection as the solver specifying the price as part of the encoded calldata.

from gp-v2-contracts.

nlordell avatar nlordell commented on August 11, 2024

I think, another approach would be to have another kind of interaction that is called 3 times with the same data, pre-,mid-,post- settlement. This allows things like the CMM use case to provide funds upfront and then revert if it did not receive enough funds at the end of the settlement.

from gp-v2-contracts.

nlordell avatar nlordell commented on August 11, 2024

Closing for now based on discussion. Additionally, SC orders can be currently implemented using something like EIP-1271 where a pre-interaction registers an order with a limit price.

from gp-v2-contracts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.