Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple dashboard of econ data for Economic Stress Test #5421

Closed
8 tasks done
Tartuffo opened this issue May 23, 2022 · 12 comments
Closed
8 tasks done

Simple dashboard of econ data for Economic Stress Test #5421

Tartuffo opened this issue May 23, 2022 · 12 comments
Assignees
Labels
Inter-protocol Overarching Inter Protocol
Milestone

Comments

@Tartuffo
Copy link
Contributor

Tartuffo commented May 23, 2022

Let's come back to these after we have RPC working:
- reserve #4651
- PSM #4968
- BLD Boost #4653
- Oracle / price authority #4652
- goverance? (#5268)

@Tartuffo Tartuffo added the Inter-protocol Overarching Inter Protocol label May 23, 2022
@dckc
Copy link
Member

dckc commented May 24, 2022

Good news: deploy-ist-monitor.js script gets an event for each pool and for each trade.

Bad news: the Central, Secondary, and Liquidity values don't seem to change after the initial liquidity is added:
https://github.com/Agoric/agoric-sdk/pull/5420/files#r879991457
p.s. that was because there was not much liquidity and hence more slippage than the tolerance.

@dckc
Copy link
Member

dckc commented May 24, 2022

AMM Tick Data Spreadsheet

In the swaps tab of the ag-solo play worksheet, we get a new row for each swap or liquidity transaction:

image

Notes:

  • Row 2 shows is update 2 of the IbcATOM pool, at which point it's empty
  • Row 2 shows is update 2 of the AUSD pool, at which point it's empty
  • Row 4 shows that liquidity was added to the AUSD pool (50 RUN, 50 AUSD)
  • Rows 5, 6, and 7 show trades that didn't go through because the slippage was too high
  • Row 8 shows a small (0.20 RUN) trade
  • Row 9 shows adding 500 RUN of liquidity
  • Row 10 is another trade that didn't go through
  • Row 11 shows a trade of 3 RUN

In the pools tab:

image

  • Row 2 shows that as of update 3, there was one pool: IbcATOM
  • Rows 3 and 4 show that as of update 4, there were two pools: IbcATOM and AUSD

The issuers tab is from the wallet, not from the AMM. It tells us what the brand names from the other two sheets mean. We get a new update each time we reload the wallet; each update has a list of issuers / assets, which we normalize as a sequence of rows:

image

cc @btulloh @turadg @Chris-Hibbert @dtribble @rowgraus

@dckc
Copy link
Member

dckc commented May 25, 2022

target for tomorrow: AMM, vaults... stretch goal: liquidation

@dckc
Copy link
Member

dckc commented May 27, 2022

AMM Tick Data Spreadsheet for xnet

it's working:

image

image

@dckc
Copy link
Member

dckc commented May 28, 2022

Vault Tick Data

image

from

image

for reference:

ag-admin:
a374922 * dckc/ist-dashboard-sheet feat: monitor vaults (WIP)

@dckc
Copy link
Member

dckc commented Jun 1, 2022

oops... the spreadsheet is populated with strings. Those should be numbers.

p.s. Fixed in dckc/ag-admin@d2fb73d

@dckc
Copy link
Member

dckc commented Jun 1, 2022

updates lagging?

When I paid off some debt, the totalDebt in the [4,"IbcATOM"] row didn't change. IOU more detail.

Key updateCount collateral numVaults totalCollateral totalDebt
[2,"IbcATOM"] 2 IbcATOM 0 0 0
[3,"IbcATOM"] 3 IbcATOM 1 15 467.3775
[4,"IbcATOM"] 4 IbcATOM 1 15 467.3775

@dckc
Copy link
Member

dckc commented Jun 6, 2022

How to run the dashboard

  1. copy the econ data spreadsheet to get the right sheet and column names
  2. create a Google service account. this is where we got hung up. supporting use of an API key would be nice.
  3. clone https://github.com/dckc/ag-admin ; check out the ist-dashboard-sheet branch
  4. in the ag-admin dir: agoric start -v --reset testnet 8000 https://xnet.agoric.net/network-config
  5. cd api
  6. set credentials as below.
  7. deploy the sheets plugin: agoric deploy deploy.js --allow-unsafe-plugins
  8. start the IST monitor: agoric deploy deploy-ist-monitor.js
export GOOGLE_SERVICES_EMAIL=mbox1@....iam.gserviceaccount.com
export GCS_PRIVATE_KEY=`cat ./google-services-private-key.pem`

export GOOGLE_APPLICATION_CREDENTIALS=...e6.json
export SHEET1_ID=17J...

@dckc
Copy link
Member

dckc commented Jun 17, 2022

@kennyrowe , due to the Google service account headache, I'm just going to run this myself for the next little while. When we get the RPC stuff (#5386) working so we can skip the JS layer, let's revisit it.

@dckc dckc closed this as completed Jun 17, 2022
@dckc
Copy link
Member

dckc commented Jun 17, 2022

I just met with Nalin, @btulloh , and @rowgraus to go over how the spreadsheet works, how to send tokens around, and a preview of how to run deploy scripts for trading.

@dckc
Copy link
Member

dckc commented Jun 20, 2022

@kennyrowe cool... so you figured out the Google service account stuff.

@dckc dckc reopened this Jun 20, 2022
@dckc
Copy link
Member

dckc commented Jun 21, 2022

@kennyrowe was able to reproduce my results. Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inter-protocol Overarching Inter Protocol
Projects
None yet
Development

No branches or pull requests

2 participants