Curved Orders are a smart order type for CoW protocol. They allow the submitter of an order to define a pricing curve which potential trades are validated against. Put simply, larger volume trades are sold at a higher price, while smaller volume orders are sold closer to spot price. LPs only need to submit one order, and their order can be gradually filled with configurable dynamic pricing.
- Install Foundry
- run
npm install
- run tests:
forge test
- update
src/scripts/placeOrder.s.sol
with order configuration, and then - run
forge script placeOrder --fork-url https://eth-mainnet.alchemyapi.io/v2/xxxxxxxxx
! The order factory contract is deployed on gorli & mainnet, but should probably not be used for production purposes
A signed curved order can then be shared with solvers on CoW for execution.