Request for a "Cowswap" Circles solver

As many of you know Gnosis has been working on a new version of “CirclesUBI” (now at: https://www.aboutcircles.com/)

The v2 contracts have been deployed ~1 week ago and a early reference implementation for a Circles wallet is available at: https://app.aboutcircles.com/

Later this year we plan to have a larger public Circles v2 re-launch once Metri fully supports v2 and a few other features.

As part of this re-launch we will try to create a core group of “early Circles adopter” that are willing to back their very own Circles with some money - aka. buying their own CRC on Cowswap.

E.g. here my Circles Safe buying my own CRC on Cowswap.

CRC (in v2) are by default 1155 tokens but they can we wrapped (and unwrapped) into ERC20.
Now - my very own personal CRC might not be for sale at the moment of the trade on a traditional liquidity sources like Uniswap, Balancer, Curve, … however - Circles itself is essentially a liquidity network.

Me trusting other people essentially means I am willing to accept their tokens and am willing to exchange them 1:1 against any CRC I hold - including mine.

Test the pathfinder here: https://data.aboutcircles.com/path-viewer

So if one can buy any CRC that have a path to “Martin CRC” a smart solver can buy those CRC on the stop → convert them via a path-transfer into “Martin CRC” - wrap those into ERC20 and finally deliver the token.

Ideally we can use post-hooks to even unwrap the token into 1155.

We are looking for solver willing to build that integration and are of course happy to help finance that work via investments or grants!

8 Likes

CowSwap Solver Integration for Circles and Conditional Tokens

We at Quiver are excited about the possibility of building and operating a CowSwap solver with advanced support for wrapped ERC1155 tokens, focusing on Circles (CRC) and conditional tokens. This project aligns well with our expertise and with our vision for how we can contribute to the Gnosis ecosystem.

Proposed Milestone 1: Generalized CRC Support

Implementation Overview

  • Develop a solver to support generalized CRC flows
  • Create an open-source pathfinder for early adopter liquidity

Technical Approach

We’re proposing a standard flow algorithm with a greedy allocation strategy, focusing on assets with higher allocations and better exchange rates:

  • Nodes represent assets
  • Edge capacity (i,j) is the sum of all “j” assets owned by users/wallets trusting i
  • For edges to asset 0 (e.g., wxDAI) with variable rates, we’ll employ a greedy approach to maximize flow to higher-rate assets first
  • This greedy strategy guarantees optimal results without the need for complex generalized flow algorithms

Key Considerations

  1. Early Adopter Liquidity Dynamics
  • How does purchased CRC immediately affect exchange availability?
  • Optimal routing may require multiple rounds (B->A, A->WXDAI, B->A again)
  • Is flash loan support a possibility?
  1. User Experience for Selling CRC
  • Addressing multiple ERC20 tokens for different internal ERC1155 assets
  • Potential solutions:
    • Special order type
    • Unified ERC20 wrapper for trusted ERC1155 assets

Proposed Milestone 2: Conditional Tokens Support

Objectives

  • Enhance liquidity efficiency in prediction markets
  • Support on-demand splitting, merging, wrapping, and unwrapping

Application: Futarchy Governance

Example scenario for estimating the impact of a proposal “X” on GNO price:

  1. Split GNO into yes_GNO and no_GNO
  2. Split XDAI into yes_XDAI and no_XDAI
  3. Wrap split tokens into ERC20s
  4. Create new pools:
  • yes_GNO/yes_XDAI: Represents GNO price if proposal passes
  • no_GNO/no_XDAI: Represents GNO price if proposal is rejected

Solver Capabilities

Efficient routing for GNO → XDAI orders:

GNO -> (yes_GNO + no_GNO) -> (yes_XDAI + no_XDAI) -> XDAI

This process involves:

  • Depositing collateral
  • Splitting positions
  • Withdrawing/wrapping conditionals
  • Trading through conditional pools
  • Unwrapping, merging, and withdrawing collateral

As long as solvers support the conditional pools, the liquidity can be split into the conditional pools without increasing slippage for “normal” XDAI ↔ GNO trades, and without fragmenting liquidity / increasing impermanent loss.

We’re genuinely excited about the potential to implement these advanced solver capabilities, making complex token interactions more efficient and accessible on CowSwap. Our team is prepared to dedicate significant effort to this project, with the aim of having a working solution ready for the Circles v2 re-launch later this year.

Depending on the scope and terms we agree upon, we believe we could deliver a functional implementation within the next two months. We look forward to discussing the details and collaborating closely with GnosisDAO to bring these innovations to life in time for the re-launch.

1 Like

I think it’d be cool to have a good solver for prediction markets.
Seer is using Cowswap and would greatly benefit from it.

The most interesting types of routes would be routes of the form:
For routing sDAI to yes

sDAI → (yes + no + invalid) → (yes + sDAI)

(selling the no and invalid tokens)

For routing yes to sDAI

yes → (yes + no + invalid) → sDAI

(selling yes to buy complete set and then redeem)

Would you be able to support that?

1 Like

Yes, we can absolutely support these, and we indeed had Seer in mind.

It would take a little bit more effort, so that could be another milestone, but we would like to support deeper conditional tokens as well, such as for the conditional prediction markets that Seer already supports.

1 Like

Thats nice, because I believed that circles was abandoned.