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 leverage functional test #1210

Closed
4 tasks
Tracked by #13 ...
robert-zaremba opened this issue Aug 3, 2022 · 7 comments
Closed
4 tasks
Tracked by #13 ...

Simple leverage functional test #1210

robert-zaremba opened this issue Aug 3, 2022 · 7 comments
Assignees

Comments

@robert-zaremba
Copy link
Member

We use the genesis file from: #1206

  1. oracle prices: Umee: 0.02usd, Atom: 1usd, Juno: 0.5usd
  2. a_1 supply and collateralize 10'000umee. a_2 supply 2atom.
  3. a_1 borrows 1atom
  4. a_2 withdraws (unsupply) 1atom
  5. a_1 pays back 1atom

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@RafilxTenfen
Copy link
Contributor

RafilxTenfen commented Aug 3, 2022

Right now in the price-feeder we only have one mock provider that points to the same spreadsheet for all instances
@robert-zaremba do you need to be able to set the prices by CLI?
Do you know if that would be possible @adamewozniak without too much work ?

@adamewozniak
Copy link
Collaborator

@RafilxTenfen we can't set prices by CLI

We'll have to simulate pre/votes by having validators submit txs of prices, much how we do this for oracle simulations

@robert-zaremba
Copy link
Member Author

For this test case I think any reasonable price will work.
However for other test cases we need more control over the prices, or adjust the supply and borrowing numbers based on the on chain prices.
@adamewozniak , @toteki do you think the following will work?

  1. we set initial prices in the genesis
  2. we will use the mock prices to keep them to the level we need for Leverage functional test1 #1207

@adamewozniak
Copy link
Collaborator

For this test case I think any reasonable price will work.

However for other test cases we need more control over the prices, or adjust the supply and borrowing numbers based on the on chain prices.

@adamewozniak , @toteki do you think the following will work?

  1. we set initial prices in the genesis

  2. we will use the mock prices to keep them to the level we need for Leverage functional test1 #1207

Prices get reset each voting period, so if a chain is running we will need continual votes for the price to be set.

Also are we running these tests with multiple validators? If so it'll be a lot easier on us if we just loop through voting instead of using multiple instances of the price feeder @robert-zaremba

@robert-zaremba
Copy link
Member Author

Ideally we will need a way to instrument the price feeder or validators to use a price source we want for a given test scenario.

@RafilxTenfen RafilxTenfen self-assigned this Aug 4, 2022
@toteki
Copy link
Member

toteki commented Aug 5, 2022

Is this one meant to just be those 4 transactions? If so we can probably omit it (keeper tests and cli already do similar) or expand it into a load test like #1209

@robert-zaremba
Copy link
Member Author

This task is a warm up - just to have something simpler to start with. We can then transform it into #1209. The idea was to have something like a PoC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants