diff --git a/libraries/chain/asset.cpp b/libraries/chain/asset.cpp index d0367f49..eea50d9d 100644 --- a/libraries/chain/asset.cpp +++ b/libraries/chain/asset.cpp @@ -123,7 +123,7 @@ namespace graphene { namespace chain { if( !settlement_price.is_null() ) settlement_price.validate(); FC_ASSERT( maximum_short_squeeze_ratio >= 1000 ); - FC_ASSERT( maintenance_collateral_ratio >= maximum_short_squeeze_ratio ); + FC_ASSERT( maintenance_collateral_ratio <= maximum_short_squeeze_ratio ); } FC_CAPTURE_AND_RETHROW( (*this) ) } price price_feed::max_short_squeeze_price()const diff --git a/libraries/chain/include/graphene/chain/config.hpp b/libraries/chain/include/graphene/chain/config.hpp index ddb81f18..bab8c531 100644 --- a/libraries/chain/include/graphene/chain/config.hpp +++ b/libraries/chain/include/graphene/chain/config.hpp @@ -63,9 +63,8 @@ #define GRAPHENE_MIN_COLLATERAL_RATIO 1001 // lower than this could result in divide by 0 #define GRAPHENE_MAX_COLLATERAL_RATIO 32000 // higher than this is unnecessary and may exceed int16 storage -#define GRAPHENE_DEFAULT_INITIAL_COLLATERAL_RATIO 2000 -#define GRAPHENE_DEFAULT_MAINTENANCE_COLLATERAL_RATIO 1750 -#define GRAPHENE_DEFAULT_MAX_SHORT_SQUEEZE_RATIO 1500 +#define GRAPHENE_DEFAULT_MAINTENANCE_COLLATERAL_RATIO 1500 // We require collateral of 1.5x or more +#define GRAPHENE_DEFAULT_MAX_SHORT_SQUEEZE_RATIO 1750 // If there is a squeeze you are protected up to 1.75x... but black swan could occur first #define GRAPHENE_DEFAULT_MARGIN_PERIOD_SEC (30*60*60*24) #define GRAPHENE_DEFAULT_NUM_WITNESSES (101) diff --git a/tests/tests/operation_tests.cpp b/tests/tests/operation_tests.cpp index d0741a35..3492cb33 100644 --- a/tests/tests/operation_tests.cpp +++ b/tests/tests/operation_tests.cpp @@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE( feed_limit_logic_test ) { try { asset usd(100,1); - asset core(200,1); + asset core(100,0); price_feed feed; feed.settlement_price = usd / core;