-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix partial fill of global bid (#315)
* Fix partial fill of global bid * Comment * fmt
- Loading branch information
Showing
3 changed files
with
121 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
## Updates since audit: | ||
|
||
Global with token 22 with transfer fees could result in a loss of funds from incorrect accounting when moving from the global account to the market. Fixed in [https://github.com/CKS-Systems/manifest/pull/209](https://github.com/CKS-Systems/manifest/pull/209 "https://github.com/CKS-Systems/manifest/pull/209"). Was discovered and patched before any globals were created with transfer fees, so we know there was no cleanup to do. | ||
|
||
Rounding on cancel. This issue was discovered in the audit. And it was fixed in [https://github.com/CKS-Systems/manifest/pull/140](https://github.com/CKS-Systems/manifest/pull/140 "https://github.com/CKS-Systems/manifest/pull/140"), however during merge of the formal verification rules, it was reintroduced [https://github.com/CKS-Systems/manifest/pull/294](https://github.com/CKS-Systems/manifest/pull/294 "https://github.com/CKS-Systems/manifest/pull/294"). The daily formal verification did not catch them because those rules were incorrectly disabled. This was fixed in [https://github.com/CKS-Systems/manifest/pull/310](https://github.com/CKS-Systems/manifest/pull/310 "https://github.com/CKS-Systems/manifest/pull/310"). The scope of this issue is that if a bid required rounding for quote, then on cancel, there would be one quote atom less received by their claimedSeat. The rule has since been enabled and passing. | ||
|
||
Global bringing incorrect amount to the market. Typo with which amount traded to bring over to the market resulted in more tokens brought over on a fill and not accounted for on the market. While it could have been less, because of prices it never was. Fixed in [https://github.com/CKS-Systems/manifest/pull/311](https://github.com/CKS-Systems/manifest/pull/311 "https://github.com/CKS-Systems/manifest/pull/311"). The impact was limited to users who had a global order filled, and at the time of the fix, was just dev accounts. To detect any similar issues in the future, the balance-checker.ts script was added. | ||
- Global with token 22 with transfer fees could result in a loss of funds from incorrect accounting when moving from the global account to the market. Fixed in [https://github.com/CKS-Systems/manifest/pull/209](https://github.com/CKS-Systems/manifest/pull/209 "https://github.com/CKS-Systems/manifest/pull/209"). Was discovered and patched before any globals were created with transfer fees, so we know there was no cleanup to do. | ||
- Rounding on cancel. This issue was discovered in the audit. And it was fixed in [https://github.com/CKS-Systems/manifest/pull/140](https://github.com/CKS-Systems/manifest/pull/140 "https://github.com/CKS-Systems/manifest/pull/140"), however during merge of the formal verification rules, it was reintroduced [https://github.com/CKS-Systems/manifest/pull/294](https://github.com/CKS-Systems/manifest/pull/294 "https://github.com/CKS-Systems/manifest/pull/294"). The daily formal verification did not catch them because those rules were incorrectly disabled. This was fixed in [https://github.com/CKS-Systems/manifest/pull/310](https://github.com/CKS-Systems/manifest/pull/310 "https://github.com/CKS-Systems/manifest/pull/310"). The scope of this issue is that if a bid required rounding for quote, then on cancel, there would be one quote atom less received by their claimedSeat. The rule has since been enabled and passing. | ||
- Global bringing incorrect amount to the market. Typo with which amount traded to bring over to the market resulted in more tokens brought over on a fill and not accounted for on the market. While it could have been less, because of prices it never was. Fixed in [https://github.com/CKS-Systems/manifest/pull/311](https://github.com/CKS-Systems/manifest/pull/311 "https://github.com/CKS-Systems/manifest/pull/311"). The impact was limited to users who had a global order filled, and at the time of the fix, was just dev accounts. To detect any similar issues in the future, the balance-checker.ts script was added. | ||
- Partial fill on global bid loses 1 atom. Fixed in [https://github.com/CKS-Systems/manifest/pull/315](https://github.com/CKS-Systems/manifest/pull/315). Max loss was 1 atom of quote on a partial fill of a global bid. Scope was < 100 USDC atoms total. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters