Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polymarket/amm-maths

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymarket/amm-maths

Utility package to store common maths for interacting with Conditional Tokens AMMs

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
373
decreased by-2.1%
Maintainers
4
Weekly downloads
 
Created
Source

Polymarket AMM Maths

This package contains a number of functions to calculate the effects of interactions with the Conditional Tokens Market Makers used by Polymarket.

Note: A number of utility functions from https://github.com/protofire/omen-exchange have been included in this package which were then adapted where necessary.

Running tests

To run the tests, follow these steps. You must have at least node v10 and yarn installed.

First clone the repository:

git clone https://github.com/TokenUnion/amm-maths.git

Move into the uniswap-sdk working directory

cd amm-maths/

Install dependencies

yarn install

Run tests

yarn test

You should see output like the following:

yarn run v1.22.4
$ jest
 PASS  test/trading.test.ts
 PASS  test/liquidity.test.ts
 PASS  test/price.test.ts

Test Suites: 3 passed, 3 total
Tests:       64 passed, 64 total
Snapshots:   0 total
Time:        1.05 s
Ran all test suites.
Done in 1.64s.

Keywords

FAQs

Package last updated on 22 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc