After much deliberation and careful thought Neptune Mutual decided to close the cover marketplaces.
After much deliberation and careful thought Neptune Mutual decided to close the cover marketplaces. Below the reasons for the decision as well as what it means for the community.
The marketplaces will be closed using an emergency withdrawal process whereby the liquidity provided to cover pools by LPs will be returned to the wallet addresses from which the liquidity was supplied. In addition to protecting cover pool LPs, there will also be refunds to all cover policy purchasers with an existing and valid policy who have paid over 10 USD in policy fees in one transaction.
For veNPM holders, please fill out this form to receive a refund for your veNPM to NPM conversion penalty.
From the end of June there will no longer be NPM emission incentives for LPs i.e. Epoch 3 of the liquidity gauge emissions will be canceled.
Unused funds raised from financial backers will be returned to those backers; this includes DEX liquidity that has now been removed from SushiSwap and Uniswap. A small amount of liquidity on SushiSwap Arbitrum has been left to enable a minimum amount of NPM trading.
The protocol will be open sourced, and become a true public good. Enabling the community to fork the code developed by the Neptune Mutual team such that others might use the existing resources to further our mission to make the blockchain space better protected against smart contracts and other risks.
There are numerous factors that have led to this difficult decision, some of which are external factors which are uncontrollable or unforeseeable. A few factors summarized below:
“Given Neptune Mutual’s Tier 1 backers, why have you not listed on a top CEX?”
This is perhaps one of the most frequently asked questions. In short, the answer is that for a variety of reasons Neptune Mutual was not able to achieve the diverse set of performance metrics (community size and engagement, marketplace user activity, DEX 24 hour trading volume, TVL growth etc.) required to list on top tier CEX. The CEXs that are prepared to list NPM token do not have the depth of liquidity or breadth of user-base to offer good prospects for NPM tokenholders.
“Why has Neptune Mutual not achieved strong growth?”
It is tempting to take a shortcut to answer this question by pointing a finger at one specific factor, but the reality is that there are many contributing factors. A few summarized below:
Since the outset of engaging with the community we have endeavored to highlight the need for DeFiInsurance; Neptune Mutual built a comprehensive dataset of on-chain hacks available, anywhere, and each week we highlight the many millions of dollars that are stolen as a result of smart contract hacks. Despite this, we have consistently been confronted by projects unwilling to spin up cover pools in our marketplace because of the sentiment that audits of their code are sufficient to persuade their community that their protocol is safe. Less than 0.3% of all digital assets are protected with some form of DeFiInsurance, and yet despite all the media reports of hacks, the conference discussions about the importance of governance or CEX proof-of-reserves, it continues to be the case that it is extremely difficult to get media attention to focus on the need for a fast and efficient means of mitigating smart contract risk.
A variety of approaches have been taken by different DeFiInsurance protocols to address this, from attending multiple conferences throughout the year and significant marketing spend, to the leaner approach that Neptune Mutual took (in part as a result of the bear market in 2023). What can be said is that no DeFiInsurance protocol has managed to achieve significant growth over the last 18 months, sadly the overall TVL of the sector has shrunk a lot.
For all the reasons above, at this moment the best course of action is no longer to double-down on investing in growth, but rather to refund unused capital and close the marketplaces.
The consequences are very tough for the Neptune Mutual team who have spent the past 3 years of their time on the mission to facilitate safer environments within DeFi. The team has delivered products according to the roadmap and the fact that the protocol was never hacked, despite attempts being made on the darkweb, is testament to the expertise, passion and absolute focus on security. The team survived the FTX and UST crisis unscathed, and believed that the continued growth in hacks would lead to growth in the demand for a good solution to mitigate these risks, but sadly, as can be seen right across the DeFiInsurance category, this is not yet in sight. So we would like to thank the team for all the dedication, skill and passion invested into the Neptune Mutual project since the outset.
The team will open source the protocol, including blockchain indexing protocol (subgraph alternative), frontend, middleware, database, and backend code, to make it a true public good. This will allow anyone to fork the code and create covers by defining parameters and premium ranges, potentially leading to innovative covers and organic usage.
The Discord channel will be closed to reduce the risk of phishing and other types of cyber attack, any questions / queries will be responded to in the Telegram channel.
We want to take this final opportunity to thank you all for your support.
Neptune Mutual will contact only its financial backers, with whom a signed agreement exists, in relation to next steps (i.e. holding NPM tokens does not qualify you for any form of refund). Contact will be made only from a neptunemutual.com domain email address so please check the source of any email you may receive very carefully. Please ignore any messages from any other email or social media accounts in relation to token/cash refunds.
Learn how Ethereum smart contract audit increases security and trust of DeFi apps
Ethereum smart contract audits allow decentralized protocol teams to focus their attention on making their protocol secure, robust, safe, and resilient. In the long term, audits help save time, money, and credibility by allowing any security flaws or bugs to be discovered and fixed before the protocol is deployed on the mainnet. Audits of smart contracts contribute to greater community confidence in a project's team and leadership.
This blog post will talk about a number of ways to improve the quality of smart contract code, such as how important both internal and external security audits are, how there are many ways to attack a web3 application, and more.
Writing high-quality Ethereum smart contract code is necessary for technical teams to meet their goals. To ensure that Ethereum smart contracts meet these standards, it is critical to first measure the quality of the code and detect, rectify, and minimize mistakes and bugs as much as possible.
One way to do this is by focusing on what is called "code integrity," which measures the quality of code. Code integrity is influenced by the extent to which the Solidity smart contract code has been unit tested and integration tested. The most significant advantage of unit testing is that it aids in the measurement of code quality via code coverage. The amount of code run during automated testing is referred to as "code coverage."
When there is a high level of code coverage, developers feel confident that they have covered the majority of the code in an automated manner. If developers modify any logic and introduce flaws in the future, existing unit tests will fail, and code coverage will suffer as a consequence. This allows developers to detect flaws before they silently creep into production.
As a result, tests and code coverage enable decentralized projects to produce better products with fewer defects in less time. On the other hand, projects that don't pay attention to code integrity will have delays in the development, QA, and release phases, which will lead to a product with more bugs because of time constraints and a poor understanding of their own codebase.
The following are some of the most prominent Ethereum smart contract frameworks with built-in unit testing tools:
Another way to enhance code integrity is through smart contract fuzzing. The smart contract fuzzing technique is used to test the security and integrity of smart contracts by subjecting them to a large number of random inputs and examining the results for errors or weaknesses. Smart contract fuzzing is a method for finding and addressing problems in smart contracts prior to their deployment on a blockchain. It is an approach for automated testing that may uncover potential security problems and shortcomings in smart contracts. By repeatedly conducting these tests, smart contract fuzzing helps identify weaknesses and gaps in code that would not have been detected using traditional testing methodologies.
Among the noteworthy Ethereum smart contract fuzzing tools are:
A smart contract audit is a process of analyzing a project’s smart contract source codes to identify security vulnerabilities, control weaknesses, bugs, and other programming problems. It is also used to evaluate the effectiveness of the project's current security measures.
Smart contract audits not only consider security aspects, but also business logic. Similar to a regular financial audit, smart contract audits involve a thorough examination of the Solidity source code and project documentation and whitepaper.
Blockchains are notoriously difficult to hack, but smart contracts are not. As such, code security audits for smart contracts include a detailed inspection of the Solidity source code, architecture, tools, and core technologies to ensure the overall security and performance of the decentralized application.
Even though blockchain technology offers a lot of exciting opportunities, it also remains one of the most targeted by hackers, scammers, and other bad-faith factors. Smart contracts, in particular, have been badly affected by malicious attacks, which is why protocol teams and developers must start taking security audits seriously.
At the moment, smart contract security audit is the most integral aspect of any decentralized app’s security. It’s one thing to vet your own code for possible errors and security issues, but it makes more sense to get a couple of experts to independently verify that your code is up to par with today’s security standards.
Take a look at some recent high-profile hacks.
In August 2021, DeFi platform PolyNetwork suffered a breach due to smart contracts vulnerabilities and as a result lost over $600 million.
Smart contract audits alone do not guarantee that a protocol is hack-proof. Consider the case of the 2021 MonoX Protocol hack, which resulted in the loss of over $31 million, despite the fact that the protocol was audited three times that year.
Still, it is infinitely better to conduct even one code security audit than to not conduct any. Here’s why.
Identifying vulnerabilities: An audit can help identify security vulnerabilities and weaknesses in the code, which can be exploited by attackers. Identifying these vulnerabilities early on allows organizations to fix them before they can be exploited.
Improving security: By conducting a code security audit, organizations can ensure that their code meets industry standards and best practices for security. This can help to reduce the risk of security breaches and protect against potential attacks.
Enhancing code quality: A code security audit can also help to improve the overall quality of the code by identifying issues such as outdated tools and practices, and making recommendations for improvement.
Ensuring compliance: Some industries, such as financial services, may have specific regulatory requirements for code security. A code security audit can help organizations ensure that their code meets these requirements.
Protecting the reputation of the organization: Security breaches can be costly and damaging to an organization's reputation. Conducting a code security audit can help to prevent such breaches and protect the reputation of the organization.
Top 7 DeFi Protocol Internal Security Audit Checklist#
To effectively protect your decentralized app or DeFi protocol from cyber threats, it is important to consider both smart contract audits and full application security measures. Here are the top seven internal security checks that you should consider implementing:
Understand the type of blockchain platform: Because various blockchain platforms have distinct security concerns, it is critical to evaluate the platform in use.
Check the architecture and design of the system: The system's architecture and design may have a substantial influence on its security. An internal audit should take into account the system's general design and architecture, including how data is stored, processed, and safeguarded.
Smart contract code: This involves inspecting the smart contract code for security flaws and verifying that smart contracts are correctly implemented and adhere to best practices such as SWC Registry. The scope must define the degree to which auditors must evaluate code, for example, whether they must review dependencies in libraries of code that may have been utilized in the code; see following point.
External dependencies: An audit should consider any external dependencies that the system relies on, including third-party smart contracts, libraries and APIs, and assess the security of these dependencies.
Access controls: An audit should consider the access controls in place to ensure that only authorized users can access the system. This includes reviewing the smart contract system's access control list, authorization mechanisms, as well as any policies and procedures for granting access.
Network and infrastructure security: An internal audit should also consider the security of the network and infrastructure on which the decentralized application relies upon, including the security of servers, databases, and other components.
Use a web application firewall (WAF) to protect against common web attacks. Implement proper incident response and disaster recovery procedures to ensure that the app can recover from security breaches and other disasters. Verify that all external libraries and dependencies are up-to-date and secure. Update your application to work with a strict content security policy.
Compliance with relevant regulations and standards: Depending on the industry and jurisdiction in which the system will be used, there may be specific regulations and standards that the system must comply with. An internal audit should consider these requirements and ensure that the system meets them.
Supply chain attack: An attacker may attempt to compromise a web application by inserting a malicious package into the application's dependencies. The malicious package might be executed when the program is developed and deployed, giving the attacker access to the system or the chance to steal private information as such environment variables. To avoid such threats, it is critical for businesses to safeguard their supply chains and to frequently review and update their dependencies.
Port scanning: A method used by hackers to discover open ports on a server and perhaps gain access to it is called port scanning. You may use a firewall to restrict unauthorized traffic, stop unused services and ports, utilize secure protocols and encryption, and update and patch your systems often to avoid port scanning. Monitoring your network for unusual behavior and routinely scanning for vulnerabilities is also a smart idea.
DNS hijacking: In a DNS hijacking cyberattack, a malicious server receives traffic that was meant for a genuine website. Use a trustworthy DNS provider, activate DNSSEC (Domain Name System Security Extensions) to protect DNS communication, and use firewalls and intrusion detection systems to block suspicious traffic if you want to avoid DNS hijacking.
Script injection: By injecting malicious code into a website or application, an attacker may steal sensitive data or carry out evil deeds. This method is known as script injection. You may use input sanitization to stop malicious code from being introduced into your application, preventing script injection attacks. In order to stop the browser from perceiving injected code as genuine, you may also employ output encoding.
SQL injection: An attack known as SQL injection involves inserting malicious code into a database query. This code may be used to access confidential data or carry out harmful deeds. Similar attacks against MongoDB databases include MongoDB injection. You may use input sanitization to stop malicious code from being introduced into your database queries and install suitable authentication and permission rules to prevent unauthorized access to stop these kinds of injection attacks. To avoid vulnerabilities, you may also employ prepared statements and parameterized queries.
Cross-site scripting (XSS): Cross-site scripting (XSS) is a kind of injection attack in which a hacker inserts malicious code into a website. This code may be used to carry out harmful acts or steal sensitive data from site visitors or change the destination wallet address for ERC20 approvals to later steal user’s tokens. You may establish a content security policy (CSP) to designate which sources are authorized to load content and additionally utilize input sanitization to stop malicious code from being loaded into your website to stop XSS attacks. To stop the browser from viewing injected code as genuine, you may alternatively employ output encoding.
Remote file inclusion (RFI): A malicious file is injected into a website in this kind of injection attack, which may be used to perform damaging actions or access confidential data. Make sure your web server, application, and content management system are all secure to prevent this kind of intrusion. Making a strict content security policy that only permits trusted and whitelisted domains to serve scripts, files, and contents in your website or web application should be encouraged. Installing packages or dependencies should be done with caution. Adding plugins or scripts from unvetted sources should also be avoided.
Directory traversal: Using the method known as directory traversal, an attacker may access files and folders that are beyond the scope of the web application. You may appropriately limit access to sensitive files and folders to stop directory traversal attacks. Use an intelligent WAF as well to recognize and deny these requests before they reach the server. Additionally, execute a strict query string sanitization and predefine all potential query string schemas for each route path.
Man-in-the-middle (MITM) attacks: Threats known as "man-in-the-middle" (MITM) attacks occur when an attacker intercepts communication between two parties and has the ability to change or monitor the communication. Use secure protocols like HTTPS and TLS, implement certificate pinning to stop attackers from using bogus certificates, and encrypt communication to protect it from MITM attacks. A WAF (web application firewall) may be used to stop suspicious traffic, and frequent system updates and patches can help to avoid vulnerabilities.
Denial of service (DoS) attacks: Attacks known as denial of service (DoS) occur when an attacker floods a server or network with traffic, rendering it inaccessible to authorized users. You may use a firewall to block suspicious traffic, rate limiting to stop excessive requests, and effective authentication and permission rules to stop unauthorized access to stop DoS attacks. In order to avoid vulnerabilities, you may also periodically update and patch your systems. A load balancer can also be helpful to divide traffic across many servers.
Top 5 DeFi Protocol Internal Code Audit Methodologies#
There are a number of testing tools and methodologies available for internal code security auditing, including:
Static application security testing (SAST) – Examines source code in its resting state to detect weaknesses or issues that can lead to security vulnerabilities.
Dynamic application security testing (DAST) – Detects conditions that indicate security vulnerabilities in the source code in its running state.
Software Composition Analysis (SCA) – Identify vulnerabilities in common components, including open-source direct and indirect dependencies.
Interactive Application Security Testing (IAST) and Hybrid Tools – Use a combination of static and dynamic analysis techniques to test known vulnerabilities in the source code and determine whether they are actually exploitable in the running application.
Fuzzing, also known as fuzz testing, is a type of software testing that involves providing invalid, unexpected, or random input to a program in order to uncover security vulnerabilities and other bugs. Fuzzing is often used to audit smart contract code, as it can help to identify issues that might not be discovered through traditional testing methods.
To conduct a fuzz test, a developer creates a "fuzzer" program that generates random input for the smart contract and sends it to the contract for execution. The fuzzer then monitors the contract's behavior and looks for any unusual or unexpected behavior, such as crashes or error messages. If the contract exhibits such behavior, it may indicate a security vulnerability or other issue that needs to be addressed.
Fuzzing is an effective way to test smart contract code because it can uncover issues that are difficult to find through manual testing. It is especially useful for identifying vulnerabilities that might be exploited by attackers, as it helps to uncover issues that might not be apparent through normal usage of the contract.
Code audits are just one aspect of security and don’t necessarily address the full spectrum of attack vectors that might also include phishing, front end attacks and social engineering.
There are different views about what projects can do to improve confidence in the audits that they undertake (see Cointelegraph article), but ultimately it is the projects themselves that need to take responsibility for ensuring a security culture within their organizations.
Neptune Mutual's Role in Mitigating Security Risk#
We launched the Neptune Mutual parametric cover marketplace on the Ethereum blockchain in November.
DeFi, CeFi and Metaverse projects can apply to Neptune Mutual to create their own cover pools and design the terms of their own cover products to provide cover for their respective communities.
The cover policies found in the Neptune Mutual marketplace mitigate risk, however in addition to this Neptune Mutual can work with cover creators / projects in order to help them improve their overall cybersecurity and minimize the risk of incidents.
Any blockchain project that is serious about its security must have its source code audited. Due to the sheer number and scale of attacks on digital assets many users now check projects security track-record, including whether code audits have been completed and by whom, prior to interacting with the protocol.
At Neptune Mutual we undertook several external audits in 2022 prior to launching the protocol on mainnet. The first was conducted in July by leading security audit firm BockSec. Another was conducted by OpenZeppelin and published in October.
Audits are an important element of improving project security, however to mitigate risk, users really need to have a cover policy in place to protect their digital assets.