DappRadarby
0x046e…1d41
[DCP-5] Cross-Chain Staking Development Options
Summary
This year, DappRadar implemented an industry-first cross-chain staking functionality based on our technology partner, LayerZero (LZ). Our aim was to remove barriers for cost-conscious users to participate in staking by eliminating high fees, thus democratizing financial inclusion.
We were able to successfully allow our users to access RADAR staking from multiple chains, however, when working with any pioneering technology – development issues are commonplace. We were proactive with any issues, and early on upgraded our smart contracts from V1 to V2 when hardware wallets were not able to sign messages. However, another issue soon arose when, on September 8th, LayerZero (LZ) upgraded their smart contracts. DappRadar was not informed about any potential issues with the upgrade and therefore, the issue was only discovered afterward which resulted in an instant pause on cross-chain RADAR staking.
On September 9th, LZ eventually informed us that they would take 2-4 weeks to develop a workable solution which we communicated to the community. However, after missing this deadline, and providing a lack of updates to the DappRadar team, we were not able to give our community the certainty they needed.
On October 8th, LZ finally informed us that:
- they would need a further 2-4 weeks to develop the solution or
- our team could develop a solution and LayerZero would cover the development expenses
In the DCP, we’re proposing some options to DappRadar DAO in order to gather feedback on how to continue with the successful development of our cross-chain staking protocol.
Motivation
The lack of functionality with RADAR cross-chain staking has affected the DappRadar DAO members, holders of RADAR, and might also require development costs that will affect the DappRadar DAO Treasury.
In the spirit of increased transparency, as we progressively embrace the decentralization of DappRadar, it is necessary to give our community a full understanding of the events regarding our cross-chain staking platform, so we can collect guidance on how to proceed with a solution.
Abstract
DappRadar’s cross-chain staking platform provided accessibility to staking for a wide number of users on a number of different chains, helping to grow our community. This was an industry-leading innovation that received multiple press coverage across media outlets. We worked closely, with our technology partner, LayerZero, who provided the underlying cross-chain protocol and technical support necessary for the development of our staking platform. When LZ upgraded their contracts on September 8th, it caused the DappRadar staking to stop functioning, as we communicated through our social channels and on the cross-chain staking platform itself:
Technical details
The change was done in chain IDs introduced by LayerZero. It is a very simple yet critical issue. Previously, the Fantom chain ID on LayerZero was 12, now it is 112. We have 12 as a constant in our smart contracts and that is the reason why staking is not working after the LZ upgrade. We simply ask for 12 and LZ expects 112. Due to the immutable nature of the blockchain technology we don’t have an option to change 12 to 112 in the smart contract as it is now, so for the past month, we have been looking for a solution together with LZ.
Communication with LayerZero
Prior to the upgrade, LZ reached out to us requesting to review our smart contracts’ source code. Although we gladly shared the source code with them, there were no shared suggestions on the code amendments required before making the deployment of their new cross-chain protocol. In this situation, we are aware and empathize that there are large volumes of capital supported by their cross-chain protocol, and therefore, it may have been necessary to make the upgrade rather quickly to avoid the security risks involved in cross-chain protocol communication. That being said, it is still important to provide each partner with the necessary information to effectively deal with these developments.
Unfortunately, this upgrade meant a loss of access to the cross-staking platform for our community, a negative impact that could have been minimized if LZ had:
- informed the DappRadar team of the date of deployment for the upgrade
- and most importantly, work with our developers to ensure that DappRadar’s users would have continued access to the staking functionalities and their rewards.
This would have given us the ability to, at a minimum, provide our community with a reasonable time estimate on the resummation of the cross-chain staking platform, or even better, begin working together on a technical solution.
Since then they have been silent in our chats. Neither prior to nor after the upgrade had we had any other attempts of communication from the LZ side. We only understood their upgrade breaks our staking after it was actually done.
Once we had identified the issue on September 8, we immediately scheduled a call with LZ’s CEO and CTO where we agreed to go with a solution where LZ would build and deploy a temporary solution that would work for the next 7 months and complete the rest of the current staking campaign next 7 months.
By mid-September we synced and came up with an official message from DappRadar’s side, saying the fix is in progress and should be done soon. This was posted here.
However, on October 8, a month after staking stopped working, LZ told us the planned fix will take longer and suggested we look for another solution. Their proposals included:
- Proceed with the current solution they’re building which they estimate will take another 2-4 weeks and would be at their expense
- Look at other options
Of course, after waiting for a month with little communication on solutions and a refusal to communicate publicly from their own channels, this was difficult to comprehend. We were already struggling to communicate to our community how to move forward and this was another step backward that made it difficult to trust the proposed timelines.
This setback would impact the DappRadar DAO members, holders of RADAR, and will also require development costs that will affect the DappRadar DAO Treasury. Therefore, we crafted three solutions to present to our community to gather their feedback.
**Due to the time pressure regarding the development of the cross-chain staking platform, we propose an expediated version of the governance process where the Forum Proposal will maintain its standard Quorum but last 3 days rather than the standard 7 days – before moving to the standard SnapShot process.
Possible scenarios to have staking running again
1. Proceed with LZ’s current solution
We would continue LZ’s solution of creating an additional deployment that would communicate with the current V2 smart contracts and enable the rewards to be unlocked and allocated to the appropriate RADAR stakers. This is the initial solution that we aimed for since September 8.
Benefits
- If this solution works, V2 staking would just resume as if nothing happened
- Besides communicating it when it’s done, it requires no action from the DappRadar team.
Costs
- Taking into consideration the initial expected timeline was 2 weeks, but in fact ended up being 4 weeks, with an estimate of another 2-4 weeks to wait, this would be two months without staking
- There are unforeseen risks that may need to be considered i.e. unsuccessful audits of LZ’s smart contracts.
2. Launch V3 staking with state of V2
This would require DappRadar to:
- Update our smart contracts to have the ability to transfer state from V2 to V3
- Stop V2 and lock 92M RADAR tokens staked in V2 forever
- Get 92M tokens from one of our treasuries and send to V3 staking (so all the existing stakers still have access to their tokens)
Benefits
- As replicating the state of V2 into the new V3 contracts will simply copy who has staked what, and how many rewards they already have accumulated, users would be able to just continue with depositing/claiming/withdrawing as it was before – which is by far the most seamless option for the user.
- Technically, this solution would lock the 92M RADAR tokens in the V2 smart contract, making them inaccessible forever, whilst at the same time, requiring us to unlock 92M RADAR from our treasury for the new V3 smart contract rewards. - In effect, this would equate to burning the 92M tokens, which long-term would benefit the community by creating positive supply-side pressure for the price of RADAR.
- Provides the DappRadar team with more control over deployment and the timeline
- DappRadar team will be refunded for their development efforts
Costs
- This solution is difficult to communicate to the entire community
- It also requires high levels of trust, engineering, and of course, expenses
3. Launch a fresh V3 staking
This would require DappRadar to:
- Trigger the emergency function in the current contract that allows everyone to withdraw their stake (but not the rewards)
- Refund gas fees & rewards to ±900 addresses
- Set up V2/V3 migration on our product
- Communicate this lengthy to the community
Benefits
- We already implemented a similar upgrade from V1 to V2, when we noticed an issue with the hardware wallets being unable to sign messages with the initial V1 staking platform.
- Provides the DappRadar team with more control over deployment and the timeline
- DappRadar team will be refunded for their development efforts
Costs
- This solution is difficult to communicate to the entire community, especially as not all the stakers will regularly be up-to-date with our social media channels
- It requires high levels of trust, engineering, and of course, expenses.
- Refunding gas fees & rewards to ±900 addresses could easily sum up to at least a five-figure cost in gas fees for DappRadar DAO
- It is the most difficult to execute perfectly as some stakers may forget to withdraw their tokens. This should be reserved as a worst-case scenario solution.
Vote
- Launch V3 staking with state of V2
- Proceed with LZ’s current solution
- Launch a fresh V3 staking platform
Off-Chain Vote
Loading…
- Author
0x046e…1d41
- IPFS#bafkreid
- Voting Systemsingle-choice
- Start DateOct 15, 2022
- End DateOct 18, 2022
- Total Votes Cast50.57M RADAR
- Total Voters139
Timeline
- Oct 15, 2022Proposal created
- Oct 15, 2022Proposal vote started
- Oct 18, 2022Proposal vote ended
- Oct 26, 2023Proposal updated