Collateral Swap Extension: Beta Launch Plan & Feedback

The Wido team has completed Milestone 2 for the “Extension: Collateral Swap” CGP grant, proposed by Wido (link to Questbook).


  • Try it on Sandbox
  • It’s code complete and ready for review
  • We propose to launch as Beta for 1 month to collect feedback and improve before launching live

About the Collateral Swap Extension

The Compound Collateral Swap Extension will enable Compound III users to swap deposited collateral, even if the collateral is locked due to an open borrowing position. To achieve this, Wido utilizes flash loans.

Code Submissions

This section contains all the code repositories and documentation that we are submitting as part of Milestone 2.

Operator (GitHub link)

This repository contains a set of contracts that contain all the required on-chain logic.

The library contains all the business logic for executing a complete collateral swap.

The implementations exist because there can be different loan providers, depending on the asset and the chain, and some providers might be more efficient than others. We have different implementations, so far we have implemented Aave and the ERC3156 standard (which we deployed for Equalizer).

It’s then the implementation that uses the library and executes the collateral swap.

SDK (GitHub link, docs)

The SDK contains all the logic that needs to be executed off-chain to check the user’s available assets, quote the swap on Wido’s API, and construct the final contract call data to be executed by the user.

The extension UI (GitHub link)

It’s the repository that holds the UI extension, which uses the SDK in order to provide all the needed functionality for the user.

Curation and Safety

This section contains answers to the Curation and Safety questions, as defined in the Comet Extension guidelines.

If there is an Operator for the Extension, has the Operator been audited?

There is an operator and it has not been audited.

If there is an Operator for the Extension, does the Operator have a limited surface area for exploitation?

The operator only has one entry point, there are no approvals made to the contract, and it doesn’t hold any assets.

If there is a Web Extension, does the Web Extension ask for a narrowly-tailored set of permissions?

Yes, the web extension asks for signatures for permitting and revoking The Operator to interact with Comet on behalf of the user.

The permit and revoke both execute on the same transaction.

If there is a Web Extension, does it respect the user’s expectations and protect their privacy?

Yes, no information is stored. The signatures for approving and revoking Comet are in memory only during the context of the Swap.

Does the Extension bring overall value to the community and users of the protocol?

Yes, it allows for swapping collateral without repaying the loan.

Does the Extension meet the high qualities and standards expected by the Compound community?

To actual answer should be decided by the Compound community.

According to Wido’s best knowledge, this Extension does meet the high qualities and standards expected by the Compound community.

Feedback collection

We intend to collect feedback separately from the Extension users and from the SDK Integrators.

To provide feedback on the Extension UI, there is a “Provide Feedback” button at the bottom section of the extension dialogue (see screenshot below). That button opens up a Google Form (link) with a predefined set of questions.

For the SDK, we plan to collect feedback in a more open-ended form. The SDK involves working with APIs and Docs so we think open-ended is better suited. The SDK documentation contains “Feedback” hints asking people to reach out with feedback or questions.

We intend to share all learnings as a comment under this thread, before launching the extension out of Beta.

Sandbox App

The Collateral Swap Extension can be tried here.

Please note you need an open position on Compound with an outstanding loan in order to use the Collateral Swap.

Proposed Next Steps (in this order)

  1. Compound team to review all the submitted repositories and accept the Extension so that it becomes part of Compound Extensions.

    • Note: The Extension contains a BETA message, asking users to proceed with caution.
  2. Wido to publish an announcement Tweet and a call to action for the Compound community to test the Extension and provide feedback. Marketing help from the Compound’s Marketing team would be highly appreciated.

  3. Compound BD team to connect Wido with existing Wallets or dApps, who have Compound integrated as of today, to present them the Collateral Swap SDK in case they are interested in integrating compound collateral swaps into their own apps.

  4. One month after the Extension is live on Compound Extensions, review all feedback collected from Beta users and discuss with the Compound team if it’s ready for public launch or if more work is needed.

  5. Announce this extension is live. Help from Compound’s own Marketing team would be highly appreciated.