npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ensuro

v1.2.0

Published

Ensuro - Decentralized insurance protocol

Downloads

45

Readme

Ensuro - Decentralized capital for insurance

Ensuro is a decentralized protocol that manages the capital to support insurance products.

It allows liquidity providers (LPs) to deposit capital (using stable coins) that will fulfill solvency capital requirements of underwritten policies. This capital will be deposited in different pools (eTokens) according to provider's cashback period preferences. The capital will be locked for the duration of policies and will report profits to the LPs in the form of continous interest.

On the policy side, the policies are injected into the protocol by Risk Modules. Each risk module represent an Ensuro partner and a specific insurance product and is implemented with a smart contract (inherited from RiskModule). Each risk module has two responsabilities: pricing and policy resolution. Also, the RiskModule smart contract stores several parameters of the risk module such as Ensuro and Risk Module fees, capital allocation limits, etc.

Architecture Diagram

Contracts

Governance

The protocol uses three levels of access control, plus a guardian role. The roles are managed by the PolicyPoolConfig smart contract.

More info about governance in https://docs.google.com/spreadsheets/d/1LqlogRn8AlnLq1rPTd5UT7CJI3uc31PdBaxj4pX3mtE/edit?usp=sharing

Development

For coding the smart contracts the approach we took was prototyping initially in Python (see folder prototype), and later we coded in Solidity. The tests run the same test case both on the Python prototype code and the Solidity code. To adapt the Solidity code that is called using brownie, we have some glue code implemented in tests/wrappers.py.

The development environment is prepared for running inside a docker container defined in the Dockerfile. Also you can launch the docker environment using invoke tasks, but before you need to run pip install inv-py-docker-k8s-tasks to install a package with common tasks for coding inside docker. Then with inv start-dev you should be able to launch the docker environment. Then you can run specific tasks:

  • inv tests: runs the test suite
  • inv shell: opens a shell inside the docker container

Also the docker container is prepared to run hardhat. This will be used probably for deployment scripts and perhaps some aditional tests.

Code Audits

Contributing

Thank you for your interest in Ensuro! Head over to our Contributing Guidelines for instructions on how to sign our Contributors Agreement and get started with Ensuro!

Please note we have a Code of Conduct, please follow it in all your interactions with the project.

Authors

  • Guillermo M. Narvaja

License

The repository and all contributions are licensed under APACHE 2.0. Please review our LICENSE file.