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

docs: Inter Protocol Liquidation Bidding Test Tool #7295

Merged
merged 12 commits into from
Apr 24, 2023
Merged

Conversation

dckc
Copy link
Member

@dckc dckc commented Mar 31, 2023

refs: #6930, #6889
stacked on #7454

Description

This documents a revised design implemented in #7256. Excerpt:

Placing a bid: inter bid ...

Let's place a 5 IST bid at a price of 9.50:

$ inter bid by-price --give 5 --price 9.50 --from test-acct
2023-03-31T07:07:33.319399551Z tx not in block 55762 retrying...
2023-03-31T07:07:33.319399551Z tx not in block 55762 retrying...
bid is broadcast:
{"timestamp":"2023-03-31T07:07:38Z","height":"55763","offerId":"bid-1680246460034","txhash":"FDB98EEC71E987FEEE4A..."}
{"id":"bid-1680246460034","price":"9.5 IST/IbcATOM","give":{"Currency":"5IST"},"result":"Your bid has been accepted"}

This command does several things:

  1. formats the bid as a Zoe offer specification
  2. signs and broadcasts a transaction containing the offer spec
  3. waits for the transaction to be included in a block
  4. waits for the offer to be placed with the auctioneer contract via Zoe

Tasks

Security Considerations

Scaling Considerations

Documentation Considerations

rendered: README-bidding-cli.md

Testing Considerations

Ideally we'd have tests that tell us that this needs maintenance. The cited snapshot tests can help, perhaps.

@mergify
Copy link
Contributor

mergify bot commented Mar 31, 2023

⚠️ The sha of the head commit of this PR conflicts with #7256. Mergify cannot evaluate rules on this PR. ⚠️

@dckc
Copy link
Member Author

dckc commented Apr 1, 2023

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Apr 1, 2023

refresh

✅ Pull request refreshed

@@ -109,8 +112,15 @@ Using the `test` keyring is lower friction, but feel free to use the os keyring:
agd keys add test-acct
```

## Provisioning your account for use with Zoe smart contracts

Mainnet
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a testing tool. Use with mainnet is outside the scope.

Please coordinate before pushing to this branch.

I made https://github.com/Agoric/agoric-sdk/tree/bot-bid-cli-doc and put your work there.


Mainnet

You’ll need to provision an Agoric Smart Wallet account (offer handler) in order to interact with Zoe contracts. You’ll need acquire 10BLD in order to do this. See[ ‘How to Provisions a Smart Wallet instructions’](https://docs.inter.trade/user-how-to/wallet-usage/create-your-agoric-account-and-smart-wallet.). Once provisioned, you’ll need to hold an IST balance in order to be able to place a bid.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deleted period is not very visible in the diff, but it's the most semantically significant change below. The link won't work without the fix.

Suggested change
You’ll need to provision an Agoric Smart Wallet account (offer handler) in order to interact with Zoe contracts. You’ll need acquire 10BLD in order to do this. See[ ‘How to Provisions a Smart Wallet instructions’](https://docs.inter.trade/user-how-to/wallet-usage/create-your-agoric-account-and-smart-wallet.). Once provisioned, you’ll need to hold an IST balance in order to be able to place a bid.
You’ll need to provision an Agoric Smart Wallet account (offer handler) in order to interact with Zoe contracts. You’ll need acquire 10BLD in order to do this. See [‘How to Provision a Smart Wallet instructions’](https://docs.inter.trade/user-how-to/wallet-usage/create-your-agoric-account-and-smart-wallet). Once provisioned, you’ll need to hold an IST balance in order to be able to place a bid.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I reverted the Mainnet stuff.

@dckc dckc changed the base branch from master to 7266-auction-status-cli April 19, 2023 03:53
@dckc dckc force-pushed the 7266-auction-status-cli branch 4 times, most recently from 5cbbfc5 to d7cd994 Compare April 20, 2023 17:19
Base automatically changed from 7266-auction-status-cli to master April 20, 2023 17:45
fixup: SKIP_DOWNLOAD=false to install

chore: --give amounts include brand names
 - add tests for: inter liquidation status, inter vbank list
 - take test expected output from README
   - use matching bid id, 3.105 ATOM
 - spaces in amounts
 - round to 4 digits
 - tweak brands:
   - ATOM board #
   - include BLD
 - want -> maxBuy
 - punt on payouts from bid cancel
 - use board serializer rather than ad-hoc @qclass stuff
 - address TODOs per discussion with product
 - omit want

```
$ inter bid list --from test-acct
{"id":"bid-1680246460034","price":"9.5 IST/ATOM","give":{"Currency":"5 IST"},"result":"Your bid has been accepted"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dckc I disagree - If the example in instructions are different to what I receive in my output, I as a user would be confused/bothered. We know 'maxBuy' appears so it's not accurate as stated.

packages/inter-protocol/test/auction/README-bidding-cli.md Outdated Show resolved Hide resolved
Copy link
Contributor

@otoole-brendan otoole-brendan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dckc Looks good to me. Just an FYI though - I only reviewed the .md file as I don't believe I am a suitable reviewer of the .js files so my review has ignored those.

@dckc dckc added the automerge:squash Automatically squash merge label Apr 24, 2023
@mergify mergify bot merged commit fcebad4 into master Apr 24, 2023
@mergify mergify bot deleted the dc-bid-cli-doc branch April 24, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants