• Stars
    star
    333
  • Rank 126,599 (Top 3 %)
  • Language
    Solidity
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated 6 months ago

Reviews

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

Repository Details

Balancer on the EVM

balancer pebbles logo

balancer

Balancer is an automated portfolio manager, liquidity provider, and price sensor.

Balancer turns the concept of an index fund on its head: instead of a paying fees to portfolio managers to rebalance your portfolio, you collect fees from traders, who rebalance your portfolio by following arbitrage opportunities.

Balancer is based on an N-dimensional invariant surface which is a generalization of the constant product formula described by Vitalik Buterin and proven viable by the popular Uniswap dapp.

🍂 Bronze Release 🍂

The 🍂Bronze Release🍂 is the first of 3 planned releases of the Balancer Protocol. Bronze emphasizes code clarity for audit and verification, and does not go to great lengths to optimize for gas.

The ❄️Silver Release❄️ will bring many gas optimizations and architecture changes that will reduce transaction overhead and enable more flexibility for managed pools.

The ☀️Golden Release☀️ will introduce a curious new liquidity mechanism to the market.

Documentation

The full documentation can be found at https://docs.balancer.finance

Development

Most users will want to consume the ABI definitions for BFactory and BPool.

This project follows the standard Truffle project structure.

yarn compile   # build artifacts to `build/contracts`
yarn testrpc # run ganache
yarn test    # run the tests

Tests can be run verbosely to view approximation diffs:

yarn test:verbose
  Contract: BPool
    With fees
pAi
expected: 10.891089108910892)
actual  : 10.891089106783580001)
relDif  : 1.9532588879656032e-10)
Pool Balance
expected: 98010000000000030000)
actual  : 98010000001320543977)
relDif  : 1.3473294888276702e-11)
Dirt Balance
expected: 3921200210105053000)
actual  : 3921200210099248361)
relDif  : 1.480428360949332e-12)
Rock Balance
expected: 11763600630315160000)
actual  : 11763600630334527239)
relDif  : 1.6464292361378058e-12)
      ✓ exitswap_ExternAmountOut (537ms)

Complete API docs are available at https://docs.balancer.finance/smart-contracts/api

More Repositories

1

balancer-v2-monorepo

Balancer V2 Monorepo
TypeScript
309
star
2

balancer-sor

Smart order router: off-chain linear optimization of routing orders across pools for best price execution
TypeScript
218
star
3

frontend-v2

Frontend app for the Balancer protocol
TypeScript
187
star
4

balancer-subgraph-v2

Subgraph (Graph Protocol) data layer for Balancer v2 vault, swaps, txs, users
TypeScript
118
star
5

balancer-exchange

Exchange dapp for token swaps
TypeScript
95
star
6

bal-mining-scripts

TypeScript
88
star
7

erc20-redeemable

Vue
79
star
8

balancer-sdk

TypeScript
77
star
9

frontend-v1

V1 Pool Management
Vue
75
star
10

balancer-subgraph

Subgraph (Graph Protocol) data layer for Balancer pools, swaps, txs, users
TypeScript
67
star
11

balpy

Tools for interacting with Balancer Protocol V2 in Python.
Python
64
star
12

docs

Documentation for Balancer
Vue
44
star
13

balancer-deployments

TypeScript
41
star
14

balancer-v3-monorepo

Solidity
38
star
15

configurable-rights-pool

JavaScript
34
star
16

tokenlists

TypeScript
30
star
17

assets

JavaScript
27
star
18

scaffold-balancer-v3

Starter kit for creating custom pools and hooks contracts on Balancer v3
TypeScript
24
star
19

pool-management

Pool management dapp
TypeScript
22
star
20

swap-frontend-v1

Balancer Protocol Frontend
Vue
21
star
21

exchange-proxy

Solidity
21
star
22

b-sdk

TypeScript
20
star
23

balancer-api

Deprecated
TypeScript
18
star
24

backend

TypeScript
16
star
25

docs-developers

15
star
26

balancer-registry

Solidity
14
star
27

docs-v1

13
star
28

bactions-proxy

Solidity
11
star
29

code-review

JavaScript
10
star
30

balancer-examples

Template repository to begin building on Balancer V2
TypeScript
9
star
31

frontend-v3

Deprecated, the app was moved into our frontend monorepo.
TypeScript
9
star
32

docs-v2-archive

7
star
33

linear-pools

TypeScript
6
star
34

scaffold-balancer

TypeScript
5
star
35

brand-assets

4
star
36

balancer-sor-v1

Legacy SOR for V1
TypeScript
3
star
37

ipfs-push

TypeScript
3
star
38

balancer-cred

Shell
3
star
39

pebbles

grug stack rock
HTML
3
star
40

docs-v3

Vue
3
star
41

gauges-subgraph

Subgraph for Liquidity Gauges of the Balancer Protocol
TypeScript
3
star
42

cow-amm

Solidity
3
star
43

dune_queries

PLpgSQL
2
star
44

balancer-bounties

https://bounties.balancer.finance
Vue
2
star
45

helpers

Collection of contracts and JS code for common data dependencies
Solidity
2
star
46

frontend-monorepo

Balancer frontend apps and packages. Includes the official Balancer UI application.
TypeScript
2
star
47

metastable-rate-providers

Rate provider adaptors used by MetaStable pools
Solidity
1
star
48

marketing-site

Marketing site
Vue
1
star
49

frontend-e2e

TypeScript
1
star
50

sor-benchmark

TypeScript
1
star
51

metadata

1
star
52

pool-creator

A user friendly interface for creating and initializing pools
TypeScript
1
star