Skip to content

Commit

Permalink
Changelog, version bump for program v0.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ckamm committed Sep 13, 2023
1 parent da7fc2f commit 816078e
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 11 deletions.
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,24 @@ Update this for each program release and mainnet deployment.

## not on mainnet

### v0.19.0, 2023-8-
### v0.19.1, 2023-9-

- Fix a health overestimation with OpenBook open orders

When bids or asks crossed the oracle price, the serum3 health would be
overestimated before.

Now we track an account's max bid and min ask in each market and use that
as a worst-case price. The tracking isn't perfect for technical reasons
(compute cost, no notifications on fill) but produces an upper bound on
bids (lower bound on asks) that is sufficient to make health not
overestimate.

## mainnet

### v0.19.0, 2023-9-7

Deployment: Sep 7, 2023 at 13:10:08 Central European Summer Time, https://explorer.solana.com/tx/3xcQWmAinBjFF4QgUCS7v5KxS7CjUQMJmENBHMyMMoeNCdKpLQL6fJXcKRRDmzW4ajPUywgPxBzMoYJn9c8CteEP

- Token deposits and withdraws: Allow full withdraw or full borrow repays
even when the oracle is stale (#646, #675)
Expand Down Expand Up @@ -56,8 +73,6 @@ Update this for each program release and mainnet deployment.
- Flash loan: Better errors for missing banks (#639)
- OpenBook v2 integration: First draft of instructions (#628)

## mainnet

### v0.18.0, 2023-7-28

Deployment: Jul 28, 2023 at 08:29:46 Central European Summer Time, https://explorer.solana.com/tx/TaPcQ8dUDyFEaqprasGVEeG3x4Z2nMT7jY9tr2G8KVVf3kvDUQv8TRTjzDirasx3YkyYq3PmQcmcMbCcHsAnUNT
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 33 additions & 2 deletions mango_v4.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.19.0",
"version": "0.19.1",
"name": "mango_v4",
"instructions": [
{
Expand Down Expand Up @@ -8019,6 +8019,18 @@
"defined": "I80F48"
}
},
{
"name": "reservedBaseAsQuoteLowestAsk",
"type": {
"defined": "I80F48"
}
},
{
"name": "reservedQuoteAsBaseHighestBid",
"type": {
"defined": "I80F48"
}
},
{
"name": "baseInfoIndex",
"type": "u64"
Expand Down Expand Up @@ -8400,12 +8412,31 @@
]
}
},
{
"name": "highestPlacedBidInv",
"docs": [
"Track something like the highest open bid / lowest open ask, in native/native units.",
"",
"Tracking it exactly isn't possible since we don't see fills. So instead track",
"the min/max of the _placed_ bids and asks.",
"",
"The value is reset in serum3_place_order when a new order is placed without an",
"existing one on the book.",
"",
"0 is a special \"unset\" state."
],
"type": "f64"
},
{
"name": "lowestPlacedAsk",
"type": "f64"
},
{
"name": "reserved",
"type": {
"array": [
"u8",
64
48
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion programs/mango-v4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cargo-features = ["workspace-inheritance"]

[package]
name = "mango-v4"
version = "0.19.0"
version = "0.19.1"
description = "Created with Anchor"
edition = "2021"

Expand Down
70 changes: 66 additions & 4 deletions ts/client/src/mango_v4.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type MangoV4 = {
"version": "0.19.0",
"version": "0.19.1",
"name": "mango_v4",
"instructions": [
{
Expand Down Expand Up @@ -8019,6 +8019,18 @@ export type MangoV4 = {
"defined": "I80F48"
}
},
{
"name": "reservedBaseAsQuoteLowestAsk",
"type": {
"defined": "I80F48"
}
},
{
"name": "reservedQuoteAsBaseHighestBid",
"type": {
"defined": "I80F48"
}
},
{
"name": "baseInfoIndex",
"type": "u64"
Expand Down Expand Up @@ -8400,12 +8412,31 @@ export type MangoV4 = {
]
}
},
{
"name": "highestPlacedBidInv",
"docs": [
"Track something like the highest open bid / lowest open ask, in native/native units.",
"",
"Tracking it exactly isn't possible since we don't see fills. So instead track",
"the min/max of the _placed_ bids and asks.",
"",
"The value is reset in serum3_place_order when a new order is placed without an",
"existing one on the book.",
"",
"0 is a special \"unset\" state."
],
"type": "f64"
},
{
"name": "lowestPlacedAsk",
"type": "f64"
},
{
"name": "reserved",
"type": {
"array": [
"u8",
64
48
]
}
}
Expand Down Expand Up @@ -12562,7 +12593,7 @@ export type MangoV4 = {
};

export const IDL: MangoV4 = {
"version": "0.19.0",
"version": "0.19.1",
"name": "mango_v4",
"instructions": [
{
Expand Down Expand Up @@ -20582,6 +20613,18 @@ export const IDL: MangoV4 = {
"defined": "I80F48"
}
},
{
"name": "reservedBaseAsQuoteLowestAsk",
"type": {
"defined": "I80F48"
}
},
{
"name": "reservedQuoteAsBaseHighestBid",
"type": {
"defined": "I80F48"
}
},
{
"name": "baseInfoIndex",
"type": "u64"
Expand Down Expand Up @@ -20963,12 +21006,31 @@ export const IDL: MangoV4 = {
]
}
},
{
"name": "highestPlacedBidInv",
"docs": [
"Track something like the highest open bid / lowest open ask, in native/native units.",
"",
"Tracking it exactly isn't possible since we don't see fills. So instead track",
"the min/max of the _placed_ bids and asks.",
"",
"The value is reset in serum3_place_order when a new order is placed without an",
"existing one on the book.",
"",
"0 is a special \"unset\" state."
],
"type": "f64"
},
{
"name": "lowestPlacedAsk",
"type": "f64"
},
{
"name": "reserved",
"type": {
"array": [
"u8",
64
48
]
}
}
Expand Down

0 comments on commit 816078e

Please sign in to comment.