Giter VIP home page Giter VIP logo

nibiruchain / nibiru Goto Github PK

View Code? Open in Web Editor NEW
196.0 51.0 324.0 61.83 MB

Nibiru Chain: The breakthrough smart contract platform ushering in the next era of money. Nibiru powers an ecosystem of dApps including perps, RWAs, and more.

Home Page: https://nibiru.fi

License: Apache License 2.0

Go 90.89% Makefile 0.13% Dockerfile 0.02% Shell 0.28% Python 0.12% Just 0.01% JavaScript 2.86% HTML 0.07% Assembly 0.61% Solidity 0.10% C 4.35% M4 0.17% Sage 0.19% Java 0.20%
cosmos-sdk cryptocurrency nibiru-chain blockchain cosmwasm cometbft golang

nibiru's Introduction

Nibiru Chain

Go Reference Nibiru Test workflow Nibiru Test workflow GitHub Discord Badge

Nibiru Chain is a breakthrough Layer 1 blockchain and smart contract ecosystem providing superior throughput, improved security, and a high-performance EVM execution layer. Nibiru aims to be the most developer-friendly and user-friendly smart contract ecosystem, leading the charge toward mainstream Web3 adoption by innovating at each layer of the stack: dApp development, scalable blockchain data indexing, consensus optimizations, a comprehensive developer toolkit, and composability across multiple VMs.

⚙️ — Documentation

💬 — Community

If you have questions or concerns, feel free to connect with a developer or community member in the Nibiru Discord. We also have active communities on Twitter and Telegram.

Discord Tweet Telegram

🧱 — Components of Nibiru

Module Description
Wasm Implements the execution environment for WebAssembly (WASM) smart contracts. CosmWasm smart contracts are Rust-based, Wasm smart contracts built for enhanced security, performance, and interoperability. See our CosmWasm sandbox monorepo (cw-nibiru) for the protocol's core smart contracts.
EVM Implements Nibiru EVM, which manages an Ethereum Virtual Machine (EVM) state database and enables the execution of Ethereum smart contracts. Nibiru EVM is an extension of "geth" along with "web3" and "eth" JSON-RPC methods.
Devgas The devgas module of Nibiru Chain shares contract execution fees with smart contract developers. This aims to increase the adoption of Nibiru by offering CosmWasm smart contract developers a direct source of income based on usage.
Epochs The epochs module allows other modules to set hooks to be called to execute code automatically on a period basis. For example, "once a week, starting at UTC-time = x". epochs creates a generalized epoch interface.
Inflation Implements the tokenomics for Nibiru.
Oracle Nibiru accurately prices assets using a native, system of decentralized oracles, and communicates with other Cosmos layer-1 chains using the Inter-Blockchain Communication (IBC) protocol. Nibi-Oracle handles the voting process for validators that act as oracles by updating data feeds.
Common Helper and utility functions to be utilized by other x/ modules.

Nibiru is built with the Cosmos-SDK on Tendermint Core consensus and communicates with other blockchain chains using the Inter-Blockchain Communication (IBC) protocol.


⛓️ — Building: make commands

Installation instructions for the nibid binary can be found in INSTALL.md.

Recommended minimum specs:

  • 2CPU, 4GB RAM, 100GB SSD
  • Unix system: MacOS or Ubuntu 18+

Nibid CLI

To simply access the nibid CLI, run:

make install

Usage instructions for the nibid CLI are available at docs.nibiru.fi/dev/cli and the Nibiru Module Reference.

Running a Local Node

On a fresh clone of the repo, simply run:

make localnet

and open another terminal.

Generate the protobufs

make proto-gen

Linter

We use the golangci-lint linter. Install it and run

golangci-lint run

at the root directory. You can also install the VSCode or Goland IDE plugins.

Multiple Nodes

Run the following commands to set up a local network of Docker containers running the chain.

make build-docker-nibidnode

make localnet-start

License

Unless a file notes otherwise, it will fall under the MIT License.

nibiru's People

Contributors

agentsmithmatrix avatar blocknovator avatar capneal avatar cgilbe27 avatar dependabot[bot] avatar fdymylja avatar helder-moreira avatar jgimeno avatar john-connor84 avatar k-yang avatar kai0x avatar matthiasmatt avatar mdarblade avatar nibiruheisenberg avatar omahs avatar onikonychev avatar segfaultd avatar shuoer86 avatar superfiredoge avatar testinginprod avatar th3nyst1c avatar tj327 avatar unique-divine avatar vimdiesel-cosmos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nibiru's Issues

cli: matrixd keys add fails

OS information

cat /etc/os-release

NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"

Description of the error

I regenerated the binaries for the CLI using make install. make localnet also runs fine.

matrixd keys list returns [], so I needed to make a key to mint and burn stablecoins.

On @matthiasmatt's machine, this works fine with a command like matrixd keys add test and populates the key list. On my machine, I'm getting

Error: No such interface “org.freedesktop.DBus.Properties” on object at path /

References


Solution

The solution is to use a different keyring backend. For local development, it's sufficient to simply append

--keyring-backend=test

to the end of any command that would've raised this error.

Transaction Fee on mint

How fees on MintStable and BurnStable work and where they're distributed

When a mint or burn transaction fee is taken out, it goes to two places: the Treasury and the Ecosystem Fund (StableEF)

feat(dex): single asset join

ability for user to join with a single asset

  • do a single asset swap under the hood
  • calculate maximum number of lp shares factoring in the price impact
  • add single asset joins to the remaining coins after a multi-asset join

refactor(stablecoin): (refactor-idea) You can extract the fields from the MsgBurnStable proto and pass them individually into Keeper.BurnStable, so that the function signature doesn't have ugly proto messages when its imported to other modules.

(refactor-idea) You can extract the fields from the MsgBurnStable proto and pass them individually into Keeper.BurnStable, so that the function signature doesn't have ugly proto messages when its imported to other modules.

Originally posted by @MatrixHeisenberg in #61 (comment)

You can have the keeper functions be proto-less so that you can import them to other modules without using Msg* objects.

bug(stablecoin): Should also check that the module account has enough COLL to send to the user. I'm not sure what the proper error handling would be in this case, so maybe we'd have to panic(err).

Should also check that the module account has enough COLL to send to the user. I'm not sure what the proper error handling would be in this case, so maybe we'd have to panic(err).

@VimDiesel-Cosmos do you have any idea on what we should do in this case?

Originally posted by @MatrixHeisenberg in #61 (comment)

feat(dex): track total liquidity

Add ability for the dex module to track and update the total liquidity in the dex.

  • read specific denom's liquidity
  • write specific denom's liquidity
  • read all liquidity
  • write all liquidity
  • add liquidity
  • remove liquidity

Define AMM interface

Define the AMM interface so we can split the implementation in two groups, one for AMM the other for the clearing house.

Reserve Snapshot investigation

The Perpetual protocol has a concept called Reserve Snapshot. Not sure is this is something that is a consequence of using a Solidity smart contract, or is crucial to implement for the protocol to work.

Needs investigation.

feat(dex): implement pool weights

Liquidity pools should have target weights (even stableswap pools) because stableswap pools behave like constant product amm pools when the liquidity is too far off balance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.