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

@blockworks-foundation/mango-v3-reimbursement-lib

Package Overview
Dependencies
Maintainers
7
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockworks-foundation/mango-v3-reimbursement-lib

Flow

  • 1.0.6
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-98.73%
Maintainers
7
Weekly downloads
 
Created
Source

Flow

  • Write to table
  • Create group
  • Create vaults
  • Token Transfer to vaults outside the context of the program
  • UI creates Reimbursement account
  • UI packs tx with ixs which contain ** create token account OR a create idempotent ATA ** reimburse to above token account OR ATA

mango-v3-reimbursement

This repository contains code that allows users of mango v3 to receive re-imbursement after the emergency shutdown in Slot 154,889,307.

Deployment

First calculate the re-imbursement from a recent solana snapshot, we used Slot 154,856,403:

  • download the solana snapshot
  • download the deposits & withdrawals since snapshot as tsv
  • compile PR #208 on mango-v3 and the following two commands to generate a csv as well as a binary buffer
cargo --bin cli equity-from-snapshot \
--snapshot snapshot-154856403-HJj8oytGGRnbUoFdojewzBWB3FrTBaTJdx1v4g63oUWc.sqlite \
--late-changes deposits_withdraws.tsv \
--program mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68 \
--group 98pjRuQjK3qA6gXts96PqZT4Ze5QmnCmt3QYjhbUSPue \
--outtype csv --outfile reimbursement.csv

cargo --bin cli equity-from-snapshot \
--snapshot snapshot-154856403-HJj8oytGGRnbUoFdojewzBWB3FrTBaTJdx1v4g63oUWc.sqlite \
--late-changes deposits_withdraws.tsv \
--program mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68 \
--group 98pjRuQjK3qA6gXts96PqZT4Ze5QmnCmt3QYjhbUSPue \
--outtype bin --outfile reimbursement.bin

FAQs

Package last updated on 18 Oct 2022

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