Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssetHandover | Sample Dapp #118

Closed
AmarildoGrembi opened this issue Nov 21, 2022 · 7 comments
Closed

AssetHandover | Sample Dapp #118

AmarildoGrembi opened this issue Nov 21, 2022 · 7 comments

Comments

@AmarildoGrembi
Copy link

AmarildoGrembi commented Nov 21, 2022

AssetHandover | Sample Dapp

Grant Category

  • Open-source maintenance
  • Educational material

Description

The AssetHandover Dapp allows account holders to transfer ownership of their assets to a trusted recipient, at a specified release date.

Problem statement

One of the best ways to learn the fundamental concepts of a new technology, is by looking at the implementation of practical examples. So far, except the KittyItems repo, there is no other fully open source practical example out there with good documentation to showcase how you could leverage the various smart contracts and smart contract interfaces provided by the Flow team and integrate them to create a fully functional Dapp. At BuildSquad, to better familiarize ourselves with Flow and the fundamental concepts of Fungible/NonFungible tokens, we decided to start working on a side project which attempts to tackle a real-world problem. Our objective was to understand the internals of some smart contracts which are the building blocks for almost any type of Dapp on Flow. Namely the FungibleToken, NonFungibleToken smart contract interfaces, and some of their concrete implementations.
It helped a lot and we believe it will help many developers on the Flow ecosystem. We would like to open source its implementation, to serve the same purpose as kitty items.

  • Target audience: Web3 Builders aiming to build on Flow, who are:

    • Looking for practical examples on how to build a Dapp related to:
      • FungibleToken Interface
      • FungibleToken implementation (besides Flow token)
      • NonFungibleToken Interface
      • NonFungibleToken implementation
      • FungibleTokenSwitchboard
    • Looking to build a Dapp by linking the aforementioned integral parts together, while understanding their internals.
  • Evidence for the need:

    This sample app will cover partially or fully 4 items that are currently found on the wishlist, specifically:

    Generally speaking, it is a fully-functional open-source project that showcases functionalities for the above-mentioned items, while following best practices and providing documentation/explanation for the reason behind the implementation.

    We plan to post this proposal on the Flow forum so we could pinpoint more specifically what the developer ecosystem would prefer. Edited: we posted the proposal and currently awaiting feedback

Proposed solution

AssetHandover is a Dapp where account holders
can grant a recipient the ability to withdraw specific tokens that they own (both Fungible and NonFungible), at a future release date.
Each account can only declare one recipient, as this removes the complexity of handling race conditions upon withdrawals.
However, an account can be the recipient of multiple handovers.
The account holder can specify which Fungible tokens will be handed over, as well as a maximum amount for each token. It is also possible to specify which NonFungible tokens will be handed over, as well as a specific list of NFT IDs from each NFT Collection.
The above tokens are not locked for the account holder, meaning that they can still be utilized/transferred.
The recipient (or any other account) can attempt to withdraw them, at any given time, however this will only be successful after the release date has passed, and only for the authorized recipient.
One real-world scenario would be to create a digital "will" for one's account, or to simply add another account as a backup, in case the account holder loses access to his/her account, or is no longer able to interact with it.

More specifically the Dapp would include:

  • Backend:

    • AssetHandover smart contract (core functionality of the Dapp, following best practices and showcasing important concepts, such as access modifiers, admin functionality, token vault best practices, capabilities, withdrawals/deposits of FungibleToken and NonFungibleToken. etc.).
    • BlpToken smart contract (a custom FungibleToken implementation used to showcase the functionality of the Dapp, but also to showcase how you could create and mint your own FungibleToken).
    • Domains smart contract (a custom NonFungibleToken implementation used to showcase the functionality of the Dapp, but also to showcase how you could create and mint your NFTs, we decided to re-use the tutorial created by the amazing team at learnweb3.io so that anyone could also focus on this part if they like, we highly recommend it).
    • All the necessary scripts and transactions to facilitate the described functionality.
  • Frontend:

    We are thinking of two main personas, holder and recipient.

    The holder would be able to:

    • Login.
    • View owned assets (FlowToken/BlpToken/Domains for the time being).
    • Create a LockUp by specifying the recipient, release date and the assets.
    • View/Edit the LockUp.

    The recipient would be able to:

    • Login.
    • View assigned LockUps and some public information about it.
    • Withdraw specific assets or everything from each LockUp.

(* LockUp is the name of the resource which contains all the information about the asset handover for an account holder. As described above, the assets are not really locked, what is locked is the capability to withdraw them, given that it is only possible from the authorized recipient and after the release date.)

It is important to note that the Admin (account where the AssetHandover contract deployed) is responsible for adding more tokens to the custom registry of tokens allowed for handover.
This is done with a transaction, which removes the need for updating the smart contract itself.

Later on, we would like to include NFTCatalog and FungibleTokenMetadataViews smart contracts, in order to showcase the level of interoperability these contracts bring on Flow.

Impact

  • We believe that this Sample Dapp will have a positive impact for the wider Flow developer ecosystem and specifically new developers that aim to focus on Flow. They could use this example as a stepping stone for bootstrapping a specific solution or brainstorming. Generally speaking, this Dapp could be used as a stepping stone for every possible solution as it covers some of the most integral parts of core Flow functionalities.

Milestones and funding

We have already finished the backend side of things and would be keen to showcase it to every interested party. We would like to receive your support so we could finalize mostly the API & frontend and some details, so we could offer it to the community as the go-to educational material, alongside KittyItems.

Milestone Deliverables Timeline Risks USD proposal
1 - API & Frontend Fully functional, includes all the aforementioned functionalities. 6 weeks - 14,400
2 - Maintenance Keep the sample app fully functional and up to date with the latest upgrades and best practices. 3 months - 3,000
3 - Adoption 5 projects using the template repository 3 months - continuously, if needed - 3,000

Team

BuildSquad (a startup that launched recently) is a curated squad of web3 builders that aim to enrich the web3 ecosystem by developing products, tools, prototypes, and tutorials in the form of open-source public goods.

Name Role Bio Contact
Amarildo Co-Founder Software Engineer Experienced in full-stack web development and blockchain integrations (including Flow), and, a successful track record in early phase start-ups. Dreaming of full adoption since late 2018. [email protected] amarildo#3686
Matthias Co-Founder Regulatory lawyer advising major international DeFi and CeFi platforms on their market entry in Europe, product compliance, governance, and AML frameworks. [email protected] Matthias Winter#3465
@chrisackermann
Copy link

Hi @AmarildoGrembi, thanks for submitting this proposal! We're reviewing and will get back to you soon.

@AmarildoGrembi
Copy link
Author

Thanks, @chrisackermann. This proposal does not hinder us from working on the BackStore. Let me know if you have any questions or want to look at the backend we have built.

@AmarildoGrembi
Copy link
Author

Hello @chrisackermann, hope you are doing well. Quick update: Asset-Handover has now been open-sourced! It includes the full backend work, a thorough readme, and a detailed guide. We are currently showcasing our repository to the community and awaiting feedback.

@AmarildoGrembi
Copy link
Author

hello @chrisackermann - milestones updated. Thanks for the feedback!

@AmarildoGrembi
Copy link
Author

Just updated the Milestones and funding section with a cost estimation.

@chrisackermann
Copy link

Hi @AmarildoGrembi! Thanks for your patiences, we've approved this proposal and will be reaching out directly with next steps. Thanks!

@AmarildoGrembi
Copy link
Author

Thanks @chrisackermann! Excited to make the AssetHandover an integral part of the Flow dev journey, with the recent addition of Flow super commands this should definitely be one of the scaffold options (adding it on our todo list).

@chrisackermann chrisackermann removed their assignment Jul 3, 2023
@github-project-automation github-project-automation bot moved this to Closed (withdrawn or passed) in Grants Overview Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Closed (withdrawn or passed)
Development

No branches or pull requests

2 participants