Closed Darko-Ethernal closed 1 year ago
Any progress on this batboy? Contributors?
We are interested in this project and others like it.
Karadikid
This is such an exciting initiative by the Filecoin project! I really appreciate their commitment to supporting developers through the devgrants program. Creating a well-defined and comprehensive software development RFP is crucial for successful collaborations, and it's great to see the Filecoin community emphasizing this aspect. Kudos to the team for fostering innovation and providing the necessary resources for project growth.
@Darko-Ethernal, thank you for your proposal and for your patience with our review. We would be happy to consider supporting this project once we have made additional progress on our development road map (we anticipate four to seven months).
Please feel welcome to re-connect with our team at this time!
RFP Proposal: Filecoin Standard Actor Library
Name of Project: Filecoin Standard Actor Library
Link to RFP: https://github.com/filecoin-project/devgrants/blob/master/rfps/fvm-rfp-ideas.md#collections--libraries-of-common-example-actors-for-native-fvm
RFP Category:
devtools-libraries
Proposer: Ethernal-Tech
Do you agree to open source all work you do on behalf of this RFP and dual-license under MIT and APACHE2 licenses?: Yes
Project Description
Abstract
We propose creating a modular library of foundational native actors for the Filecoin Virtual Machine (FVM) that are similar to OpenZeppelin Contracts for the Ethereum Virtual Machine (EVM). This library would provide reusable and well-audited components for implementing standards such as ERC20 and ERC1155, as well as common utilities and access control patterns. By using these secure building blocks, developers can build more advanced actors without having to start from scratch. Library will include a set of security best practices and testing tools to help developers avoid common pitfalls and vulnerabilities. It will also include documentation and example code to help developers understand how to use the contracts and integrate them into their own projects.
Motivations
Smart contracts represent a significant functionality of most blockchain systems. The concept of developing the Filecoin system is based on the application of smart contracts, and with the development of the FEVM machine, a unique integral system of Solidity and Wasm smart contracts was defined. In order to encourage the use of the Filecoin System and the development of smart contracts on it, the development of tools that facilitate the work of users of Smart Contracts on the Filecoin System is of great importance. That tool could be used both for the development of smart contracts and for their execution and testing. We are ready to be an important participant in the Filecoin community and have super experienced developers for this purpose.
Retrospective of existing tools (Inspirations)
The simplicity and efficiency of developing and verifying smart contracts on a blockchain increases the number of system users and trust in the ecosystem. This is why many blockchain systems have specialized frameworks or libraries for smart contracts. Some commonly used tools are: OpenZeppelin, OpenBrush, CosmWasm and Anchor. OpenZeppelin is an open source framework for building secure Solidity smart contracts on Ethereum and other EVM based blockchain platforms. It provides a library of reusable and secure smart contract components, as well as tools for testing and deploying them. OpenZeppelin is designed to help developers create secure and reliable smart contracts by using library with following patterns: Access control, Upgradable Smart Contracts, Security (Reentrance Guard, Pausable), and support for Fungible token standards (ERC20, ERC777), NonFungible Token Standards (ERC721), Multitoken standard(ERC1155). Its functionalities will be the main guidelines for the development of the Smart Contract tool for Filecoin. OpenBrush is a Rust library for smart contract development on ink! (analogous to OpenZeppelin for Solidity). It proposes and build full implementation of the first WebAssembly Polkadot token standard (PSP22: Fungible Token, PSP34: Non-Fungible Token, PSP1155: Multi-Token) and other useful libraries for wasm smart contract development (Access control, Pausable, Upgradeable contract, Reentrancy guard, etc.). Initial idea for wasm contract ecosystem in Polkadot environment was from Patract Labs (Metis library, Redspot) and Supercolony was following this path and created OpenBrush. Additionally, its tool -Sol2Ink enables easy migration from Solidity to Ink! and Rust. Cosmwasm is Rust library written as a module that can plug into the Cosmos SDK and provides quickly and easily add CosmWasm smart contract support to a Cosmos-based chain (deploy and execution), without adjusting existing logic. Additionally, Cosmwasm enables efficient smart contracts development by using libraries with design patterns for actors, messaging and support for cw token standards. Cosm wasm contracts uses templates that allow many possibilities, such as: swapped out or upgraded a contract, avoiding reentrancy attacks (by design architecture), multichain contracts, contract composition and testing. The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime. These programs are tested against Solana's implementation of Sealevel, solana-runtime, and deployed to its mainnet. This program defines a common implementation for Fungible and Non Fungible tokens. Using Solang (Solidity Compiler), you can compile smart contracts written in Solidity for Solana and Parity Substrate. It uses the llvm compiler framework to produce WebAssembly (WASM) or BPF contract code. As a result, the output is highly optimized, which saves you in gas costs or compute units. Anchor is a framework providing several developer tools for writing smart contracts. Its goal is to provide convenient developer tools for writing smart contracts compatible with the Solana chain. Anchor could be a great inspiration with their technical architecture and implementation. They leverage Rust and macros to facilitate development of programs. The toolset testing is handled through JavaScript or Typescript.
Our Team
We are a group of university professors and with a group of super experienced developers we are working on the development of the following significant blockchain projects (website: ethernal.tech):
Our service
Deliverables
This project is the initial step of creating Smart Contract Framework for native Actors in the Filecoin ecosystem. In order to achieve a high quality solution, we will explore the widely used Rust and wasm libraries in other well-known ecosystems (such as Solana, Cosmos, Polkadot). As result of obtained research, modular software architecture and design will be created to enable comfortable and efficient smart contract implementation.
Functional specification of this application is similar as the FVM technical board suggested. We are proposing a solution for Smart contract framework that will have following characteristics:
Access control modules- determining who has permission to perform actions and it is crucial in the realm of smart contracts. It plays a vital role in determining who can create tokens, cast votes on proposals, halt transfers and more. It is imperative to have access control to prevent unauthorized access and protect the system.
ERC-20 module - is a technical standard for Ethereum tokens. It defines a set of rules for issuing tokens on the Ethereum blockchain, including how new tokens can be created and transferred between addresses.
Security These modules aim to cover common security practices.
ERC1155 module - A standard interface for contracts that manage multiple token types. A single deployed contract may include any combination of fungible tokens, non-fungible tokens or other configurations (e.g. semi-fungible tokens).
After implementation of proposed functionalities we will prepare documentation and testing examples to help developers in efficient creation of smart contracts.
Milestones
Our idea is to analyze and investigate the functionalities of the mentioned tools and, based on the research, to design a tool that will enable efficient creation of smart contracts on the Filecoin system. In addition, we wish to share the positive experiences from the projects we worked on to the new tool. The project will be realized in three phases (as shown in the table):
*start date depends on approval, the team will be ready to start development within 10 working days from approval
Description
M1 - Design Specification
M2 - Smart Contract (Actor) library implementation
M3 - Testing
Stage 2 - Adding new features - wizard and contract extension
Stage 3 - Support and Maintenance
After release, the library will be regularly maintained and updated to fix any bugs that are found, but not adding new features. This involves responding to bug reports and working with users to address any issues.
Gantt chart
Figure – Roadmap diagram
Funding
Budget : MVP + Stage 2 + Support - (20% discount for first project with Filecoin)
MVP version:
195 workdays * 460 USD = 89700 USD
89700 USD – 20% = 71760 USD
Adding new features (Stage 2 - wizard and contract extension):
120 workdays * 460 USD = 55200 USD
55200 USD – 20% = 44160 USD
Support (Stage 3 - 2 month):
2 month 23 workdays 460 USD = 21160 USD
21160 USD – 20% = 16928 USD
Team
The importance of application usage in the Filecoin ecosystem dictates the need for a dedicated team. A team of three developers will be involved in development and maintenance of the tool. In order to obtain a better quality solution, our team is ready to actively communicate with significant Filecoin developers at every stage of the project. After the implementation of this project, we can maintain the developed solution and add new functionalities, and our team is planning to actively participate in proposing new FIP, discussions, proposals, etc.