Celo x Compound Finance & Compound Chain

By Keyko

Proposal

The Celo community is excited by the announcement of Compound Chain. We firmly believe that Compound Chain will unlock new opportunities for Compound users, enabling the inclusion of a whole new class of assets from multiple chains and will help the platform reach a larger number of DeFi enthusiasts.

We propose contributing to the ongoing effort of the Compound community in launching Compound Chain by deploying the Celo Starports, contributing to Compound Chain oracles, and by building tooling that will make it easier for Compound Chain validators to read Starport events from the Celo chain.

Further, we also propose deploying the Compound smart contracts on the Celo blockchain (Celo-Compound), to create a second ‘local’ market for natively tradable assets on the Celo network (e.g. CELO, cUSD, cEUR, tBTC, and the dozens of other regional and community currencies launching on Celo in the near future). This market can be used as a sort of ‘Minor League’ which can provide a useful signal to the COMP community for whether there are any additional assets that should be considered for bridging to the main Compound instance running on the Compound Chain.

There will be no governance token on Celo-Compound and all governance will initially be conducted by a multisig group which executes the will of COMP governance from Ethereum.

Motivation

Celo’s aim to bring access to financial instruments to the wider public through its mobile-first approach will be greatly enhanced by the ability to lend and borrow on the platform. cUSD is intended for use in everyday commerce and hence there is a clear incentive for users to borrow cUSD against their holdings to pay for transactions and also as an incentive for holders of cUSD to receive interest on funds in their Valora wallet (Celo’s payment focused mobile wallet).

Because the Celo platform has a scalable and mobile friendly consensus protocol, is fully EVM compatible, and supports tokens for paying for transaction fees, it is an ideal platform to build easy to use mobile experiences that reach a large number of non-crypto savvy users looking for financial services that would otherwise be unavailable to them.

Compound Chain will provide an ideal mechanism for these users to borrow and lend assets in the broader crypto ecosystem. Further, since Celo is fully EVM compatible, much of the work needed to bridge to Celo can be reused from the Ethereum effort. As a result, Celo can serve as a great initial integration with a low amount of complexity and additional work.

Governance

For the minor instance of Compound running on Celo, it is desirable to have the COMP community own all governance decisions. Hence the initial proposal for governance is to establish a multisig group of trusted COMP and CELO holders to execute the will of any governance decisions carried out on Ethereum. This multisig group would have the freedom to automate this process once appropriate bridges exist.

To minimize the risk of multisig holders colluding with each other, each multisig holder could put up a bond on Ethereum that could be slashed through governance by the COMP community should any multisig holder misbehave.

Longer term, this multisig would be deprecated in favor of reading and applying governance decisions directly from the Ethereum chain, ideally via the Starport to the Compound Chain.

Challenges

This proposal comes with a set of incentive challenges that we would need to address or minimize:

Incentivizing CELO liquidity

Since the Celo network has only recently launched, CELO holders bullish on the success of the network are likely highly motivated to hold CELO and thus to borrow assets (e.g. cUSD) while using CELO as collateral.

However, because the Celo network uses Proof-of-Stake for consensus, holders of CELO can receive approximately 6% APY by locking and voting on a validator group. Any CELO liquidity contributed towards Compound would have a 6% opportunity cost to overcome.

Initially, the roughly 50% of CELO that is currently not voting (and thus not earning 6% rewards) will be available immediately for use with Compound without paying this opportunity cost (~480M USD in value). If native support for liquidity providers is added to Valora then this will provide a seamless onboarding to users holding CELO on their mobile wallet. This fraction of non-voting CELO is expected to decrease in the long term however and thus, over time, it may make sense to support both CELO and non-voting CELO derivatives on the platform. A non-voting CELO derivative would capture voting rewards from the initial CELO deposit and thus not entail a 6% opportunity cost.

Trusted governance model

With respect to Celo-Compound, the goal of this proposal is to minimize complexity, hence avoiding issuing a new tradeable governance token at launch time. This does mean, however, that users of the platform will need to trust the actions of the multisign group. Moreover, users of Celo-Compound will be beholden to the will of COMP token holders without the opportunity to accumulate these tokens themselves.

While the average individual user often doesn’t have a significant role in governance decisions, it is important that these users trust that good decisions will be made. The multisig group will need to have an established trust basis and also commit to acting in the interests of Celo-Compound if COMP governance deviates from this.

Execution Plan

This section outlines the execution plan and proposed pricing and milestones for the work.

Milestones

As part of this proposal, we envision the following 4 milestones, starting with work on the Compound Chain, followed by the Celo instance of the Compound.

Compound Chain

First, we would like to help the Compound community in launching Compound Chain with a Celo integration. To that end, we will help add CELO and cUSD to the Open Price Feed, which Compound Chain will be using. Since CELO is available on Coinbase Pro and Uniswap (via wCELO), it should be relatively easy to add CELO to the price feed.

Next, we would like to contribute to and deploy the Starport contracts on the Celo chain. These should be similar to the Ethereum versions with the one difference that since Celo has 1-block finality, it may be possible to wait for fewer block confirmations than for the Ethereum counterparts. Moreover, tooling and testing will be provided to enable Celo wallets to communicate with Compound Chain via notices to the Starport contract.

Finally, we would like to build tooling that will make it easier for Compound Chain validators to run Celo full nodes so they can read Starport events from the Celo chain. Ideally, validators would run the fullnodes in a pre-packaged docker container to make it extremely easy for them to get going. Further, since Celo has a very efficient light client, new validators will be able to quickly sync with the chain using Celo’s fast syncing mode.

Celo Compound

Deploying Compound on the Celo network entails the deployment of Compound contracts in a Celo-compatible manner, replacing the governance module by an audited multisig, indexing these contracts for easy consumption by a GraphQL client and providing a web and mobile user interface that is compliant with the Celo mobile Dappkit framework.

Deploy Compound Contracts + Multisig

Next, we’ll move to the Celo instance of Compound, first by deploying the Compound contracts on the Celo test network (Baklava). This will allow our smart contract engineers to become familiar with the compound API and deployment. The estimated time for this is 3 weeks, with the following steps: functional analysis, development, deployment and network integration.

The functional analysis will map out the existing contract domain space and identify common components and change requirements for the Celo-Compound deployment on the Celo networks (mainnet and baklava testnet). This includes ensuring VM, transaction and contract compatibility as well as Celo-Compound configuration such as support for cUSD and CELO and design for the multi-sig governance module.

The outcome of this work is a process of change requests that are managed in an agile development environment with OKRs, milestones, tickets, CI/CI, devops and merge policies.

Launch Indexing API (Blockscout)

Next, any dapp built on top of the smart contracts will need access to an indexer. We are intimately familiar with the indexer used by Blockscout, the block explorer that Celo uses, and so we can quickly use it to index the necessary data, and expose it to the community using Blockscout’s graphgl endpoint.

The tasks in this module include adding the Celo-Compound contracts to the blockscout Indexer, updating the schema of the underlying DB repository and exposing those schemas through graphql as well as updating the web frontend of the explorer with newly designed pages.

Launch Mobile-first Dapp

Finally, we will work on a mobile-first dapp (either web or native mobile app) so that regular consumers will be able to access the service.

The app will be designed in alignment to the current compound.finance dapp interface and integrated with the Celo client and wallet to support access to the Celo-Compound contracts and state.

Team

About Keyko: Keyko GmbH is a Swiss based development house focusing on web3 and digital ecosystems. Established in 2019, we have successful collaborations with flagship projects such as Celo, Filecoin, Bancor, Orange and others. The Keyko team has 20+ employees and is full-stack delivery oriented.

For ensuring the completion of above milestones, the following roles have been identified:

Product Delivery

Analysis and specification of requirements. Architectural design and handover to engineering. Follow up and iterate on requirements and gather feedback from stakeholders and community.

This role will also manage the agile process.

Backend Delivery

This role will oversee delivery of following components.

  • Compound-Chain

  • Starport contracts

  • Validator integration

  • Celo-Compound

    • Compound Finance contracts
    • MultiSig wallet
    • Block Explorer

Each product will be delivered with regular release cycles.

Frontend Delivery

Both a designer and a frontend engineer will be required for the Celo-Compound mobile-first dapp.

Devops

Each product component requires packaging for deployment and continuous integration. This role will also account for setting up test environments and support on operational security.

Estimated Effort

Total effort: 18 person months:

  • Project duration: 4-5 months, starting upon approval of the grant
  • Total development effort: 15 person months
  • Support & maintenance after delivery : total of 3 person months over the duration of the project (included into delivery effort)

Total budget: 500.000,00 USD:

  • 250.000,00 USD in $COMP
  • 250.000,00 USD in $CELO

The Celo Foundation has committed to funding half of this work assuming this proposal passes.

Breakdown of Effort:

Product Delivery: 3 person months

  • Celo on Compound Chain: 1,5 month
  • Compound Finance on Celo Network: 1,5 month

Backend Delivery: 8 person months

  • Celo on Compound Chain: 3,5 months
  • Compound Finance on Celo Network: 4,5 months

Frontend Delivery: 4 person monthsGmbH

  • Compound Finance on Celo Network: 4 months

Devops: 3 person months

  • Celo on Compound Chain: 1,5 month
  • Compound Finance on Celo Network: 1,5 month

Payment Terms

We are open to whatever payment terms make sense the most for the COMP community. Ideally, we would be paid after completing each milestone from a multisig contract, however, if that is logistically too complicated, we would be open to splitting the payment into three chunks:

  • 20% paid upfront
  • 40% paid on delivery of Celo on Compound Chain
  • 40% paid delivery of Compound Finance on Celo
32 Likes

I have a couple of quick comments:

  1. It seems like you guys know way more than what is publicly available about Compound Chain. I would be interested to know if there is any kind of existing relationship or anything that could be extruded as a relationship between the Celo and Compound Finance Labs Team.

  2. If the community were to fund this proposal tomorrow, what would be the estimated competition date?

  3. Why ask for a COMP grant when you are already a well-capitalized project?

5 Likes

Hi @getty
Thanks for your comments. I tried to address them:

  1. We (Keyko) have a long standing working relationship with Celo Foundation. And we have a lot of respect for the Compound Finance Labs Team. After hearing about compound chain we’ve started developing the idea of integrating Compound Chain and Celo. For relationships between Compound and the Celo Foundation, I’ll defer to the parties involved

  2. There is not development info available on compound chain, but as we can derive from what’s published and talks with @rleshner we estimate that the both milestones can be achieved within 4 months. Given that compound chain proposal is more an integration effort than a product design effort we assume this milestone to be delivered much faster. Of course, having access to a development docs/sandbox/code would help us identifying the devil in the details

  3. Keyko GmbH is independent from Celo and Compound. We’re a self-funded web3 company that aims to add value to the web3 space by recognizing opportunity and synergy

2 Likes

Thanks @dimi. This looks like a thoughtful approach. A couple questions:

  1. Can you expand a bit on the thinking re: deploying a separate Compound instance on Celo (in addition to facilitating the integration with Compound Chain)? You mention that it could serve as a sort of ‘Minor League’ version that provides a signal as to which assets should be added to the main Compound Chain. But is there also the potential that it could lead to fragmented liquidity between the two versions once they are both running at scale?

  2. You mention that you’ll work on a mobile-first dapp (either web or native mobile). Is it feasible that this functionality could be integrated directly into Valora, or does it need to be a standalone app?

  3. Can you expand on your plan re: security and testing of the code pre-launch? What portion, if any, would go towards audits, etc?

  4. What would the next steps be in terms of moving forward towards a formal governance proposal?

Thanks!

Jeff at a16z


[Note: we own both CELO and COMP tokens. For further information, please see Disclosures - Andreessen Horowitz]