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

Update from master #1602

Merged
merged 127 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
cdcfd4b
fix: bring market.liquidity.targetstake.triggering.ratio in line with…
davidsiska-vega Jan 19, 2023
d993621
fix: duplicate AC codes in 0069-VCBS (#1536)
gordsport Jan 19, 2023
c2cb333
chore: trailing spaces
davidsiska-vega Jan 19, 2023
30a078d
fix: remove the unused netparam; not liking that
davidsiska-vega Jan 19, 2023
31ff6b9
Merge branch 'master' into fix_0035-AC-009
davidsiska-vega Jan 19, 2023
11b375e
Merge pull request #1534 from vegaprotocol/fix_0035-AC-009
davidsiska-vega Jan 19, 2023
4ff8a82
chore: remove untestable AC from 0018 (#1530)
gordsport Jan 19, 2023
fd16996
chore: reword 0063-VALK-013
wwestgarth Jan 19, 2023
d26a6c5
Merge pull request #1540 from vegaprotocol/clarify-key-rotation-acs
wwestgarth Jan 19, 2023
5c5cd6a
Update 0035-LIQM-liquidity_monitoring.md (#1539)
vega-paul Jan 19, 2023
9dba312
fix AC numbering on 0035-LIQM-liquidity_monitoring.md (#1541)
gordsport Jan 19, 2023
fad492e
Update 0011-NP-CLIE-client-interaction-tests.md
RomanLeca Jan 19, 2023
f7b5aad
feat: allow any key to request multisg signers update bundle
davidsiska-vega Jan 19, 2023
c98ec28
feat: clarify spam status
davidsiska-vega Jan 19, 2023
fa23993
Merge pull request #1544 from vegaprotocol/RomanLeca-patch-17
RomanLeca Jan 19, 2023
b8ffe02
Merge branch 'master' into feat-any-vega-key-can-get-multisig-update-…
davidsiska-vega Jan 19, 2023
2636658
Merge pull request #1545 from vegaprotocol/feat-any-vega-key-can-get-…
davidsiska-vega Jan 19, 2023
c5423e5
refactor: let max oi drop during auciton
witgaw Jan 17, 2023
960ace6
Merge pull request #1546 from vegaprotocol/move-implemented-bit
witgaw Jan 19, 2023
0890679
Wording tweaks for spam protection spec (#1548)
candida-d Jan 23, 2023
2069690
fix spelling in spam protection spec (#1553)
candida-d Jan 25, 2023
ff8266a
Update 0069-VCBS-validators_chosen_by_stake.md
Vegaklaus Jan 26, 2023
2829019
Update 0069-VCBS-validators_chosen_by_stake.md
Vegaklaus Jan 26, 2023
7e8aaf6
Update 0062-SPAM-spam_protection.md
Vegaklaus Jan 26, 2023
f9f0364
Update 0062-SPAM-spam_protection.md
Vegaklaus Jan 26, 2023
1ba47f4
Add quality checks to the makefile (#1556)
gordsport Jan 27, 2023
01e6b3f
fix: broken links in the specs (#1557)
gordsport Jan 30, 2023
f36cdf6
fix: remove broken kraken link
davidsiska-vega Jan 30, 2023
5405196
Merge pull request #1558 from vegaprotocol/remove-broken-kraken-link
davidsiska-vega Jan 30, 2023
15ad1cc
refactor: clarify 0042-LIQF-018
witgaw Jan 31, 2023
160b84e
feat: fix non-protocol linting and add makefile (#1563)
gordsport Feb 1, 2023
f957111
Update 0069-VCBS-validators_chosen_by_stake.md
Vegaklaus Feb 1, 2023
9980120
Update 0069-VCBS-validators_chosen_by_stake.md
Vegaklaus Feb 1, 2023
3cd1498
fix: Update acceptance criteria to correctly reflect implementation (…
MuthuVega Feb 1, 2023
23e87a8
fix: update epoch ACs (#1555)
AnExsomnis Feb 1, 2023
c7ff0b8
feat: update 0042, LP fee Transfer, Distribution
Jiajia-Cui Feb 2, 2023
e0e5a50
Add build folder to gitigore
edd Feb 2, 2023
9c6965a
Update protocol/0042-LIQF-setting_fees_and_rewarding_lps.md
Jiajia-Cui Feb 2, 2023
63405a0
Merge branch 'master' into 0042_LP_fee
Jiajia-Cui Feb 2, 2023
aa37556
Merge pull request #1569 from vegaprotocol/0042_LP_fee
Jiajia-Cui Feb 2, 2023
8fc249b
Ignore dictionary
edd Feb 2, 2023
a3b706b
Un parallelise clone-sources in makefile
edd Feb 2, 2023
125da9c
Add specs param to names and codes in makefile
edd Feb 2, 2023
9a28962
feat: update maker fee transfer account
Jiajia-Cui Feb 3, 2023
81db528
Update 0069-VCBS-validators_chosen_by_stake.md
Vegaklaus Feb 3, 2023
e61c3d6
Update protocol/0029-FEES-fees.md
Jiajia-Cui Feb 3, 2023
10d105b
Update protocol/0029-FEES-fees.md
Jiajia-Cui Feb 3, 2023
98ba795
Update protocol/0029-FEES-fees.md
Jiajia-Cui Feb 3, 2023
e6a4aec
Merge pull request #1572 from vegaprotocol/update-maker-fee-transfer-…
Jiajia-Cui Feb 3, 2023
822bf36
Update 0048-DSRI-data_source_internal.md
RomanLeca Feb 6, 2023
4c1348e
Merge pull request #1574 from vegaprotocol/RomanLeca-patch-18
RomanLeca Feb 6, 2023
f1564de
fix: refactor 0069-VCBS-052 (#1570)
claudiumilea Feb 7, 2023
011b0d1
Merge branch 'master' into Vegaklaus-patch-18
gordsport Feb 7, 2023
c504e4f
fix: MD and spelling lint checks
gordsport Feb 7, 2023
51cadee
fix: MD and spelling lint errors
gordsport Feb 7, 2023
b160b7e
fix: update wording for AC 0059-VCBS-016- (#1566)
gordsport Feb 7, 2023
38c5b84
Merge branch 'master' into Vegaklaus-patch-18
gordsport Feb 7, 2023
95ab4a7
Merge pull request #1565 from vegaprotocol/Vegaklaus-patch-18
Vegaklaus Feb 7, 2023
2e2d3b8
Update 0062-SPAM-spam_protection.md (#1571)
Vegaklaus Feb 7, 2023
b31101a
Update 0011-NP-CLIE-client-interaction-tests.md (#1542)
Vegaklaus Feb 7, 2023
35cd1db
Update 0011-NP-CLIE-client-interaction-tests.md (#1579)
RomanLeca Feb 7, 2023
988fd23
refactor: clarify AC
witgaw Feb 7, 2023
561cca1
fix: adding bound on slippage part of margin
davidsiska-vega Feb 8, 2023
f104c75
fix: adding bound on slippage part of margin - ACs
davidsiska-vega Feb 8, 2023
f7fdfaa
chore: lint
davidsiska-vega Feb 8, 2023
f829d55
chore: format
davidsiska-vega Feb 8, 2023
172e542
chore: add ac codes
davidsiska-vega Feb 8, 2023
1e672ee
chore: lint
davidsiska-vega Feb 8, 2023
b437b31
feat: make it nonlinear
davidsiska-vega Feb 8, 2023
1051d50
fix: remove obsolete ac
davidsiska-vega Feb 8, 2023
173003e
fix: typo
davidsiska-vega Feb 8, 2023
023a6c8
Merge pull request #1582 from vegaprotocol/modify-0012-POSR-007
witgaw Feb 8, 2023
15f48fb
Merge branch 'master' into fix/cap-slippage-comp
gordsport Feb 8, 2023
154314f
fix: typo from comments
davidsiska-vega Feb 8, 2023
7ea2498
fix: code block in list formatting (#1584)
gordsport Feb 8, 2023
00af442
chore: Remove untestable acceptance criteria
MuthuVega Feb 9, 2023
afd76fc
Merge pull request #1586 from vegaprotocol/remove_untestable_ac_for_d…
MuthuVega Feb 9, 2023
a1fa7a1
feat: add rate limit spec
pscott31 Feb 10, 2023
3d9b4f2
chore: Merge branch 'master' into fix/cap-slippage-comp
davidsiska-vega Feb 10, 2023
03e9684
Merge pull request #1583 from vegaprotocol/fix/cap-slippage-comp
davidsiska-vega Feb 10, 2023
90df743
Merge branch 'master' into rate_limit
pscott31 Feb 10, 2023
eb959ff
Update 0057-TRAN-transfers.md (#1588)
vega-paul Feb 13, 2023
8ce66ce
chore: add AC codes
gordsport Feb 13, 2023
5a6c2f1
Update 0057-TRAN-transfers.md (#1590)
vega-paul Feb 14, 2023
328939b
Update 0069-VCBS-validators_chosen_by_stake.md
Vegaklaus Feb 15, 2023
4a36b9e
Update 0069-VCBS-validators_chosen_by_stake.md
Vegaklaus Feb 16, 2023
c2ab3df
fix: Expand acceptance criteria to make them clear for 0011-NP-CLIE-c…
MuthuVega Feb 16, 2023
4bf559e
feat: Add new PLUP AC for state-sync in protocol upgrade.
jgsbennett Feb 17, 2023
77323e4
feat: add closeout API
Jiajia-Cui Feb 20, 2023
525437a
chore: tidy up
Jiajia-Cui Feb 20, 2023
fd5c2a2
chore: remove blank line
Jiajia-Cui Feb 20, 2023
4820e3a
Merge pull request #1594 from vegaprotocol/Closeout-API
Jiajia-Cui Feb 20, 2023
06c64e9
chore: by more specific about when a client should be banned
pscott31 Feb 20, 2023
5e522c7
Merge branch 'master' into rate_limit
pscott31 Feb 20, 2023
7c577a9
Merge branch 'master' into state-sync-snapshot-pup
jgsbennett Feb 21, 2023
dd83c4c
Merge pull request #1592 from vegaprotocol/state-sync-snapshot-pup
jgsbennett Feb 21, 2023
9fa4e6d
feat: update formula line 140
Jiajia-Cui Feb 22, 2023
65c7582
Merge pull request #1597 from vegaprotocol/slippage_cap_formula
Jiajia-Cui Feb 22, 2023
0992230
fix: Add extra cases for various things that might be affected by val…
jgsbennett Feb 23, 2023
c1a3e16
fix: Review comments for new ACs.
jgsbennett Feb 24, 2023
53638b7
fix: Satisfy the linter.
jgsbennett Feb 24, 2023
419c67b
Merge pull request #1599 from vegaprotocol/validator_join_leave_cases
jgsbennett Feb 24, 2023
8df7df8
refactor: add slippage to orders
witgaw Feb 24, 2023
1a1f26f
refactor: update examples
witgaw Feb 24, 2023
c782c46
chore: fix linter issues
witgaw Feb 24, 2023
348902e
refactor: fix typo
witgaw Feb 24, 2023
bded263
refactor: formlise margin level treatment
witgaw Feb 24, 2023
d370414
refactor: amend/add ACs
witgaw Feb 25, 2023
d6638fa
Merge branch 'master' into update-from-master
gordsport Feb 27, 2023
6ba9f94
Update 0042-LIQF-setting_fees_and_rewarding_lps.md (#1598)
vega-paul Feb 27, 2023
e274bdc
fix: linting error
gordsport Feb 28, 2023
619d55a
Merge branch 'master' into margin-changes
gordsport Feb 28, 2023
348c7f1
fix: MD lint and spelling
gordsport Feb 28, 2023
5ce2b08
Merge branch 'master' into Vegaklaus-patch-21
gordsport Feb 28, 2023
5c6d571
Update 0069-VCBS-validators_chosen_by_stake.md (#1604)
vega-paul Mar 2, 2023
0bb3cb3
Update 0069-VCBS-validators_chosen_by_stake.md (#1596)
Vegaklaus Mar 2, 2023
514b609
Merge branch 'master' into rate_limit
gordsport Mar 2, 2023
0888f2e
Merge pull request #1587 from vegaprotocol/rate_limit
pscott31 Mar 2, 2023
7617163
Merge branch 'master' into margin-changes
gordsport Mar 2, 2023
90d31f7
Merge branch 'master' into Vegaklaus-patch-21
gordsport Mar 2, 2023
a8a2bf5
Merge pull request #1600 from vegaprotocol/margin-changes
witgaw Mar 2, 2023
884932f
Merge branch 'master' into Vegaklaus-patch-21
gordsport Mar 2, 2023
240e05b
fix: More validator join/leave test cases involving checkpoints. (#1601)
jgsbennett Mar 2, 2023
7c93797
Merge branch 'master' into Vegaklaus-patch-21
gordsport Mar 2, 2023
b50daeb
Merge pull request #1591 from vegaprotocol/Vegaklaus-patch-21
Vegaklaus Mar 2, 2023
0c3c7c4
feat: update make file and add approabtion to CI (#1605)
gordsport Mar 2, 2023
d46a5d0
Merge branch 'master' into update-from-master
gordsport Mar 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/quality_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,18 @@ jobs:
files: .
config_file: .github/workflows/config/markdownlint.json
ignore_path: .github/workflows/config/markdownlintignore

checkcodes:
name: "Approbation"
runs-on: ubuntu-latest
steps:
- name: "Check out"
uses: actions/checkout@v3

- name: "Run Check AC codes"
run: |
npx github:vegaprotocol/approbation check-codes --specs="{./non-protocol-specs/**/*.md,./protocol/**/*.md}"

- name: "Run Check file names"
run: |
npx github:vegaprotocol/approbation check-filenames --specs="{./non-protocol-specs/**/*.md,./protocol/**/*.md}"
6 changes: 3 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ all: spellcheck markdownlint names codes references links clean
.PHONY: names
names:
@$(MAKE) clone-sources
npx @vegaprotocol/approbation check-filenames --specs="{./non-protocol-specs/**/*.md,./protocol/**/*.md}"
npx github:vegaprotocol/approbation check-filenames --specs="{./non-protocol-specs/**/*.md,./protocol/**/*.md}"

# Count how many Acceptance Criteria each specification has
.PHONY: codes
codes:
@$(MAKE) clone-sources
npx @vegaprotocol/approbation check-codes --specs="{./non-protocol-specs/**/*.md,./protocol/**/*.md}"
npx github:vegaprotocol/approbation check-codes --specs="{./non-protocol-specs/**/*.md,./protocol/**/*.md}"

TEMP=./.build
.PHONY:clone-sources
Expand Down Expand Up @@ -44,7 +44,7 @@ clone-sources:
references:
@$(MAKE) clone-sources

cd $(TEMP); npx -y @vegaprotocol/approbation@latest check-references --specs="../*protocol*/*.{md,ipynb}" --tests="./**/*.{js,py,feature}" --categories="../protocol/categories.json" --show-branches --show-mystery --verbose --show-files
cd $(TEMP); npx -y github:vegaprotocol/approbation@latest check-references --specs="../*protocol*/*.{md,ipynb}" --tests="./**/*.{js,py,feature}" --categories="../protocol/categories.json" --show-branches --show-mystery --verbose --show-files

# Imperfect, but useful - hence not included in ALL
.PHONY: links
Expand Down
37 changes: 20 additions & 17 deletions non-protocol-specs/0011-NP-CLIE-client-interaction-tests.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions protocol/0007-POSN-non_core_positions_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The Position API provides access to net position per party per market. Specifica
- Uses VW methodology to adjust the realised PnL resulting from any trade that caused volume to have been closed out. (<a name="0007-POSN-006" href="#0007-POSN-006">0007-POSN-006</a>)
- Stores all traders’ realised PnL for every trade that caused volume to have been closed out. (<a name="0007-POSN-007" href="#0007-POSN-007">0007-POSN-007</a>)
- Stores all traders' total realised PnL. (<a name="0007-POSN-008" href="#0007-POSN-008">0007-POSN-008</a>)
- Stores a status field for all the traders, the status field will be set to ORDERS_CLOSED if a trader was distressed based on the margin requirements for their worst possible long/short, but their margin balance was sufficient to maintain their open position (i.e. their active orders will be removed from the book, after which the party was no longer distressed) (<a name="0007-POSN-015" href="#0007-POSN-015">0007-POSN-015</a>)
- The status field will be set to CLOSED_OUT if the party was closed out (<a name="0007-POSN-016" href="#0007-POSN-016">0007-POSN-016</a>)

## Summary

Expand Down Expand Up @@ -58,6 +60,7 @@ The API is expected to expose:
- When a party has a position which gets (partially) closed-out, the unrealised PnL should reflect the change of position while the realised PnL reflect the closed-out position (<a name="0007-POSN-011" href="#0007-POSN-011">0007-POSN-011</a>)
- During settlement, all the parties' position should become 0, unrealised PnL should become 0 and realised PnL should update based on settlement price (<a name="0007-POSN-012" href="#0007-POSN-012">0007-POSN-012</a>)
- If a party is subject to loss socialisation (its MTM gains get scaled down) the loss amount (forgone profit) should get recorded in realised PnL(<a name="0007-POSN-013" href="#0007-POSN-013">0007-POSN-013</a>)
- If a party is subject to loss socialisation, the profits that could not be paid out due to loss socialisation is logged as "loss socialisation amount" which is accessible from API (<a name="0007-POSN-014" href="#0007-POSN-014">0007-POSN-014</a>)

## Definitions / glossary

Expand Down
5 changes: 5 additions & 0 deletions protocol/0010-MARG-margin_orchestration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ The protocol compares these levels to the balance in the trader's margin account
| greater than _collateral release level_ | Collateral release | Collateral release
| greater than _collateral search level_ and less than _initial margin_ | no action | No financial risk to network

When posting a new order the initial margin for the overall position including the new order is calculated and order is only allowed to go ahead if party has enough funds to bring their margin account balance to that figure. An exception to this is when a party has an open position and tries to reduce it, but cannot afford the new margin. Then orders from the opposite side (short orders for a long position, long orders for a short position) are accepted as follows:

- limit order: accept order when sum sizes of all the party's order's for that side of the book including the one being posted is less than or equal to the absolute open volume that a party has,
- market order: accept order as long as its size is less than or equal to the absolute open volume that a party has.

#### Collateral search

When a trader's balance in their margin account (for a market) is less than their position’s collateral search level the protocol will attempt to transfer sufficient collateral from the trader’s main collateral account to top up their margin account to the level of the _initial margin_.
Expand Down
2 changes: 1 addition & 1 deletion protocol/0012-POSR-position_resolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- Mark Price is never updated during position resolution (<a name="0012-POSR-004" href="#0012-POSR-004">0012-POSR-004</a>)
- Non-distressed traders who trade with the network because their open orders are hit during the close out trade have their positions settled correctly. (<a name="0012-POSR-005" href="#0012-POSR-005">0012-POSR-005</a>)
- When a distressed party has a [staking account](./0013-ACCT-accounts.md) with the same currency as the settlement currency of the market where it's distressed the staking account is NOT used in margin search and liquidation. (<a name="0012-POSR-006" href="#0012-POSR-006">0012-POSR-006</a>)
- When a party is distressed at the point of leaving an auction it should get closed out immediately. (<a name="0012-POSR-007" href="#0012-POSR-007">0012-POSR-007</a>)
- When a party is distressed at the point of leaving an auction it should get closed out as soon as the market returns to continuous trading mode and all the parked orders (pegged and LP) get added back to the order book. (<a name="0012-POSR-008" href="#0012-POSR-008">0012-POSR-008</a>)

## Summary

Expand Down
Loading