MCPcopy Index your code
hub / github.com/blockworks-foundation/mango-v3

github.com/blockworks-foundation/mango-v3 @v3.7.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.7.0 ↗ · + Follow
614 symbols 2,020 edges 44 files 95 documented · 15% updated 3y agov3.7.0 · 2022-10-20★ 1547 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Mango Markets V3 - Decentralized Margin Trading

⚠️ Warning

Any content produced by Blockworks, or developer resources that Blockworks provides, are for educational and inspiration purposes only. Blockworks does not encourage, induce or sanction the deployment of any such applications in violation of applicable laws or regulations.

Contribute

Significant contributions to the source code may be compensated with a grant from the Blockworks Foundation.

Security

Mango has been audited by Neodyme, you can find the report here.

You will be compensated by the Mango DAO for privately reporting vulnerabilities to the maintainers of this repo. Email hello@blockworks.foundation

Branches and Tags

  • New development happens on main. Pull requests should always target main by default.
  • Release branches have names like release/3.3.0 and are branched off of main or a parent release branch.

  • Bugfixes for releases should usually be merged into main and then be cherry-picked to the release branch.

  • Only push to release branches after talking to the release owner.
  • When a release is done, the released version is tagged and the release branch is deleted.
  • Release tags have names like v3.3.1.
  • To know what is deployed on mainnet, check the Anchor Builds.

Extension points exported contracts — how you extend this code

QueueHeader (Interface)
(no doc) [1 implementers]
program/src/queue.rs
AddPacked (Interface)
(no doc) [1 implementers]
program/tests/program_test/mod.rs
Loadable (Interface)
(no doc)
common/src/lib.rs

Core symbols most depended-on inside this repo

pack
called by 52
program/src/instruction.rs
iter
called by 51
program/src/queue.rs
get_health
called by 38
program/src/state.rs
check_valid
called by 33
program/src/state.rs
len
called by 33
program/src/queue.rs
load_open_orders
called by 31
program/src/state.rs
checked_change_net
called by 29
program/src/processor.rs
as_ref
called by 29
program/src/matching.rs

Shape

Method 333
Function 182
Class 78
Enum 18
Interface 3

Languages

Rust100%

Modules by API surface

program/src/state.rs115 symbols
program/src/processor.rs100 symbols
program/src/matching.rs89 symbols
program/tests/program_test/mod.rs76 symbols
program/src/instruction.rs55 symbols
program/src/queue.rs31 symbols
mango-logs/src/lib.rs29 symbols
program/tests/program_test/cookies.rs26 symbols
program/src/utils.rs12 symbols
program/tests/program_test/scenarios.rs11 symbols
program/tests/test_spot_markets.rs7 symbols
program/tests/program_test/assertions.rs7 symbols

For agents

$ claude mcp add mango-v3 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact