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

chore: add tests for uint80 add collateral protection #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

swissarmytowel
Copy link
Contributor

@swissarmytowel swissarmytowel commented Apr 12, 2024

Summary

Describe the changes made in your pull request here.

Details

Any implementation detail worth pointing out, if any.

Todo

Breakdown the progress of the PR for everyone to see what else you intend to include in this PR.

  • Draft implementation for function
  • Unit tests for function

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Add natspec for all functions / parameters
  • Ran forge snapshot
  • Ran forge fmt
  • Ran forge test
  • Triage Slither issues, and post uncertain ones in the PR

Copy link

Gas usage comparison:

Test Name Gas Diff Percentage Change
CashEngineProxyTest:testCanUpgradeToAnotherUUPSContract() ♻️ -4983 -0.80%
CashEngineProxyTest:testCannotPermitAccountAccessCrossProxy() ♻️ -10230 -2.05%
CashEngineProxyTest:testCannotUpgradeFromNonOwner() ⛽ +18 0.11%
CashEngineProxyTest:testCannotUpgradeTov3() ♻️ -9986 -0.81%
CashEngineProxyTest:testImplementationIsInitialized() ⛽ +6 0.05%
CashEngineProxyTest:testProxyIsInitialized() ⛽ +18 0.11%
CashEngineProxyTest:testProxyOwnerIsSelf() ⛽ +12 0.10%
CrossMarginCashEngineAccessTest:testCanAccessAccountIfOriginIsFundAdmin() ⛽ +236 0.15%
CrossMarginCashEngineAccessTest:testCanAccessAccountIfOriginIsSender() ⛽ +252 0.16%
CrossMarginCashEngineAccessTest:testCannotAccessAccountIfCallerHasNoRole() ⛽ +347 0.19%
CrossMarginCashEngineAccessTest:testCannotAccessAccountIfOriginIsNotAdmin() ⛽ +99 0.17%
CrossMarginCashEngineAccessTest:testCannotAccessAccountIfOriginIsSenderNotFA() ⛽ +87 0.16%
CrossMarginCashEngineAccessTest:testCannotTransferToOverrideAnotherAccount() ⛽ +242 0.17%
CrossMarginCashEngineAccessTest:testCannotTransferUnAuthorizedAccount() ⛽ +12 0.08%
CrossMarginCashEngineAccessTest:testTransferCMAccount() ⛽ +272 0.18%
CrossMarginCashEngineSignedAccessTest:testCanSetAccess() ⛽ +409 0.19%
CrossMarginCashEngineSignedAccessTest:testCanSetAccessToZero() ⛽ +484 0.23%
CrossMarginCashEngineSignedAccessTest:testRevertsOnInvalidAccount() ⛽ +69 0.14%
CrossMarginCashEngineSignedAccessTest:testRevertsOnInvalidActor() ⛽ +69 0.14%
CrossMarginCashEngineSignedAccessTest:testRevertsOnInvalidExecutionsNum() ⛽ +69 0.14%
CrossMarginCashEngineSignedAccessTest:testRevertsOnInvalidNonce() ⛽ +69 0.14%
CrossMarginCashEngineSignedAccessTest:testRevertsOnInvalidPrivateKey() ⛽ +69 0.15%
CrossMarginCashEngineSignedAccessTest:testRevertsOnMismatchingAccount() ⛽ +69 0.14%
CrossMarginCashEngineSignedAccessTest:testRevertsOnNoSignature() ⛽ +24 0.05%
CrossMarginPhysicalEngineAccessTest:testCanAccessAccountIfOriginIsFundAdmin() ⛽ +176 0.11%
CrossMarginPhysicalEngineAccessTest:testCanAccessAccountIfOriginIsSender() ⛽ +192 0.12%
CrossMarginPhysicalEngineAccessTest:testCannotAccessAccountIfCallerHasNoRole() ⛽ +263 0.15%
CrossMarginPhysicalEngineAccessTest:testCannotAccessAccountIfOriginIsNotAdmin() ⛽ +75 0.13%
CrossMarginPhysicalEngineAccessTest:testCannotAccessAccountIfOriginIsSenderNotFA() ⛽ +63 0.12%
CrossMarginPhysicalEngineAccessTest:testCannotTransferToOverrideAnotherAccount() ⛽ +158 0.11%
CrossMarginPhysicalEngineAccessTest:testCannotTransferUnAuthorizedAccount() ⛽ +12 0.08%
CrossMarginPhysicalEngineAccessTest:testTransferCMAccount() ⛽ +164 0.11%
CrossMarginPhysicalEngineSignedAccessTest:testCanSetAccess() ⛽ +349 0.16%
CrossMarginPhysicalEngineSignedAccessTest:testCanSetAccessToZero() ⛽ +424 0.20%
CrossMarginPhysicalEngineSignedAccessTest:testRevertsOnInvalidAccount() ⛽ +69 0.14%
CrossMarginPhysicalEngineSignedAccessTest:testRevertsOnInvalidActor() ⛽ +69 0.14%
CrossMarginPhysicalEngineSignedAccessTest:testRevertsOnInvalidExecutionsNum() ⛽ +69 0.14%
CrossMarginPhysicalEngineSignedAccessTest:testRevertsOnInvalidNonce() ⛽ +69 0.14%
CrossMarginPhysicalEngineSignedAccessTest:testRevertsOnInvalidPrivateKey() ⛽ +69 0.15%
CrossMarginPhysicalEngineSignedAccessTest:testRevertsOnMismatchingAccount() ⛽ +69 0.14%
CrossMarginPhysicalEngineSignedAccessTest:testRevertsOnNoSignature() ⛽ +24 0.05%
Deploy:testUtils() ♻️ -23 -19.01%
DeployPhysicalMarginEngine:testUtils() ♻️ -23 -19.01%
General_CMC:testCannotCallAddLongWithExpiredToken() ⛽ +117 0.25%
General_CMC:testCannotCallAddLongWithNotAuthorizedEngine() ⛽ +153 0.20%
General_CMC:testCannotCallPayoutFromAnybody() ⛽ +57 0.15%
General_CMC:testCannotCallRemoveLongNotInAccount() ⛽ +117 0.22%
General_CMC:testGetMinCollateral() ⛽ +572 0.19%
General_CMP:testCannotCallAddLongWithExpiredOption() ⛽ +57 0.12%
General_CMP:testCannotCallAddLongWithNotAuthorizedEngine() ⛽ +93 0.13%
General_CMP:testCannotCallPayoutFromAnybody() ⛽ +57 0.15%
General_CMP:testCannotCallRemoveLongNotInAccount() ⛽ +57 0.11%
General_CMP:testGetMinCollateral() ⛽ +248 0.08%
Permissioned_CMC:testAliceCanSettleOption() ⛽ +530 0.15%
Permissioned_CMC:testCanExecute() ⛽ +206 0.14%
Permissioned_CMC:testCannotExecute() ⛽ +81 0.16%
Permissioned_CMC:testCannotSettleOption() ⛽ +521 0.14%
Permissioned_CMP:testAliceCanSettleOption() ⛽ +386 0.10%
Permissioned_CMP:testCanExecute() ⛽ +146 0.10%
Permissioned_CMP:testCannotExecute() ⛽ +57 0.12%
Permissioned_CMP:testCannotSettleOption() ⛽ +299 0.08%
PhysicalEngineProxyTest:testCanUpgradeToAnotherUUPSContract() ♻️ -4983 -0.80%
PhysicalEngineProxyTest:testCannotPermitAccountAccessCrossProxy() ♻️ -10230 -2.05%
PhysicalEngineProxyTest:testCannotUpgradeFromNonOwner() ⛽ +18 0.11%
PhysicalEngineProxyTest:testCannotUpgradeTov3() ♻️ -9986 -0.81%
PhysicalEngineProxyTest:testImplementationIsInitialized() ⛽ +6 0.05%
PhysicalEngineProxyTest:testProxyIsInitialized() ⛽ +18 0.11%
PhysicalEngineProxyTest:testProxyOwnerIsSelf() ⛽ +12 0.09%
PreviewCollateralReq_CMCM:testConversion() ⛽ +552 0.48%
PreviewCollateralReq_CMCM:testIronCondor() ⛽ +384 0.33%
PreviewCollateralReq_CMCM:testLongPutSpread() ⛽ +222 0.34%
PreviewCollateralReq_CMCM:testLongStrangleSpread2() ⛽ +348 0.31%
PreviewCollateralReq_CMCM:testLongStrangles() ⛽ +240 0.33%
PreviewCollateralReq_CMCM:testMarginBinaryCallOption() ⛽ +222 0.34%
PreviewCollateralReq_CMCM:testMarginCallSpreadSameUnderlyingCollateral() ⛽ +240 0.34%
PreviewCollateralReq_CMCM:testMarginCallSpreadSameUnderlyingCollateralBiggerNumbers() ⛽ +240 0.34%
PreviewCollateralReq_CMCM:testMarginLongBinaryPut() ⛽ +222 0.34%
PreviewCollateralReq_CMCM:testMarginRequirement1() ⛽ +438 0.28%
PreviewCollateralReq_CMCM:testMarginRequirement2() ⛽ +438 0.28%
PreviewCollateralReq_CMCM:testMarginRequirement3() ⛽ +456 0.29%
PreviewCollateralReq_CMCM:testMarginRequirement4() ⛽ +438 0.28%
PreviewCollateralReq_CMCM:testMarginRequirementsVanillaCall() ⛽ +204 0.36%
PreviewCollateralReq_CMCM:testMarginRequirementsVanillaPut() ⛽ +204 0.36%
PreviewCollateralReq_CMCM:testMarginShortBinaryPut() ⛽ +240 0.35%
PreviewCollateralReq_CMCM:testMarginSimpleITMCall() ⛽ +204 0.36%
PreviewCollateralReq_CMCM:testMarginSimpleITMPut() ⛽ +204 0.36%
PreviewCollateralReq_CMCM:testMarginSimpleOTMCall() ⛽ +204 0.36%
PreviewCollateralReq_CMCM:testMarginSimplePut() ⛽ +204 0.36%
PreviewCollateralReq_CMCM:testMarginUnsortedStrikes() ⛽ +438 0.28%
PreviewCollateralReq_CMCM:testOneByTwoCall() ⛽ +330 0.39%
PreviewCollateralReq_CMCM:testOneByTwoPut() ⛽ +348 0.39%
PreviewCollateralReq_CMCM:testPutGreaterThanCalls() ⛽ +366 0.32%
PreviewCollateralReq_CMCM:testShortPutSpread() ⛽ +240 0.35%
PreviewCollateralReq_CMCM:testShortStrangles() ⛽ +276 0.36%
PreviewCollateralReq_CMCM:testStrangleSpread() ⛽ +366 0.32%
PreviewCollateralReq_CMCM:testStrangleSpread2() ⛽ +366 0.32%
PreviewCollateralReq_CMCM:testUpAndDown1() ⛽ +222 0.34%
PreviewCollateralReq_CMCM:testUpAndDown2() ⛽ +240 0.35%
PreviewCollateralReq_CMCM:testUpAndDown3() ⛽ +294 0.32%
PreviewCollateralReq_CMCM:testUpAndDown4() ⛽ +366 0.32%
PreviewCollateralReq_CMPM:testConversion() ⛽ +144 0.13%
PreviewCollateralReq_CMPM:testIronCondor() ⛽ +108 0.10%
PreviewCollateralReq_CMPM:testLongPutSpread() ⛽ +42 0.07%
PreviewCollateralReq_CMPM:testLongStrangles() ⛽ +60 0.09%
PreviewCollateralReq_CMPM:testMarginBinaryCallOption() ⛽ +42 0.07%
PreviewCollateralReq_CMPM:testMarginCallSpreadSameUnderlyingCollateral() ⛽ +48 0.07%
PreviewCollateralReq_CMPM:testMarginCallSpreadSameUnderlyingCollateralBiggerNumbers() ⛽ +48 0.07%
PreviewCollateralReq_CMPM:testMarginLongBinaryPut() ⛽ +42 0.07%
PreviewCollateralReq_CMPM:testMarginRequirement1() ⛽ +102 0.07%
PreviewCollateralReq_CMPM:testMarginRequirement2() ⛽ +102 0.07%
PreviewCollateralReq_CMPM:testMarginRequirement3() ⛽ +108 0.07%
PreviewCollateralReq_CMPM:testMarginRequirement4() ⛽ +102 0.07%
PreviewCollateralReq_CMPM:testMarginRequirementsVanillaCall() ⛽ +48 0.09%
PreviewCollateralReq_CMPM:testMarginRequirementsVanillaPut() ⛽ +48 0.09%
PreviewCollateralReq_CMPM:testMarginShortBinaryPut() ⛽ +48 0.07%
PreviewCollateralReq_CMPM:testMarginSimpleCall() ⛽ +48 0.09%
PreviewCollateralReq_CMPM:testMarginSimplePut() ⛽ +48 0.09%
PreviewCollateralReq_CMPM:testMarginUnsortedStrikes() ⛽ +102 0.07%
PreviewCollateralReq_CMPM:testOneByTwoCall() ⛽ +66 0.08%
PreviewCollateralReq_CMPM:testOneByTwoPut() ⛽ +84 0.10%
PreviewCollateralReq_CMPM:testPutGreaterThanCalls() ⛽ +102 0.09%
PreviewCollateralReq_CMPM:testShortPutSpread() ⛽ +48 0.07%
PreviewCollateralReq_CMPM:testShortStrangles() ⛽ +72 0.10%
PreviewCollateralReq_CMPM:testStrangleSpread() ⛽ +102 0.09%
PreviewCollateralReq_CMPM:testStrangleSpread2() ⛽ +102 0.09%
PreviewCollateralReq_CMPM:testUpAndDown1() ⛽ +42 0.07%
PreviewCollateralReq_CMPM:testUpAndDown2() ⛽ +48 0.07%
PreviewCollateralReq_CMPM:testUpAndDown3() ⛽ +78 0.09%
PreviewCollateralReq_CMPM:testUpAndDown4() ⛽ +102 0.09%
TestAddCollateral_CMC:testAddCollateralChangeStorage() ⛽ +272 0.18%
TestAddCollateral_CMC:testAddCollateralLoopMoveBalances() ⛽ +529 0.33%
TestAddCollateral_CMC:testAddCollateralMoveBalance() ⛽ +217 0.15%
TestAddCollateral_CMC:testAddMultipleCollateralHasNoSideEffects() ⛽ +448 0.19%
TestAddCollateral_CMC:testCanAddDifferentCollateralToSameAccount() ⛽ +415 0.19%
TestAddCollateral_CMC:testCannotAddCollatFromOthers() ⛽ +237 0.49%
TestAddCollateral_CMP:test() ⛽ +22 11.76%
TestAddCollateral_CMP:testAddCollateralChangeStorage() ⛽ +234 0.16%
TestAddCollateral_CMP:testAddCollateralLoopMoveBalances() ⛽ +385 0.24%
TestAddCollateral_CMP:testAddCollateralMoveBalance() ⛽ +157 0.11%
TestAddCollateral_CMP:testAddMultipleCollateralHasNoSideEffects() ⛽ +362 0.15%
TestAddCollateral_CMP:testCanAddDifferentCollateralToSameAccount() ⛽ +307 0.14%
TestAddCollateral_CMP:testCannotAddCollatFromOthers() ⛽ +213 0.44%
TestAddCollateral_CMP:testForgeCoverageIgnoreThis() ⛽ +22 13.41%
TestAddLong_CMC:testAddLongCallToken() ⛽ +1159 0.21%
TestAddLong_CMC:testAddLongPutToken() ⛽ +1159 0.21%
TestAddLong_CMP:testAddLongCallToken() ⛽ +475 0.08%
TestAddLong_CMP:testAddLongPutToken() ⛽ +475 0.08%
TestBatchExecute_CMC:testMintSpreadChecksCollateralAfterBatch() ⛽ +1171 0.19%
TestBatchExecute_CMC:testMintTwoSidedStructure() ⛽ +1183 0.18%
TestBatchExecute_CMC:testMintTwoSidesSameOption() ⛽ +1135 0.19%
TestBatchExecute_CMP:testMintSpreadChecksCollateralAfterBatch() ⛽ +487 0.07%
TestBatchExecute_CMP:testMintTwoSidedStructure() ⛽ +487 0.07%
TestBatchExecute_CMP:testMintTwoSidesSameOption() ⛽ +463 0.07%
TestBurnOptionFromAccount_CMC:testBurnFromAccount() ⛽ +238 0.19%
TestBurnOptionFromAccount_CMC:testCanBurnFromSubAccount() ⛽ +626 0.22%
TestBurnOptionFromAccount_CMC:testCannotBurnFromEmptySubAccount() ⛽ +141 0.19%
TestBurnOptionFromAccount_CMC:testCannotBurnFromUnAuthorizedAccount() ⛽ +99 0.19%
TestBurnOptionFromAccount_CMC:testCannotBurnFromWithWrongTokenId() ⛽ +129 0.19%
TestBurnOptionFromAccount_CMC:testCannotBurnWhenOptionTokenBalanceIsLow() ⛽ +219 0.15%
TestBurnOptionFromAccount_CMP:testBurnFromAccount() ⛽ +112 0.09%
TestBurnOptionFromAccount_CMP:testCanBurnFromSubAccount() ⛽ +289 0.10%
TestBurnOptionFromAccount_CMP:testCannotBurnFromEmptySubAccount() ⛽ +57 0.08%
TestBurnOptionFromAccount_CMP:testCannotBurnFromUnAuthorizedAccount() ⛽ +51 0.10%
TestBurnOptionFromAccount_CMP:testCannotBurnFromWithWrongTokenId() ⛽ +69 0.10%
TestBurnOptionFromAccount_CMP:testCannotBurnWhenOptionTokenBalanceIsLow() ⛽ +111 0.07%
TestBurnOption_CMC:testBurn() ⛽ +183 0.21%
TestBurnOption_CMC:testCannotBurnForEmptyAccount() ⛽ +111 0.20%
TestBurnOption_CMC:testCannotBurnFromUnAuthorizedAccount() ⛽ +99 0.11%
TestBurnOption_CMC:testCannotBurnWhenOptionTokenBalanceIsLow() ⛽ +153 0.12%
TestBurnOption_CMC:testCannotBurnWithWrongTokenId() ⛽ +111 0.18%
TestBurnOption_CMP:testBurn() ⛽ +99 0.11%
TestBurnOption_CMP:testCannotBurnForEmptyAccount() ⛽ +51 0.09%
TestBurnOption_CMP:testCannotBurnFromUnAuthorizedAccount() ⛽ +51 0.06%
TestBurnOption_CMP:testCannotBurnWhenOptionTokenBalanceIsLow() ⛽ +69 0.06%
TestBurnOption_CMP:testCannotBurnWithWrongTokenId() ⛽ +51 0.08%
TestCornerCases_CMCM:testPotentialBreakOnZeroWeight() ⛽ +18 0.05%
TestCornerCases_CMPM:testPotentialBreakOnZeroWeight() ⛽ +18 0.05%
TestExerciseLongPositions_CMP:testCanClearLongCallAfterExpiryBeforeWindowClosed() ⛽ +493 0.11%
TestExerciseLongPositions_CMP:testCanClearLongPastExerciseWindow() ⛽ +326 0.09%
TestExerciseLongPositions_CMP:testCanClearLongPortion() ⛽ +562 0.11%
TestExerciseLongPositions_CMP:testCanClearMultipleLongCallAfterExpiryBeforeWindowClosed() ⛽ +672 0.10%
TestExerciseLongPositions_CMP:testCanClearPortionPut() ⛽ +493 0.11%
TestExerciseLongPositions_CMP:testCanClearPutBeforeWindowClosed() ⛽ +493 0.11%
TestExerciseLongPositions_CMP:testCannotClearLongCallAfterWindowClosed() ⛽ +350 0.10%
TestExerciseLongPositions_CMP:testCannotClearLongPutAfterWindowClosed() ⛽ +350 0.10%
TestExerciseLongPositions_CMP:testCannotClearLongWithExceededAmount() ⛽ +332 0.08%
TestLongShortSettlement:testShortsAreSettledBeforeLongs() ⛽ +1489 0.24%
TestMintIntoAccount_CMC:testMintIntoAccountCall() ⛽ +599 0.17%
TestMintIntoAccount_CMP:testMintIntoAccountCall() ⛽ +263 0.07%
TestMintWithPartialMarginBeta_CMC:testCannotMintTooLittleCollateral() ⛽ +769 0.16%
TestMintWithPartialMarginBeta_CMC:testMintCall() ⛽ +482 0.16%
TestMintWithPartialMarginBeta_CMC:testMintCallWithHigherValueCollateral() ⛽ +482 0.16%
TestMintWithPartialMarginBeta_CMC:testMintCallWithSimilarCollateral() ⛽ +638 0.16%
TestMintWithPartialMarginBeta_CMC:testMintMixedBag() ⛽ +1164 0.17%
TestMintWithPartialMarginBeta_CMC:testMintMixedBagWithVariableValueCollateral() ⛽ +1128 0.17%
TestMintWithPartialMarginBeta_CMC:testMintPut() ⛽ +482 0.16%
TestMintWithPartialMarginBeta_CMC:testMintPutWithHigherValueCollateral() ⛽ +482 0.16%
TestMintWithPartialMarginBeta_CMC:testMintPutWithSimilarCollateral() ⛽ +638 0.16%
TestMintWithPartialMarginBeta_CMC:testRemovePartialMarginMask() ⛽ +288 0.27%
TestMintWithPartialMarginBeta_CMC:testSameAssetPartialMarginMask() ⛽ +36 0.15%
TestMintWithPartialMarginBeta_CMP:testCannotMintTooLittleCollateral() ⛽ +439 0.08%
TestMintWithPartialMarginBeta_CMP:testMintCall() ⛽ +248 0.08%
TestMintWithPartialMarginBeta_CMP:testMintCallWithHigherValueCollateral() ⛽ +248 0.07%
TestMintWithPartialMarginBeta_CMP:testMintCallWithSimilarCollateral() ⛽ +296 0.07%
TestMintWithPartialMarginBeta_CMP:testMintMixedBag() ⛽ +684 0.09%
TestMintWithPartialMarginBeta_CMP:testMintMixedBagWithVariableValueCollateral() ⛽ +636 0.08%
TestMintWithPartialMarginBeta_CMP:testMintPut() ⛽ +248 0.08%
TestMintWithPartialMarginBeta_CMP:testMintPutWithHigherValueCollateral() ⛽ +248 0.07%
TestMintWithPartialMarginBeta_CMP:testMintPutWithSimilarCollateral() ⛽ +296 0.07%
TestMint_CMC:testCanMintOnBehalfOf() ⛽ +536 0.17%
TestMint_CMC:testCannotMintCallSpread() ⛽ +242 0.16%
TestMint_CMC:testCannotMintCallWithLittleCollateral() ⛽ +446 0.15%
TestMint_CMC:testCannotMintExpiredOption() ⛽ +165 0.13%
TestMint_CMC:testCannotMintPutSpread() ⛽ +242 0.16%
TestMint_CMC:testCannotMintPutWithLittleCollateral() ⛽ +446 0.16%
TestMint_CMC:testCannotMintWithoutCollateral() ⛽ +315 0.16%
TestMint_CMC:testMintCall() ⛽ +482 0.17%
TestMint_CMC:testMintCallAndPutInSameAccount() ⛽ +817 0.17%
TestMint_CMC:testMintPut() ⛽ +482 0.17%
TestMint_CMP:testCanMintOnBehalfOf() ⛽ +236 0.07%
TestMint_CMP:testCannotMintCallWithLittleCollateral() ⛽ +224 0.07%
TestMint_CMP:testCannotMintExpiredOption() ⛽ +81 0.06%
TestMint_CMP:testCannotMintPutWithLittleCollateral() ⛽ +206 0.07%
TestMint_CMP:testCannotMintWithoutCollateral() ⛽ +111 0.05%
TestMint_CMP:testMintCall() ⛽ +218 0.07%
TestMint_CMP:testMintCallAndPutInSameAccount() ⛽ +409 0.08%
TestMint_CMP:testMintPut() ⛽ +218 0.07%
TestPMRemoveCollateral_CMC:testEqualCallSpreadCollateralWithdraw() ⛽ +1894 0.25%
TestPMRemoveCollateral_CMC:testEqualPutSpreadCollateralWithdraw() ⛽ +1894 0.25%
TestPMRemoveCollateral_CMC:testEqualShortLongAllowCollateralWithdraw() ⛽ +1906 0.28%
TestPMRemoveCollateral_CMP:testEqualCallSpreadCollateralWithdraw() ⛽ +754 0.10%
TestPMRemoveCollateral_CMP:testEqualPutSpreadCollateralWithdraw() ⛽ +754 0.10%
TestPMRemoveCollateral_CMP:testEqualShortLongAllowCollateralWithdraw() ⛽ +742 0.11%
TestPMSettleLongCalls_CMC:testSettleLongCallITMIncreasesCollateral() ⛽ +321 0.17%
TestPMSettleLongCalls_CMC:testSettleLongCallOTMNoIncreaseInCollateral() ⛽ +261 0.18%
TestPMSettleLongCalls_CMC:testSettleMultipleLongCallsITMIncreasesCollateral() ⛽ +986 0.25%
TestPMSettleLongCalls_CMC:testSettleMultipleLongCallsOTMNoIncreaseInCollateral() ⛽ +861 0.25%
TestPMSettleLongCalls_CMC:testSettleOnlyExpiredLongCallOTMNoIncreaseInCollateral() ⛽ +956 0.27%
TestPMSettleLongPutsCM:testSettleLongCallITMIncreasesCollateral() ⛽ +321 0.17%
TestPMSettleLongPutsCM:testSettleLongCallOTMNoIncreaseInCollateral() ⛽ +261 0.18%
TestPMSettleLongStrangleSpreadCM:testSettleLongCallInnerITM() ⛽ +672 0.19%
TestPMSettleLongStrangleSpreadCM:testSettleLongCallOuterITM() ⛽ +816 0.22%
TestPMSettleLongStrangleSpreadCM:testSettleLongPutInnerITM() ⛽ +662 0.19%
TestPMSettleLongStrangleSpreadCM:testSettleLongPutOuterITM() ⛽ +816 0.22%
TestPMSettleLongStrangleSpreadCM:testSettleShortPutOTM() ⛽ +538 0.17%
TestPreviewCollateralAvailablePM_CMC:testPreviewCollateralAvailableCall() ⛽ +288 0.35%
TestPreviewCollateralAvailablePM_CMC:testPreviewCollateralAvailablePut() ⛽ +288 0.34%
TestPreviewCollateralAvailablePM_CMC:testPreviewCollateralEqualCallSpread() ⛽ +324 0.42%
TestPreviewCollateralAvailablePM_CMC:testPreviewCollateralEqualPutSpread() ⛽ +330 0.44%
TestPreviewCollateralAvailablePM_CMC:testPreviewCollateralEqualShortLong() ⛽ +276 0.50%
TestPreviewCollateralAvailablePM_CMC:testPreviewMixedBagWithVariableValueCollateral() ⛽ +480 0.30%
TestPreviewCollateralAvailablePM_CMC:testPreviewWithHigherValueCollatCall() ⛽ +288 0.36%
TestPreviewCollateralAvailablePM_CMC:testPreviewWithHigherValueCollatPut() ⛽ +288 0.35%
TestPreviewCollateralAvailablePM_CMP:testPreviewCollateralAvailableCall() ⛽ +90 0.11%
TestPreviewCollateralAvailablePM_CMP:testPreviewCollateralAvailablePut() ⛽ +90 0.11%
TestPreviewCollateralAvailablePM_CMP:testPreviewCollateralEqualCallSpread() ⛽ +60 0.08%
TestPreviewCollateralAvailablePM_CMP:testPreviewCollateralEqualPutSpread() ⛽ +66 0.09%
TestPreviewCollateralAvailablePM_CMP:testPreviewCollateralEqualShortLong() ⛽ +36 0.07%
TestPreviewCollateralAvailablePM_CMP:testPreviewMixedBagWithVariableValueCollateral() ⛽ +252 0.16%
TestPreviewCollateralAvailablePM_CMP:testPreviewWithHigherValueCollatCall() ⛽ +90 0.11%
TestPreviewCollateralAvailablePM_CMP:testPreviewWithHigherValueCollatPut() ⛽ +90 0.11%
TestPreviewCollateralAvailable_CMC:testPreviewCollateralAvailable() ⛽ +402 0.42%
TestPreviewCollateralAvailable_CMC:testPreviewCollateralAvailableNoCollat() ⛽ +174 0.86%
TestPreviewCollateralAvailable_CMC:testPreviewCollateralAvailableUnderwater() ⛽ +288 0.46%
TestPreviewCollateralAvailable_CMC:testPreviewCollateralAvailableUnusedCollat() ⛽ +198 0.78%
TestPreviewCollateralAvailable_CMC:testPreviewCollateralAvailableUsingHalf() ⛽ +402 0.42%
TestPreviewCollateralAvailable_CMP:testPreviewCollateralAvailable() ⛽ +138 0.15%
TestPreviewCollateralAvailable_CMP:testPreviewCollateralAvailableNoCollat() ⛽ +18 0.09%
TestPreviewCollateralAvailable_CMP:testPreviewCollateralAvailableUnderwater() ⛽ +60 0.10%
TestPreviewCollateralAvailable_CMP:testPreviewCollateralAvailableUnusedCollat() ⛽ +18 0.07%
TestPreviewCollateralAvailable_CMP:testPreviewCollateralAvailableUsingHalf() ⛽ +138 0.15%
TestRemoveCollateral_CMC:testCannotRemoveDifferentCollateral() ⛽ +129 0.23%
TestRemoveCollateral_CMC:testCannotRemoveMoreThanOwn() ⛽ +123 0.21%
TestRemoveCollateral_CMC:testMultipleCollateralsAddRemove() ⛽ +2031 0.62%
TestRemoveCollateral_CMC:testRemoveCollateralChangeStorage() ⛽ +192 0.23%
TestRemoveCollateral_CMC:testRemoveCollateralMoveBalance() ⛽ +180 0.21%
TestRemoveCollateral_CMC:testRemoveCollateralRetainBalances() ⛽ +335 0.24%
TestRemoveCollateral_CMP:testCannotRemoveDifferentCollateral() ⛽ +69 0.12%
TestRemoveCollateral_CMP:testCannotRemoveMoreThanOwn() ⛽ +51 0.09%
TestRemoveCollateral_CMP:testMultipleCollateralsAddRemove() ⛽ +1035 0.32%
TestRemoveCollateral_CMP:testRemoveCollateralChangeStorage() ⛽ +96 0.12%
TestRemoveCollateral_CMP:testRemoveCollateralMoveBalance() ⛽ +84 0.10%
TestRemoveCollateral_CMP:testRemoveCollateralRetainBalances() ⛽ +179 0.13%
TestRemoveLong_CMC:testRemoveLongToken() ⛽ +921 0.22%
TestRemoveLong_CMP:testRemoveLongToken() ⛽ +449 0.10%
TestSettleCollateralizedPut_CMC:testSellerCanClearOnlyExpiredOptions() ⛽ +959 0.33%
TestSettleCollateralizedPut_CMC:testSellerCollateralIsReducedIfExpiresITM() ⛽ +327 0.24%
TestSettleCollateralizedPut_CMC:testShouldGetNothingIfExpiresOTM() ⛽ +90 0.07%
TestSettleCollateralizedPut_CMC:testShouldGetPayoutIfExpiresIMT() ⛽ +90 0.07%
TestSettleCollateralizedPut_CMP:testShouldGetPutPayoutAndDeductedDebt() ⛽ +180 0.08%
TestSettleCollateralizedPut_CMP:testShouldGetPutPayoutAndDeductedDebtFromSender() ⛽ +198 0.08%
TestSettleCoveredCall_CMC:testSellerCanClearDebtIfExpiresOTM() ⛽ +231 0.18%
TestSettleCoveredCall_CMC:testSellerCanClearMultipleExpiredOptions() ⛽ +773 0.28%
TestSettleCoveredCall_CMC:testSellerCanClearOnlyExpiredOptions() ⛽ +959 0.32%
TestSettleCoveredCall_CMC:testSellerCollateralIsReducedIfExpiresITM() ⛽ +327 0.24%
TestSettleCoveredCall_CMC:testShouldGetNothingIfExpiresOTM() ⛽ +90 0.07%
TestSettleCoveredCall_CMC:testShouldGetPayoutIfExpiresIMT() ⛽ +90 0.06%
TestSettleCoveredCall_CMP:testShouldGetCallPayoutAndDeductedDebt() ⛽ +180 0.09%
TestSettleCoveredCall_CMP:testShouldGetCallPayoutAndDeductedDebtFromSender() ⛽ +198 0.08%
TestSettleOptionPartialMargin_CMC:testCallITM() ⛽ +839 0.23%
TestSettleOptionPartialMargin_CMC:testPutITM() ⛽ +839 0.23%
TestSettleOptionPartialMargin_CMP:testCall() ⛽ +515 0.11%
TestSettleOptionPartialMargin_CMP:testPut() ⛽ +515 0.11%
TestSettleOption_CMP:testGetsNothingFromOptionPastExerciseWindow() ⛽ +36 0.06%
TestSettleShortPositions_CMP:testSellerCanClearCallDebtAfterWindowClosed() ⛽ +305 0.10%
TestSettleShortPositions_CMP:testSellerCanClearPartialCallDebtAfterWindowClosed() ⛽ +485 0.10%
TestSettleShortPositions_CMP:testSellerCanClearPartialPutDebtAfterWindowClosed() ⛽ +485 0.10%
TestSettleShortPositions_CMP:testSellerCanClearPutDebtAfterWindowClosed() ⛽ +305 0.10%
TestSettleShortPositions_CMP:testSellerCannotClearCallDebtAfterExpiryBeforeWindowClosed() ⛽ +323 0.09%
TestSettleShortPositions_CMP:testSellerCannotClearPutDebtAfterExpiryBeforeWindowClosed() ⛽ +323 0.09%
TestSettleSocializedLosses_CMP:testSocializeLoss() ⛽ +790 0.13%
TestStructures_CMM:testConversion() ⛽ +14 0.02%
TestStructures_CMM:testMarginBinaryCallOption() ⛽ +10 0.01%
TestStructures_CMM:testMarginCallSpreadSameUnderlyingCollateral() ⛽ +10 0.01%
TestStructures_CMM:testMarginCallSpreadSameUnderlyingCollateralBiggerNumbers() ⛽ +10 0.01%
TestStructures_CMM:testMarginLongBinaryPut() ⛽ +9 0.01%
TestStructures_CMM:testMarginPutSpread1() ⛽ +10 0.01%
TestStructures_CMM:testMarginRequirement2() ⛽ +6 0.01%
TestStructures_CMM:testMarginRequirement3() ⛽ +6 0.01%
TestStructures_CMM:testMarginRequirement4() ⛽ +12 0.01%
TestStructures_CMM:testMarginShortBinaryPut() ⛽ +10 0.01%
TestStructures_CMM:testMarginSimpleITMCall() ⛽ +5 0.01%
TestStructures_CMM:testMarginSimpleITMPut() ⛽ +5 0.01%
TestStructures_CMM:testMarginSimpleOTMCall() ⛽ +4 0.01%
TestStructures_CMM:testMarginSimpleOTMPut() ⛽ +4 0.01%
TestStructures_CMM:testMarginUnsortedStrikes() ⛽ +36 0.03%
TestStructures_CMM:testVerifyInputs2() ⛽ +12 0.03%
TestStructures_CMM:testVerifyInputs3() ⛽ +30 0.04%
TestStructures_CMM:testVerifyInputs4() ⛽ +30 0.05%
TestStructures_CMPM:testConversion() ⛽ +14 0.02%
TestStructures_CMPM:testMarginBinaryCallOption() ⛽ +9 0.01%
TestStructures_CMPM:testMarginCallSpreadSameUnderlyingCollateral() ⛽ +10 0.01%
TestStructures_CMPM:testMarginCallSpreadSameUnderlyingCollateralBiggerNumbers() ⛽ +10 0.01%
TestStructures_CMPM:testMarginLongBinaryPut() ⛽ +9 0.01%
TestStructures_CMPM:testMarginPutSpread1() ⛽ +10 0.01%
TestStructures_CMPM:testMarginRequirement2() ⛽ +6 0.01%
TestStructures_CMPM:testMarginRequirement3() ⛽ +6 0.01%
TestStructures_CMPM:testMarginRequirement4() ⛽ +12 0.01%
TestStructures_CMPM:testMarginShortBinaryPut() ⛽ +10 0.01%
TestStructures_CMPM:testMarginSimpleCall() ⛽ +5 0.01%
TestStructures_CMPM:testMarginSimplePut() ⛽ +5 0.01%
TestStructures_CMPM:testMarginUnsortedStrikes() ⛽ +36 0.03%
TestStructures_CMPM:testVerifyInputs2() ⛽ +12 0.03%
TestStructures_CMPM:testVerifyInputs3() ⛽ +30 0.04%
TestStructures_CMPM:testVerifyInputs4() ⛽ +30 0.05%
TestTransfer_CMC:testCannotTransferCollateralWhenShortExists() ⛽ +423 0.29%
TestTransfer_CMC:testCannotTransferLongWhenTooLittleCollateral() ⛽ +315 0.16%
TestTransfer_CMC:testCannotTransferShortWhenReceiverHasTooLittleCollateral() ⛽ +357 0.18%
TestTransfer_CMC:testCannotTransferShortWithNoAccess() ⛽ +117 0.20%
TestTransfer_CMC:testTransferCollateral() ⛽ +733 0.25%
TestTransfer_CMP:testCannotTransferCollateralWhenShortExists() ⛽ +99 0.07%
TestTransfer_CMP:testCannotTransferLongWhenTooLittleCollateral() ⛽ +133 0.07%
TestTransfer_CMP:testCannotTransferShortWhenReceiverHasTooLittleCollateral() ⛽ +151 0.08%
TestTransfer_CMP:testCannotTransferShortWithNoAccess() ⛽ +69 0.12%
TestTransfer_CMP:testTransferCollateral() ⛽ +193 0.07%
TestVanillaPut_CMCM:testMarginRequirement1() ⛽ +6 0.02%
TestVanillaPut_CMPM:testMarginRequirement1() ⛽ +6 0.02%

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

Successfully merging this pull request may close these issues.

1 participant