Skip to main content

A preconfigured Python package, using python poetry

Project description

Balancer

Overview

The BalancerV2 model is a python implementation of the balancerv2 protocol funded by Balancer and the Token Engineering community. In collaboration with Ocean Protocol and PowerPool. We hope to build a resiliant, easy, and simple to use access to balancer pools for simulations, and build a brighter tomorrow for Token Engineers. Feel free to play and use this model for your own simulations and grow token engineering everywhere.

  • Copy BalancerV2 Pools from on chain, being able to pull weights from chain based on the symbols provided, this will reduce friction for new users.
  • Ease access into BalancerV2 pools for anyone wanting to make a trade and see the ending result of the pool
  • Provide an interface for easy swapping, adding liquidity, and removing it. This can be done with ipython or Jupyter
  • Develop rigorous testing for math functions to assure decimals are flowing exactly as EVM
  • Model ecosystem with agents using these balancer pools as an interactive objects.

All research is open source and transparent. For more information please visit the BalancerV2 Simulations Documentation.

Balancer V2 Model

Installation

pip install balancerv2cad

Sample Usage

from balancerv2cad.WeightedPool import WeightedPool
wp = WeightedPool()
# amounts of tokens to join pool, weights of tokens
wp.join_pool({'WETH':19609,'DAI':30776582},{'WETH':0.6,'DAI':0.4})
wp.swap('WETH','DAI',2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

balancerv2cad-0.1.93.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

balancerv2cad-0.1.93-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file balancerv2cad-0.1.93.tar.gz.

File metadata

  • Download URL: balancerv2cad-0.1.93.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Darwin/20.5.0

File hashes

Hashes for balancerv2cad-0.1.93.tar.gz
Algorithm Hash digest
SHA256 267b34ac946dd499fdeb11d5f9d9888daa48a6c10228e6d9ebb96df9c641f3e6
MD5 dc088574b3acae41dc364637ff70b819
BLAKE2b-256 49338ef4067868b85857654ff39d6957dcdf38fd1cd19de242b910cd4341b72f

See more details on using hashes here.

File details

Details for the file balancerv2cad-0.1.93-py3-none-any.whl.

File metadata

  • Download URL: balancerv2cad-0.1.93-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Darwin/20.5.0

File hashes

Hashes for balancerv2cad-0.1.93-py3-none-any.whl
Algorithm Hash digest
SHA256 9958251f83fc526a0c629ca32d3196d53fd4423255b654c96010b1a779f72427
MD5 8c47a7061a1696993c4bedfd92a5a86b
BLAKE2b-256 c3399ff888ac2e96998d11afcc6b2375cee9f61483f2d1e2b85855b2c793e75f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page