stacksgov / grants-program

Archive of past Stacks Foundation grant applications. Historical record of ecosystem development.
https://stacks.org/grants
141 stars 36 forks source link

CryptoMate - Research proposal into the concept of an Ethereum Native Stablecoins to Stacks Native Stablecoin Bridge #169

Closed Mate-Swap closed 2 years ago

Mate-Swap commented 3 years ago

Template Background What problems do you aim to solve? How does it serve the mission of a user owned internet? Lack of interactions between stable coins markets and communities. In LATAM, where macroeconomic volatility and very low access to financial systems work against the development and prosperity of the most vulnerable population, we are looking to integrate with locally used stablecoins, communities and infrastructure so to empower people with access to the decentralized and user owned financial technologies on Stacks

Project Overview What solution are you providing? Who will it serve? We are researching the market (on first approach) and technological (on following projects) feasibility of a stablecoin bridge between RSV and USDA (Arkadiko), USDT and USDA, DAI and USDA. These bridges will serve communities that use these other stablecoins to seemingless transition into the Stacks world and it’s DeFI ecosystem.

Scope What are the components or technical specs of the project? What will the final deliverable look like? How will you measure success?

Final Delivery: A report on users usage of the Locking smart contracts (Total locked, AVG monthly and daily locked, Interacting Wallets, Avg Monthly and daily interactions, Total used on DeFi on Stacks, etc), and also Tech and market related suggestions and issues to be considered on a future actual Stablecoin Bridge between the chains.

Components: A Landing page for the DAPP An ERC-20 Smart contract for locking Stablecoins. A SIP10 Smart contract for minting and burning tokens according to the total value locked in the ERC-20 smart contract. A Block explorer Front End where to check the relation between locked value on the ERC-20 and Minted Value on SIP10. A swap pool between the SIP10 token and USDA.

Budget and Milestones What grant amount are you seeking? How long will the project take in hours? If more than 20, please break down the project into milestones, with a clear output (e.g., low-fi mockup, MVP with two features) and include the estimated work hours for each milestone.

Total Grant Request for M1: 10.000 USD

M1.1: DAPP Landing Page and Block explorer mockup. 3 weeks, 4.000 USD M1.2: ERC-20 Contract for locking Stablecoins live on Ethereum TestNet. 4-6 weeks (Including audit), 6.000 USD

Should we complete these milestones we will follow up with the next steps:

M2.1: Set up DAPP Landing page and interaction with ERC-20. 3 weeks, 5.000 USD M2.2: Set up SIP10 contract for Minting and Burning tokens with the necessary security and control permissions on TestNet. 1 week, 3.000 USD. M2.3 Set up DAPP interactions with SIP10. 3 weeks 5.000 USD M3.1: Set up Swap pool between SIP10 and USDA. 3 weeks 12.000 USD M3.2:Set up DAPP interaction with Swap Pool. 3 week 5.000 USD M4: Audit of smart contracts and systems. 3 weeks 7.500 USD

Team Who is building this? What relevant experience do you bring to this project? Are there skills sets you are missing that you are seeking from the community?

For this endeavor we are developing a consortium of companies between CryptoMate, a Stacks Accelerator startup, Arkadiko, a DeFi protocol native on Stacks, and Reserve, a pool of Ethereum Native stablecoins.

Risks What dependencies or obstacles do you anticipate? What contingency plans do you have in place? Risk related to the stablecoins collaterals locked on both sides of the bridges. These can be mitigated through our Partnership with Prosegur Crypto and their Cold/hot Custody solutions.

Community and Supporting Materials Do you have previous projects, code commits, or experiences that are relevant to this application? What community feedback or input have you received? How do you plan to share your plan to the community over time and as the final deliverable? We have a signed an agreement with RESERVE (RSV) stablecoin where they will collaborate with us by sharing technology Know How and working capital for testing. We have a collaboration with CoinFabrik for them to audit the involved smart-contracts and mitigate all hacking possibilities. We will have the collaboration of ARKADIKO and their technical team.

stx-grant-bot[bot] commented 3 years ago

Thanks for submitting a grant proposal. Our team will review your submission and get back to you.

RaffiSapire commented 3 years ago

Hi @Mate-Swap thank you, we reviewed during our committee and had a couple of questions:

  1. Can you explain how the actual bridging works?
  2. How is this different than other exchanges? What are you doing better?
philiphacks commented 3 years ago

@RaffiSapire I'll let the CryptoMate team answer your questions, but can chip in from the Arkadiko point of view.

  1. Having an additional stablecoin on Stacks from the ERC20 world that has relatively good circulation is interesting and helps the overall ecosystem.
  2. The Arkadiko stablecoin will be able to peg against the RSV stablecoin once it is minted on Stacks, which helps the stability (peg) of our $1 soft peg.
  3. We will support the Reserve/CryptoMate team technically if needed (obv for free since this we see this as a win-win)
Mate-Swap commented 3 years ago

@philipdesmedt Thanks for your input @RaffiSapire , About your questions: Can you explain how the actual bridging works? Our first approach to the bridging will be as follow:

How is this different than other exchanges? What are you doing better? This is different than other exchanges as we can further integrate and automatize the process with ARKADIKO to allow users with RSV or other stablecoins to directly access DeFI protocols on Stacks. Imagine people in countries where access to credit is very limited, and local currencies have a tendency to high depreciation, this solution has the potential of becoming a great financial inclusion tool that help develop local economies, with just a few clicks, talking to a chatbot in Telegram or via the web platform.

tycho1212 commented 3 years ago

Love it! Stuff like this can do a lot to integrate Stacks (& Stacks dapps) better with other protocols 💪

RaffiSapire commented 3 years ago

Hi @Mate-Swap , we discussed and still wanted to clarify, how the actual bridging step works in your reply. Is it custodial / trusted third party? Either way it's ok, just want to make sure we understand. @jennymith offered to set up time to discuss. We also have open office hours next week at 2:30 CT. Looking forward to speaking.

Mate-Swap commented 3 years ago

@RaffiSapire , on the 1st iteration of the bridge we are able to use manually the custodial services of Prosegur Crypto (the 3rd biggest security company in the world). A full integration in between the locking smart-contract in Ethereum with the custodial infrastructure from Prosegur is on the roadmap for later stages of this project. If the foundation considers other providers as better suited for the job, we are open to discuss.

RaffiSapire commented 3 years ago

@Mate-Swap

We talked at length about this grant and have more questions, we felt there wasn't enough information on the previous response.

RaffiSapire commented 3 years ago

Hi @Mate-Swap wanted to circle back as we have our next committee tomorrow and would love to help you get this to the finish line. We also have an open office hours tomorrow if you're able to attend?

Mate-Swap commented 3 years ago

Dear @RaffiSapire , About your previous questions,

Mate-Swap commented 3 years ago

This proposal has been updated into a Research project

stx-grant-bot[bot] commented 3 years ago

Congratulations. Your grant is now approved. Please complete the on-boarding link here: https://stacks-grant.netlify.app/onboard?q=28024a3ca34e93baa2d1adef88033f06

RaffiSapire commented 3 years ago

This is approved! There is a lot of community interest in seeing this happen, and from our experience, one of the best formats for sharing your research would be open community calls, done on bi-monthly basis. I've seen this done well when you have a few big questions you are framing to answer on a slide that you can present, for example, or written in github if you prefer, and can talk through or share visuals during the call for those thesis / hypothesis questions you are researching.

You coordinate w jenny on getting those calls on our organization-wide calendar. Nothing super formal - just a research update that holds us accountable to making sure what we're learning is benefiting the ecosystem.

Mate-Swap commented 3 years ago

@RaffiSapire Sounds great, thanks! we will get on with that.

Mate-Swap commented 3 years ago

@RaffiSapire Please find our M1 Draft: Crypto Mate - Stablecoin Bridge Research - High level Mockup.pdf Waiting on your comments, Best regards

RaffiSapire commented 3 years ago

@Mate-Swap Hi there. We've reviewed the mockup, but feel that the technical context is missing. There are a lot of community members interested in this research and having key findings around this topic are very valuable. Sharing back a mockup misses some of what you have learned. As this is a research project, we are more interested in the process and results of the research. What we'd like to see, is a one-pager or PPT with a hypothesis defined, how you are working towards a conclusion, and what you have learned along the way. This context, coupled with a call discussing your findings with the commuinty, would unlock the next milestone 2. Can you reach out to Jenny to schedule a community call, and perhaps prepare a few pages on slides to discuss the technical learnings for that call?

Mate-Swap commented 3 years ago

Dear @RaffiSapire

Problem Statement: Lack of cross chains value propositions between different native stablecoins, their communities, and DeFi ecosystems on emerging Blockchain layers like Stacks. RSV has one of the biggest communities in the LATAM region and given an option for the easy transition between blockchains there will be an interest to have an access to DeFi built on Stacks. We are looking into facilitating the interoperability between tokens on Ethereum & Stacks blockchains. This bridge will serve communities that use either chain’s native stablecoins to seamlessly transition into the other one and its DeFI ecosystem.

Proposed Approach Scenario: A prototype where Sender & Receiver blockchains are not connected directly. And a representation of the sender's stablecoin (in this case RSV) will be created manually on the receiver blockchain (Stacks). For this endeavor we will use a smart contract to lock ERC20 tokens on the sender side (Ethereum) and mint the equivalent value on the receiver side (Stacks).

Price structure and Constrains: For the user value to stay below the total user journey cost , fees implied will comprise the blockchain transaction fees(Ethereum = 90gwei($5) ), Stacks fee and a minimal swap fee(0.2% from the amount) before.

Final Solution: Our final proposed solution will depend on the findings of this research project and following discussions with engineers at Reserve, Stacks, Arkadiko and CryptoMate’s team. Current viable alternatives are:

Tools to be used:

Conclusions: A report will be presented to the Foundation aiming to provide more insights about the feasibility and market potential of a bridge solution. And a summary of the following metrics will be delivered:

ANNEX

Mockup of stable coin transfer platform: Mockup new version.pdf

Platform’s User Journey

  1. User wants to swap 10 RSV for 9.98. sRSV
  2. User inputs the sender Ethereum wallet address and designates receiving Stacks wallet address
  3. User confirms that the input addresses on both blockchains are correct
  4. User deposits 10 RSV tokens into the ERC20-Lock smart contract
  5. Equivalent amount of sRSV is minted and deposited into the designated receiving Stacks Wallet Address.
RaffiSapire commented 3 years ago

Thanks @Mate-Swap. This is a good update to share with folks. Would you be able to do a research call with the community sometime this week to share your findings? This context you've shared, coupled with a call discussing your findings with the community, will unlock the next milestone 2. You could submit an event here: https://stacks.org/#events, share it on discord, and we can help let folks know about it coming up. It could be in the hangout channel in discord, or if you want to make it a video call, that also works! Would be great to maybe have @philipdesmedt join and share how this research impacts Arkadiko would be interesting too. Let us know if we can help in the discord channel. Once some sort of shareback call with the community is done this will complete M1 and we'll disburse M2.

az-journal commented 3 years ago

@RaffiSapire , hi there. thank you for the inputs, we have scheduled a research call to take place on discord hangout for tomorrow 15:00 UTC and submitted it as well on stacks events(https://events.time.ly/vcky8q9/42327034). @philipdesmedt would be great if you, or somebody from Arkadiko team could join us there as well.

314159265359879 commented 3 years ago

Thanks for the informative meeting just now on Discord.

jennymith commented 3 years ago

@RaffiSapire , hi there. thank you for the inputs, we have scheduled a research call to take place on discord hangout for tomorrow 15:00 UTC and submitted it as well on stacks events(https://events.time.ly/vcky8q9/42327034). @philipdesmedt would be great if you, or somebody from Arkadiko team could join us there as well.

Hey @az-journal thanks for the update. I have an email thread going with your team as well and have suggested there that we schedule another call for the community since the last one was hosted on such short notice (it was also not added to the community calendar). It was also a national holiday so many community members were unable to join.

I think the feedback you got from yesterday's call was a great start and we can definitely build on it by getting more participation! Let's work on scheduling and promoting another call in the next week and make sure we get at least 5–10 community members to join. To be clear, I don't think this should block funding for M2. To the grant review committee: I would recommend that we release funding for M2 as soon as the next call is scheduled.

Mate-Swap commented 3 years ago

Dear all, @RaffiSapire @jennymith @ Regarding Monday's event, Even though there weren’t many participants involved in our first community call, we still however received some valuable feedback from @314159265359879 (Werner), and Taylor the Lead protocol Engineer at Reserve. Werner shared his inputs regarding the automation of the process, such as Ethereum and Stacks wallet connections, that we will take in consideration on the later stages upon successful integration of all the research aspects. Taylor had some valuable inputs on the technical side of the bridge after he examined our early drafts and feature list on the ERC20 Smart contract for Token Lock, some suggestion were made to the smart contract as well as explained some of the potential downsides we might experience. To name a few: (i) we’ll need to provide allowances, ie do an approval, on the ERC20 before calling deposit, which is a slight nuisance but acceptable, and (ii) we can't stop someone from transferring ERC20 balances to the contract directly by bypassing the deposit function. This makes the events less useful, though it could still make sense to use them anyway, as one deposit type could be "supported" while the other would not be.

We have also scheduled another community call with more time in advance so to present new findings and discuss even further. https://events.time.ly/vcky8q9/42353904. Would be great if @philipdesmedt or one of your team members could join us.

philiphacks commented 3 years ago

@Mate-Swap Great! I will be there!

jennymith commented 3 years ago

Dear all, @RaffiSapire @jennymith @ Regarding Monday's event, Even though there weren’t many participants involved in our first community call, we still however received some valuable feedback from @314159265359879 (Werner), and Taylor the Lead protocol Engineer at Reserve. Werner shared his inputs regarding the automation of the process, such as Ethereum and Stacks wallet connections, that we will take in consideration on the later stages upon successful integration of all the research aspects. Taylor had some valuable inputs on the technical side of the bridge after he examined our early drafts and feature list on the ERC20 Smart contract for Token Lock, some suggestion were made to the smart contract as well as explained some of the potential downsides we might experience. To name a few: (i) we’ll need to provide allowances, ie do an approval, on the ERC20 before calling deposit, which is a slight nuisance but acceptable, and (ii) we can't stop someone from transferring ERC20 balances to the contract directly by bypassing the deposit function. This makes the events less useful, though it could still make sense to use them anyway, as one deposit type could be "supported" while the other would not be.

We have also scheduled another community call with more time in advance so to present new findings and discuss even further. https://events.time.ly/vcky8q9/42353904. Would be great if @philipdesmedt or one of your team members could join us.

Thanks for scheduling another call! Can you please submit the details for your event here so that it can be published on the actual community events calendar? I'll continue to connect with you over email to help you promote the event to get more participants.

jennymith commented 3 years ago

We'll be disbursing M2 soon cc: @jhammond2012.

jennymith commented 3 years ago

Hi @az-journal, I see that your community call is coming up and would love to help you get as many participants to join as possible.

Does CryptoMate have a Twitter account? If you tweet out the details of this community call from the CryptoMate account and tag Stacks, then I can get your event retweeted to more community members. Please feel free send me the link to your tweet over email.

az-journal commented 3 years ago

Hi @jennymith ! thank you for the support , here is the link to the tweet Stacks was tagged there as well. Appreciate if you could share https://twitter.com/CryptoMate_defi/status/1437783215431946251

jennymith commented 3 years ago

Hi @az-journal how did the event go yesterday? Were you able to record the meeting? If so, can you share it here. Hope it went well and that you got a good turnout!

az-journal commented 3 years ago

Hi @jennymith the event was a success, we had a bigger audience this time and some valuable inputs from Arkadiko team. I'm attaching the recording here. Just a note: the introduction part is missing, but the community feedback is there.

https://user-images.githubusercontent.com/84379046/134297045-ad9b8cb8-a253-489d-842a-87bed7d52809.mp4

RaffiSapire commented 3 years ago

Thank you for your work here and taking time to get feedback from the Community. We are disbursing M2 and look forward to reviewing.

jennymith commented 3 years ago

Hi @Mate-Swap can you please comment '!M2_Complete' and share links to where we can check out the smart contract? The committee will have to review completion of M2 first before disbursing the next milestone.

az-journal commented 3 years ago

hi @jennymith , please find the clarity contract here https://github.com/Mate-Repo/lock-contract-clarity/tree/dev and the one in solidity here https://github.com/az-journal/LockContract/blob/main/contracts/Lock.sol

jennymith commented 3 years ago

@az-journal Please comment '!M2_Complete'.

stx-grant-bot[bot] commented 3 years ago

Sorry. Only author can changes status to Complete.

jennymith commented 3 years ago

@az-journal Can you also update these milestones with their estimated budgets?

M2.1: Set up DAPP Landing page and interaction with ERC-20. M2.2: Set up SIP10 contract for Minting and Burning tokens with the necessary security and control permissions on TestNet. M2.3 Set up DAPP interactions with SIP10. M3.1: Set up Swap pool between SIP10 and USDA. M3.2:Set up DAPP interaction with Swap Pool. M4: Audit of smart contracts and systems

Mate-Swap commented 3 years ago

!M2_Complete

stx-grant-bot[bot] commented 3 years ago

This milestone is already under review.

Mate-Swap commented 3 years ago

@jennymith Estimated Budget edited into the original Project description.

jennymith commented 3 years ago

hi @jennymith , please find the clarity contract here https://github.com/Mate-Repo/lock-contract-clarity/tree/dev and the one in solidity here https://github.com/az-journal/LockContract/blob/main/contracts/Lock.sol

Thanks for sharing these contracts, @az-journal! Tagging @MarvinJanssen to share some technical feedback. We had some questions on the way you decided to structure the contract, particularly around how much control the original owner has over the funds.

az-journal commented 3 years ago

hi @jennymith the deployer wallet (core team wallet) would be the admin in the ERC20 contract , we are looking into integrating a function where funds can only be withdrawn to the the wallet that has deposited it. however that is still under discussion , since that leads to certain limitations.

jcnelson commented 3 years ago

hi @jennymith the deployer wallet (core team wallet) would be the admin in the ERC20 contract

What assurance do users have that the admin won't just take the tokens and run? There doesn't seem to be anything stopping that from happening in the code.

we are looking into integrating a function where funds can only be withdrawn to the the wallet that has deposited it. however that is still under discussion , since that leads to certain limitations.

The depositor can authorize another address to withdraw up to a certain amount of tokens per unit of time in order to carry out transfers. Also, the smart contract could make it so a withdrawal-in-progress can be reverted by the depositor within a given window of time for any reason. With these two primitives, you could reduce trust in the operator by implementing an authorized swap protocol between Ethereum and Stacks: the amount swapped is agreed upon off-chain and made known to the operator in advance so the operator can carry out the exchange. Both the Ethereum and Stacks parties would see the exchange happen, and if anything is wrong with it, either one can cancel the exchange on their end of the bridge, causing the other party to cancel theirs (or the operator to do so on their behalf).

az-journal commented 3 years ago

Hey @jcnelson we have validated this idea in our community calls. Regarding the solution proposed, as this is a Research grant, the idea is not to make the development side too complex, to focus in the user experience mostly, and gather usage data. Once we successfully validate the need and the best approach for this kind of solutions, we will submit a new Grant project to develop it fully non custodial

Mate-Swap commented 3 years ago

Dear @jennymith , waiting on your comments to start M2

jennymith commented 3 years ago

Hi @az-journal we'll be reviewing your response this evening. As a reminder, this grant came with the condition that we would only move forward with milestones 2, 3, etc. if milestone 1 is successfully completed. So, in addition to reviewing your response to @jcnelson's feedback, we'll also be evaluating the progress of this grant overall to determine whether it makes sense to disburse milestone 2. Thanks for your patience!

jennymith commented 2 years ago

Dear @jennymith , waiting on your comments to start M2

Apologies @Mate-Swap, it looks like our original feedback was never submitted. After much review, we have decided not to move forward with M2. We understand that this was a research proposal intended to explore the possibility of a bridge, and we appreciate the work that you have put in, but it seems that this research has not yielded many meaningful learnings over the past 5 months.

Based on previous discussions on this thread and over several calls, we were expecting to learn more about the different ways to implement this bridge. Again, we understand that this was research, so there isn't a definitive right or wrong answer, but research is also meant to demonstrate the limits of what is possible. For example, there was no discussion of what the algorithm for this bridge could look like.

Furthermore, and perhaps, most importantly, we were not assured that users of this bridge would be thoroughly protected. In reference to Jude's last comment, we were not given a very comprehensive answer regarding the possibility that the bridge admin could simply take the money and leave.

For these reasons, we will be closing this grant. Although we were unable to continue working with you on this project, we encourage you to reflect on this feedback and apply it to any future grants you plan to submit. We'd love to continue supporting any of your work that makes sense for the Stacks community.