• Stars
    star
    840
  • Rank 54,265 (Top 2 %)
  • Language
    JavaScript
  • License
    Other
  • Created almost 8 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bancor Protocol Contracts

These are the legacy (v2.1) contracts. Bancor V3 contracts are available at https://github.com/bancorprotocol/contracts-v3

Bancor Protocol Contracts v0.7

Docs NPM Package

Overview

The solidity version of the Bancor smart contracts is composed of many different components that work together to create the Bancor Network deployment.

The main contracts are the BancorNetwork contract (entry point to the system) and the different converter contracts (implementation of liquidity pools and their reserves).

Config

In order to use some plugins, API keys or custom network with secret config we need a config.json file. You can check hardhat.config.js for more details.

{
    "apiKeys": {
        "etherscan": ""
    },

    "networks": {
        "mainnet": {
            "url": ""
        }
    }
}

Upgradeability

All smart contract functions are public and all upgrades are opt-in. If significant improvements are made to the system a new version will be released. Token owners can choose between moving to the new system or staying in the old one. If possible, new versions will be backwards compatible and able to interact with the old versions.

Language

The terms “reserves” and “connectors” have the same meaning throughout Bancor’s smart contract code and documentation. “Reserve ratio” and “connector weight” are also used interchangeably. “Connector balance” refers to the token inventories held in a liquidity pool's reserves.

Warning

Bancor is a work in progress. Make sure you understand the risks before using it.

Testing

Prerequisites

  • node 12.20.0
  • yarn 1.22.0

Installation

  • yarn install

Verification

  • Verifying all the contracts:
    • yarn test (quick testing)
    • yarn coverage (full coverage)

Utilities

Collaborators

License

Bancor Protocol is open source and distributed under the Apache License v2.0

More Repositories

1

fastlane-bot

Fast Lane, an open-source arbitrage protocol, allows any user to perform arbitrage between Bancor ecosystem protocols and external exchanges and redirect arbitrage profits back to the protocol.
Jupyter Notebook
136
star
2

contracts-v3

Bancor is a decentralized trading and yield protocol. Its network of on-chain automated market makers (AMMs) supports instant token-to-token trades, as well as single-sided liquidity provision, auto-compounding rewards and 100% impermanent loss protection for any listed asset.
TypeScript
133
star
3

contracts_eos

Bancor Protocol Contracts for EOS
C++
113
star
4

carbon-contracts

Carbon is a fully decentralized protocol for automating on-chain trading strategies.
Solidity
105
star
5

webapp

Bancor Swap/Analytics webapp
TypeScript
32
star
6

bancor-arbitrage

TypeScript
25
star
7

carbon-app

TypeScript
25
star
8

carbon-simulator

This is an open-source python package developed by Bancor Research. It is meant to assist in the design, testing, and validating of the Carbon Protocol.
Jupyter Notebook
25
star
9

webapp-v3

Bancor V3 dApp
TypeScript
19
star
10

sdk

TypeScript
18
star
11

translations

13
star
12

token-governance

Solidity
9
star
13

carbon-sdk

TypeScript
8
star
14

staking-rewards

JavaScript
7
star
15

landing-page

Vue
7
star
16

vote.liquideos.com

LiquidEOS Voting Portal by Bancor
JavaScript
6
star
17

gov-contracts

Bancor Governance contracts
TypeScript
6
star
18

bancor-contracts-solidity-legacy

JavaScript
5
star
19

docs

JavaScript
4
star
20

carbon-simulator-binder

Jupyter Notebook
4
star
21

research

Bancor v3 python spec, simulator, and emulator library. This is an open-source python package developed by Bancor Research. It is meant to assist in the design, testing, and validating of Bancor v3 behavior.
Python
4
star
22

assets

3
star
23

economic-analysis

3
star
24

bntee

JavaScript
3
star
25

carbon-simulator-jupylite

Jupyter Notebook
3
star
26

etl

Databricks ETL for Bancor Protocol V3 dashboard analytics page.
Python
3
star
27

solidity-test-reports

2
star
28

contracts-eos-legacy

C++
2
star
29

tx-analyzer

JavaScript
2
star
30

airhodl

AirHodl (extending https://github.com/bancorprotocol/contracts)
JavaScript
2
star
31

airdrop

JavaScript
2
star
32

research-papers-2024

Jupyter Notebook
2
star
33

carbon-backend

TypeScript
1
star
34

webapp-v2

TypeScript
1
star
35

carbon-subgraph

TypeScript
1
star
36

analytics

ReactJS frontend app for Bancor Protocol V3 dashboard analytics page.
HTML
1
star