Deposit DAI of the xDAI bridge in sDAI vault from Spark

TL;DR

  • This post is to resume the discussion and inform the community we are going to deposit most of the DAI in the xDAI bridge into the sDAI vault from Spark Protocol on Mainnet, which is an ERC-4626 vault depositing all DAI into the Maker DAI Savings Rate (DSR).
  • The proposal is to upgrade the Mainnet bridge and relay all accrued interest onto a similar vault on GC that will be deployed in a few weeks.
  • Users on Gnosis Chain will be able to mint Savings xDAI (sDAI) with their xDAI, which will accrue the interest of all the sDAI held by the bridge in Mainnet.
  • Assuming the amount of sDAI minted is lower than the one held by the bridge, the yield will be higher than the DSR. The bridge currently holds roughly 25M DAI and the DSR yield is 5%. Assuming 25M DAI get wrapped into sDAI, and only 10M xDAI get deposited into the vault on GC, the yield will be 12.5%. The expectation is that the sDAI rate will always be higher on GC than Mainnet, as only if almost 100% of all DAI bridged is staked will we achieve rate parity.
  • The current 25M DAI deposited in the bridge represents ~1.25M yearly to incentivise GC. With this proposal, TVL is likely to increase and effectively bridge Mainnet interest rates to GC.
  • DSR yield is risk-free if you are already holding DAI. All the risks derived from the collateral are borne by all DAI holders, regardless of being deposited in the DSR. We have written a research piece here. The only newly introduced risk is smart contract risk in how the integration is made with the sDAI vault on Mainnet and the implementation of the sDAI vault on GC.

Context

MakerDAO DSR’s current rate is 5%. Since the increase of the DSR to ~3.5%, ~7M DAI have fled out of the xDAI bridge, as can be seen on this dashboard. Bridging the DSR yield into Gnosis Chain will help regain these deposits.

Additionally, interest rates on Gnosis Chain have never picked up and reached parity with Mainnet or other chains with higher borrowing demand. This effectively and forcefully pushes rates up and could be a catalyst for GC’s DeFi ecosystem.

Implementation

Mainnet

It’s an upgrade to the xDAIForeignBridge implementation. The goal of this upgrade is to allow for the DAI currently in the bridge and any future DAI deposited to the Bridge to be wrapped into sDAI, with the caveat that it will always keep the buffer of the minimumCashThreshold when investing.

The minimumCashThreshold is this value determines what is the recommended amount of DAI that should be held in the bridge at all times in order to create a buffer for withdrawals without added operations and, thus, lower gas costs.

Anyone is allowed to investDAI() into the sDAI vault, anyone is allowed to refillBridge() right back up to the threshold, and also anyone is allowed to payInterest(). These processes are permissionless—and also costly—which is why we will have a bot to automate these 3 maintenance procedures in the most efficient way.

The main change from the old implementation of the Compound Connector to the newly built SavingsDai Connector is that the interest used to be transferred to a receiver address on Mainnet, whereas in the new implementation we have a new function to relayInterest to a receiver address on GC. This means we are depositing the newly accumulated bridge collateral into GC rather than keeping it on Mainnet.

The bridge upgrade was audited by 2 external auditing firms (Omega and ChainSafe), and the reports will be published soon.

Gnosis Chain

There are two contracts being deployed on Gnosis Chain. The first one is the sDAI vault, also an ERC 4626 (the most popular standard for vaults), which makes it extremely useful for DeFi integrations from Lending Protocols like Agave and Spark, to DEXes like Curve and Balancer. The only modification to the standard vault (OZ implementation) is that it will allow for direct deposits and withdrawals in xDAI, rather than exclusively the ERC20 WXDAI.

The second contract is the Interest Receiver. This will be the address provided on Mainnet bridge as the interest receiver. What this contract does is quite simple: it distributes the balance it holds in xDAI and WXDAI into sDAI at a fixed block rate that gets updated every 1-2 days to adjust for interest rate changes coming from mainnet. The goal of this contract is to not make it possible to frontrun the bridging process of the interest, and to make sure there is a fairly frequent update of the sDAI shares value and exchange rate. This contract has the perk of being very easy to switch for a different one by simply setting a new receiver on the bridge without impacting any of the operations. This means if we want to make modifications such as add a fee or normalize rates in the future, that will be very easy to plug in.

11 Likes

I believe It makes sense to split the implementation of this proposal in 2 phases:

  • Phase 1: Upgrade of the Ethereum side of the bridge and deploy the funds in DSR. The testnet bridge was upgraded 2 days ago and tests are being performed. If everything goes well it will be ready for mainnet deployment from next week. This upgrade has been audited by the 2 external audit firms.

  • Phase 2: Implementation of the Gnosis Chain side of the proposal (sDAI vault). Development is still in progress and is expected to be ready in 2 weeks.

2 Likes

Phase 1 has been successfully implemented and deployed on Mainnet

2 Likes

I think it is an excellent proposal and obviously better than the status quo.

Another competing idea which may be worth exploring (note that I’m not stating it would be better, but would be happy to see pro and con arguments) would be:

  • Put sDAI as the native token.
1 Like

I believe the tax implications alone of having a yield bearing native token can make it quite unattractive for individuals from certain jurisdictions – possibly to the extent where they would avoid interacting with the chain as a whole to avoid facing an accounting nightmare.

Moreover, considering that sDAI is not rebasing but increases in value it would become much harder to transact with sDAI as a native token - not even accounting for the fact that a native token wouldn’t even have ERC20 helper functions (i.e. convertToAssets which converts shares to the corresponding DAI value). So to send $100 one would have to account for the value of a share - which is constantly changing - and send the value in shares.

So I believe Savings xDai should be an opt-in for users.

3 Likes

I am not opposing this, but seeing this goes on without a vote shows the centralization of the gnosis ecosystem. It’s understandable to act like this cause there isn’t much input from the community here, but on the other hand it will further discourage participation if such major changes are done by only ‘inform the community’.

1 Like

Hey, as you know, we made a post back in June and the community feedback was pretty null. As a matter of fact, the input that you provided was considered for the design of the bridge, and a significant amount of the DAI (1M) is sitting idle on the bridge to make it cheaper for users to bridge in/out, as you suggested. I disagree that this will discourage people for getting involved in the community.

Additionally, the users have spoken with their wallet (as can be seen in the mentioned dashboard):

3 Likes

Thanks for this, for sure it’s a good way to proceed. And hopefully you are also right that it won’t discourage people to see these changes are going on without voting.

But still I see asking for approval of major changes in the gnosischain infrastructure as beneficial. It can enhance awareness there is something going on on gc, might trigger people to join to see the details (I often go to the aave, balancer or uni forum only after seeing there is a snapshot vote and needs more info to decide myself) and also it shows holding GNO is important to have a say.

1 Like

Karpartkey has the mandate to manage the treasury funds, imo this is in their mandate and absolutely fine.

1 Like

You got me wrong, I am not saying they aren’t allowed to do this without vote, but ofc I would have preferred for some reasons I mentioned above.

And also you might give it a second thought if bridge holdings are part of the treasury or if it should be regarded as user owned.

1 Like

Hello Community Members,
We wanted to provide a brief update on the recent sDAI APY situation.
There was a minor issue with our keeper bot, which temporarily affected the interest bridging to the Gnosis Chain. This resulted in a slight decrease in the APY during the last three days. The good news is that all the interest that was to be bridged has been collected, meaning that we can expect a higher than usual sDAI APY for the upcoming epoch starting Wednesday.
To stabilize the situation, we have withdrawn Gnosis DAO funds from sDAI, which has already improved the APY from 1.9% to 2.5%. Additionally, to prevent similar issues in the future, we’ve deployed a Gelato bot for extra reliability. You can view the deployment here: Gelato Bot Deployment.

3 Likes

Thanks for the update, I don’t mind the temporary decline of APY but would be interested in the details of the minor issues the keeper bot faced, is there a place to read up on this?
edit: also the link to the Gelato Bot Deployment don’t gives me much insight due to my inadequate knowledge of the code. Some explanation about the difference to the former bot is much appreciated.

1 Like

The keeper run out of gas due to the unexpected increase in activity.

Regarding the Gelato and the keeper bots: there’s a very simple, permissionless function that has to be called to bridge the interest: https://etherscan.io/address/0x4aa42145aa6ebf72e164c9bbc74fbd3788045016#writeProxyContract#F4

With args:
_token: 0x6B175474E89094C44Da98b954EedeAC495271d0F (DAI Address)
_amount: 1000000000000000000000000 (it will bridge everything available up to the amount passed, so passing any high value works).

Both the gelato bot and the keeper bot do that with some logic with the objective to not waste gas by bridging multiple times (theoretically, if we bridged interest just one time, 1 hour prior to the change of epoch, it would be enough, however we prefer to do it once per day so that we avoid a scenario like what just happened).

3 Likes