Developers Forum for XinFin XDC Network

Cover image for Proposal: Safe on XDC Network
Daria Lapus
Daria Lapus

Posted on • Updated on

Proposal: Safe on XDC Network

Proposal Update (25 September 2023)

After performing test deployment and RPC research, we have been able to narrow down our initial cost estimation, so it become even more meaningful for the community. In addition, after a discussion with XinFin team, we have agreed on a new cost structure: 50% in XDC and 50% in stable tokens, which makes the project more ecosystem-friendly.

Motivation

Our motivation stays the same: we would like to become a partner and significant contributor to XinFin ecosystem for the long term. Our first step is quite specific and valuable project - XDC Safe (fork of a former Gnosis Safe). We are going not just to deploy it, but continuously update, develop and improve it with extra features.

Ecosystem Benefits

We truly believe, that having an official Safe in XDC ecosystem should attract more institutional investors and DAOs, which utilize Safe as their core funds management system. In turn, this should increase XDC TVL, adoption and price.
Main features which Safe will provide:

  • With multiple private keys, the same account can be jointly managed by many users enabling decentralized co-ownership for DAOs, groups and enterprises, mitigating risks of lost or stolen keys and hacked devices.
  • Integrating Safe contracts can attract various protocols and dApps to your XDC network, as they rely on Safe contracts and components, including popular protocols (chainlink, for example).
  • Safe is a modular solution with a range of features. Built-in app store contains numerous Safe Apps, which makes web 3 apps accessible right from inside the Safe Wallet interface. Modules and Guards can significantly extend signing functionality, making it appropriate for companies with complex hierarchies.
  • Simple TX batching allows fee saving in a matter of clicks.
  • Safe is a widely adopted standard on Ethereum, used by numerous DAOs, protocols, and companies to secure and manage their funds on-chain, with the total amount of funds stored in Safes being over $100B.

About Protofire

Protofire is a DAO with more than 80 blockchain engineers. We are a recognized partner of (Gnosis) Safe team (worked together since 2019). We already deployed and still maintaining Safe infrastructure on 15+ networks, such as Astar, Cronos, Oasis, Harmony, Linea and many others. Recently together with Safe team we have successfully deployed Safe on the zkSync network and as for today it’s already available at Safe.Global UI.

We are Safe Guardians!
Safe Guardians are active members of the Safe community, who have verifiably proven their commitment to this vision. Guardians steward the SAFE ecosystem and protocol, and align with our vision to drive the adoption of smart contract accounts.

Proposal

The goal of the proposal is to deliver a fully functional official Safe multisig wallet on the XDC network. This wallet will be customized with XDC brand colors and styles and will be officially supported by XinFin. Code will be available in official XDC Github.

The proposal includes 2 phases:

  1. Safe deployment & configuration
  2. Monthly support & maintenance

The first phase includes infrastructure deployment (containing 3 BE and 1 FE components), it’s configuration and testing. All components and smart contracts will be updated to the latest stable versions.

The second phase covers all the activities, required for keeping XDC Safe up-to-day and secured. Since the codebase of all the components is being constantly updated and modified by the Safe team (guaranteed 2 releases per month), adjustments need to be merged promptly. A monitoring service will be provided for observing all the services. In addition, we provide support to customers and businesses using Safe in their daily activity, for better adoption and widespread usage.

Deployment Milestones

We are targeting a fast Safe deployment. We deploy the latest Safe version with the basic features on a default, robust and secure infrastructure model.

Milestone 1 Milestone 2 Milestone 3
Research & analysis of RPC and EVM implementation (Done) Deterministic Testnet & Mainnet smart contracts deployment (Done) Backend Services deployment
Staging & Production infrastructure spinning up Frontend Services deployment
Monitoring tools setup Services configuration
Frontend customization
Functional tests

Team:
Field CTO;
Full-stack Engineers (3);
Project Manager;
DevOps Engineers (2);

Maintenance

Safe Updates
As the upstream Safe codebase is being constantly updated and changed by the (Gnosis) Safe team, new releases need to be merged with the fork deployed by Protofire, making sure it is updated and compatible with your Safe instance. (Gnosis) Safe team makes releases approximately every 15/16 days (2 times per month).
Regular Safe updates will be performed and released on the supported networks. Updates consider Frontend (mainly user experience improvements), Backend services and Smart Contract.
Safe features
Team scope of work includes research and implementation of such features like Safe dApps, Modules, Guards, External Wallets Connectors, client customization, etc.Improvements can be proactively suggested by Protofire or requested by XDC Network team/community.
Infrastructure support & monitoring
DevOps support and monitoring, covering all aspects of infrastructure security, architecture optimization, monitoring and CI/CD pipeline enhancement in order to improve cost-effectiveness and scalability. This team supports troubleshooting incidents and issues in the infrastructure context.
General Suport
General support is provided to Customer’s financial, business and technical teams considering incidents analysis and troubleshooting, research and general inquiries. All potential end-users support requests must come from the Customer’s teams. Support will be provided through specific channels (E-mail, Slack, Discord or Telegram group).

Grants Request

We request a grant of 20,000 USD from the XDC foundation to cover the development and infrastructure costs of the Safe Deployment.
We anticipate that the development process will take approximately 2-3 weeks.
Development rate is 105 (70+35*) USD per hour, hours breakdown are as follows:

Role Most Likely Estimate Pessimistic Estimate
Developers (Fullstack + Solidity) 64 hours 86 hours
DevOps 24 hours 32 hours
Leadership (fCTO + PM + Tech Lead) 10 hours 16 hours
Total 98 hours 134 hours

The reason why we work with a range, most likely and pessimistic estimation, is because unexpected issues can happen (and they do happen) even more when integrating with networks / RPC nodes. This range is a way to set expectations if inconvenient issues appear.
We are confident that the necessary hours tend to be around the most likely estimation.

So the final cost breakdown will look like:

Network Effort Timeline Compensation (USD)
Testnet 98-134 hrs 1 - 2 weeks 10,290 - 14,070 USD
Mainnet 40 - 54 hrs 1 week 4,200 - 5,670 USD
Total 138 - 188 hrs 2 - 3 weeks 14,490 - 19,740 USD

Part of the compensation is dedicated to developers (33% of total amount) and distributed directly between contributors. Such an approach allows us to allocate the most professional and senior specialists, who are motivated with the success and quality.

Infrastructure costs (AWS) are not included in compensation structure and will be added to the final invoice (provided that these expenses are priorly approved by foundation).

The rest of the budget will be spent on support and adding new features, such as, Safe Apps (like CSV Airdrop App, Drain Account, WalletConnect, Revoke.cash, and/or others), updating Safe components (once released by Safe team), setting up monitoring and other types of maintenance.

Results and reporting

After the deployment, we'll provide a comprehensive report that outlines the time spent on individual tasks, as well as the problems that were resolved and any issues that were addressed.

Support

As we are committed to maintaining the Safe and ensuring that all updates are installed correctly, we also want to propose three options for further support of the Safe instance on the XDC Network:

  • Time & Materials (T&M) approach, work on request. Hourly rate the same: $105 (70+35). The primary drawback is that we cannot guarantee specific deadlines. Infrastructure costs are included.
    Cost: $0/month.

  • Bug fixing, monthly component updates to the latest version and critical user support. Infrastructure costs are included.
    Cost: $2,300/month (based on our 20-30 hours of efforts per month estimation).

  • Bug fixing, monthly component updates to the latest versions, user support. It also includes continous features development: Safe Apps, Modules, Guards, Wallets (such as hardware wallets or Wallet Connect). These features can be proposed by Protofire requested by users/XDC team. Up to two new features per month. Our team constantly schedules tasks for sprints 1-2 weeks in advance and engages in discussions with the XDC team and community. Hours utilization may vary depending on number of requests and available features for development. Examples: Wallet Connect, Zodiac DAO tooling, Ledger & Trezor wallet connector, any Safe App (Safe Apps on eth network)
    Cost: $3,500/month (based on our 30-100 hours of efforts per month estimation). Infrastructure costs are included.

All 3 options may be paid fully in XDC, stable tokens or 50/50.

Relevant links

https://protofire.io/
https://github.com/protofire

Contact

Name: Daria
Email: daria.lapus@protofire.io
Telegram: @daria_lapus

Discussion (4)

Collapse
riteshkakkad profile image
Ritesh kakkad

How it's differ from from below links:
yodaplus.com/multisig-wallet.html

Also global safe community already added XDC contract code. Please check url : github.com/safe-global/safe-infras...

Please reply to above questions to get more clarification on your proposal.

Ritesh

Collapse
daria_protofire profile image
Daria Lapus Author

Thanks for your questions Ritel and Atul!
Here are our answers:

Regarding Yodaplus wallet.
It seems to be a fork of the original (Gnosis) Safe solution (the code is open-source), which is positioned as a custom Yoda-branded product. There are some important points that we want to mention:

  • Commitments and Obligations: this solution is owned and managed by a 3rd party company. Since it's not an official XDC wallet, there are no commitments and obligations regarding keeping it working in the long term. Recommended (by Gnosis Safe team) infrastructure costs around $300-$500/m (depending on Safe utilization) and the solution itself doesn't earn money, so there is no clear motivation for YodaPlus company to keep it working, especially in case of usage growth. We suggest deploying an official public XDC Safe, owned by the community. This wallet will be fully XDC branded, code will be published in XinFin GitHub repository and Protofire will support & maintain it officially until the Gnosis Safe team will take it over. We are a long-term partner of the Gnosis Safe team and our track record (we deployed Safe on more than 15 networks) and reputation speak for themselves, so the community cannot worry about the security and reliability of the suggested solution.
  • Keeping it up to date: YodaPlus vault is significantly outdated and already deprecated. While it's hard to check BE components, based on published UI we can say that solution versions were not upgraded for at least 9 months (it also correlated with commit history in Yoda GitHub github.com/yodaplus/gnosis-safe-re...). From January 2023 Safe-React repo is deprecated and Web-Core is released instead (github.com/safe-global/web-core). These updates brought not only decoration but plenty of new features and the most important: security improvements. That's why we believe that updating it timely is crucial. Our proposal includes further support, updating & maintenance. In addition to new features development and integration, which significantly improve Safe adoption.
  • Robust solution: we also found this solution more like a Demo or Sandbox - Terms, Privacy and Licenses links are not clickable. Helpdesk is not working as well, so legally this is a grey solution. But apart from legal, based on our experience (we do have a sandbox for illustration purposes), the infrastructure behind it is not reliable, so traffic peaks may lead to accessibility issues. All Safes deployed and published by our team are always legally correct and the DevOps team constantly monitors the load and is ready to scale it on the fly.

Regarding XDC pull requests and commits - mostly they are related to Safe contracts (mentioned PR is a minor improvement, however, there is a list of valuable PRs made by Ruslan Wing - forum.safe.global/t/add-support-fo..., which made possible to deploy Safe on XDC).

We don't include this part in our proposal (marked as done), but it's important to understand that smart contracts stuff is only a part of deployment (usually takes 10-30% of effort). The biggest part of the work is setting up a reliable and scalable infrastructure, deploying BE and FE components, and configuring them together. In addition, as a part of our normal approach - we enable features (such as WalletConnect, XDCPay, and basic Safe Apps), and we prepare all branding & legal requirements.

As for being added to Safe. Global - Gnosis Safe team has a very limited capacity, so they cannot add XDC officially now to their UI. Here is their comment - forum.safe.global/t/add-support-fo..., so they suggested Safe deployment on XDC to us, however, we consider this XDC deployment as a first step - we will prepare infrastructure and the whole setup according to Safe team requirements, so it will take hours to take control of XDC safe and add it to the canonical UI, once they are ready.

In short: we suggest a Safe deployment with a very transparent pricing (payment for real dev hours) and further, support & maintenance by the team, totally dedicated and experienced with this type of work, at the same time, the XDC team can focus on some other tasks; the whole XinFin ecosystem can efficiently grow in this very competitive time.

We hope we answered your questions!

Collapse
akhekade profile image
Atul Khekade

Do you have any communication with Gnosis Safe dev team? Apparantly there are some PRs there for xdc integration already. Would they commit to supporting XDC Network in their official Safe Dapp?

Collapse
thanasimos profile image
Thanasimos

XDC already has a deterministic deployment of Gnosis Safe:
app.oryy.io/welcome?chain=xdc