Grant Title:
Safe App for Stop-Loss Orders
Author:
@bleu @yvesfracari @ribeirojose @mendesfabio
About You:
bleu collaborates with companies and DAOs as a web3 technology and user experience partner. We’re passionate about bridging the experience gap we see in blockchain and web3.
Our team has developed applications that give more visibility and make it easier to interact with Balancer’s smart contracts.
We’ve worked on a previous grant for CoW, Safe App for Milkman Orders, which enabled us to dip our toes in the protocol. We feel ready to take on the challenge to work with Composable CoW and we’re excited about exploring and innovating in CoW.
Additional Links:
We have already developed several tools for the Balancer protocol, among which a Pool Simulator, a Historical APR dashboard, and a Vault Internal Balances Manager.
With the CoW team we worked on the MilkmApp grant, another safe app that helps DAOs to create special orders on CoW Swap.
Grant Category:
User interface and user experience (UI/UX)
Grant Description:
As described in the RFP, stop-loss orders are conditional orders that are not executed until the strike price is met. To achieve that, the stop-loss contract uses an external price oracle and a strike, defined when the order is created.
We’re proposing to create a Safe app UI to allow for multisig wallets to fully manage stop-loss orders. We will utilize the contracts deployed by CoW, which support only Chainlink oracles by default. Given that restriction, only tokens that have a Chainlink oracle will be supported. In future iterations of this project, we see the opportunity to develop a contract that abstracts away Chainlink oracles to include any oracles, enhancing the app’s versatility.
Grant Goals and Impact:
The main goal of our project is to allow non-technical users access to implement their investment strategies on CoW by allowing them to manage stop-loss orders. Our aim is to help grow the protocol by attracting more users and thereby increasing trading volume.
Milestones:
Milestone | Due Date | Payment |
---|---|---|
UI design + basic infrastructure | 1 week | $2000 USD |
Order Creation | 3 weeks | $6000 USD |
Order history and cancelation | 1 week | $2000 USD |
Batch Order Creation | 1 week | $2000 USD |
UI design + basic infrastructure
Figma designs of the relevant components, pages, and user flows of the app. We plan to share our progress on Discord and get feedback as we go, much like we did with the Milkman grant. We see some UI overlap with Milkman and plan to build upon that app. A draft UI design can be found here (we also added some screenshots below).
In terms of basic infrastructure, we need some on-chain and off-chain tooling to help with project development, e.g. running the WatchTower towers, deploying mocked chainlink oracles to testnets, etc.
Order creation
Functional app with the ability to create Stop Loss orders with all relevant parameter definitions and checking. The checks will include:
- Whether token in/out are supported by Chainlink oracles;
- Detect/set the right fallback handler if isn’t the ExtensibleFallbackHandler;
- Whether the connected address has the specified amount (we are considering implementing an advanced mode that may include or omit the check for whether the connected address has the specified amount);
- Whether the selected Chainlink oracle is one of the active price feeds;
- Whether both oracles are paired to the same token;
At this point, the app will connect to Safe multi-sigs and create stop-loss orders, which are tracked by the WatchTower and then posted on CoW’s API.
Order History and Cancellation
Allow users to track their past/current orders and set a status to each order (created, posted, completed, and canceled). We’ll work on an API (potentially Subgraph or similar) to track the creation of these orders in particular. We’ll use CoW’s own API to check when the order gets posted / executed. We’ll check against ComposableCoW contract for order cancelations since that cancelling orders doesn’t emit any events.
Each order will show relevant information, such as tokens, amounts, strike price, and links to CoW Explorer should the order already have been posted.
Until orders are final (e.g. completed/canceled), users will also be able to cancel them on the UI.
Batch Order Creation
Allow users to create multiple orders at once, decreasing gas cost and simplifying voting / signing process (more sensitive for DAOs).
Funding Request:
The funding will be divided as follows:
- Upfront:
- Criteria: Grant approval by snapshot voting
- Payment: $6k USD-equivalent at the time of payment;
- App production deployment:
- Criteria: App approved by the grant committee
- Payment: $6k USD-equivalent at the time of payment;
- Criteria: App approved by the grant committee
- Volume Based Program:We request to participate in the Volume-based Partner Reward Program. With this, we can receive more COW if we achieve the program volume goals.
Budget Breakdown:
The budget includes the hourly rates of a developer during the execution, and a designer and project manager on a need-basis. It also includes the diluted maintenance costs for 6 months. It also covers the expenses incurred during any eventual deployments.
Gnosis Chain Address (to receive the grant):
0x554866e3654E8485928334e7F91B5AfC37D18e04
Other Information:
- All the code will be open-source from day 0. We’re open to feedback during PRs as well;
- This grant would also be our first step in making user-friendly tools related to Composable CoW orders, and we are particularly excited about eventually moving in the direction of allowing non-technical folks (i.e. non-developers) to create their own order types using Composable CoW, such as what @fleupold mentions here.
- Needless to say, we’re happy to answer any questions and are open to feedback about this proposal;
Terms and Conditions:
By submitting this grant application, I acknowledge and agree to be bound by the CoW DAO Participation Agreement and the CoW Grant Terms and Conditions.
Order creation mockups