xDai Stable Chain xDai Stable Chain BlockScout BlockScout TokenBridge TokenBridge

Invest locked DAI of Token Bridge in Compound


Utilize the locked DAI in the Ethereum <> xDai Token Bridge contracts to get a financial passive return by investing it in the Compound v2 protocol. Network and Bridge validators could benefit from this action by using the financial return to cover the costs (transactions) of running the infrastructure and paying for networks fees (eg.: Ethereum main net gas).

Notes on existing proposal/idea

After taking a close look at: Rehypothecation of locked DAI on Ethereum side, we found that the approach is implementable, but some details should be defined/decided:

  • Every time a conversion from xDAI to DAI takes place, a withdrawal from Compound is required. The Network or the Bridge validators will have to pay for the costs of the corresponding additional transaction/s. This can be mitigated by leaving a DAI buffer in the Bridge instead of depositing all the DAI into Compound (extended proposal below).
  • Will the change affect the transparent perception of the bridge? Should the Network and/or the Bridge validators or whoever benefits from the interests provide some safety mechanism?

Proposal approach

The bridge could invest a % of the locked DAI in the Token Bridge in Compound and could also keep a fractional reserve to deal with xDAI-to-DAI conversions.
Escenarios based on user actions:

  1. If they try to redeem a value lower than reserve amount, the reserve is used to satisfy this xDAI-to-DAI requirement.
  2. If they try to redeem a value higher than reserve amount, the bridge will trigger the corresponding logic that maintains the reserve (withdraw an optimized amount of DAI from Compound).
    A configuration flag will dictate whether the Token Bridge will use Compound or not, at the time of initial deployment.


xDAI Network Validators Potentially get a financial return on the xDAI Chain market cap.
Bridge Validators Stop subsidizing the platform. Potentially earn profit from bridge operations based on Compound returns.
End Users Keep using the bridge for free. No fees.

Further research, implications and items to be defined

  • How much % should be converted to cDAI and what percentage should be kept as reserves? Reserve mechanism and whole logic has to be researched and developed.
  • What is the estimated amount of DAI that should be invested in Compound, and how long should it stay invested to generate a return higher than X? Shall there be an initial large deposit to ensure enough profit? If yes, by whom?
  • What actions should be taken in case Compound is not able to give back the invested DAI? Should an insurance be considered?

ANNEX I - Notes about using Compound


Compound incentivizes liquidity but doesn’t guarantee it: the transferred asset amount may not be fully recoverable under certain circumstances. This should be assessed thoroughly, it may impact the ability for the Bridge to secure the cDAI to DAI conversion at all times.


Costs of the transactions that interact with Compound for minting (deposit) and redeeming (withdraw) should be under 90K gas limit.

Function Typical Gas Cost
Mint < 90K
Redeem, Transfer < 250K if borrowing, otherwise < 90K
Borrow < 300k
Repay Borrow < 90K
Liquidate Borrow < 400k


The positive difference (amount) obtained because of the interest accrued multiplied by the exchange rate at the moment of the redeem will end up generating a ROI that should always be positive. This positive difference will depend on the state of the Dai market in Compound in that moment, and is not fully predictable. From the the Compound FAQ states the following:

“Interest rates are a function of the liquidity available in each market, and fluctuate in real-time based on supply and demand […] You aren’t locked into an interest rate – expect it to change every day”

Also, according to Compound’s documentation, their contracts events and API can be both watched to set a condition to trigger a convenient (or safety) redeem and perform some scenarios analysis.


This would seem to add unnecessary complexity and cost; the benefit (if any) is not obvious.

This would seem to add unnecessary complexity and cost; the benefit (if any) is not obvious.

Supply APR for Dai is 15.29% at the moment on Compound.

Locked Dai can provide interest which can be used to e.g. buyback DPOS tokens and burn them.