diff --git a/raiden/app.py b/raiden/app.py index 55d206fa06..1dfe28117b 100644 --- a/raiden/app.py +++ b/raiden/app.py @@ -10,6 +10,7 @@ from raiden.network.proxies.user_deposit import UserDeposit from raiden.raiden_service import RaidenService from raiden.settings import ( + DEFAULT_MEDIATION_MAX_IMBALANCE_FEE, DEFAULT_NUMBER_OF_BLOCK_CONFIRMATIONS, DEFAULT_PATHFINDING_IOU_TIMEOUT, DEFAULT_PATHFINDING_MAX_FEE, @@ -22,7 +23,7 @@ PRODUCTION_CONTRACT_VERSION, ) from raiden.utils import typing -from raiden.utils.typing import Address, FeeAmount +from raiden.utils.typing import Address from raiden_contracts.contract_manager import contracts_precompiled_path log = structlog.get_logger(__name__) @@ -59,7 +60,7 @@ class App: # pylint: disable=too-few-public-methods "pathfinding_iou_timeout": DEFAULT_PATHFINDING_IOU_TIMEOUT, "monitoring_enabled": False, }, - "max_imbalance_fee": FeeAmount(0), + "max_imbalance_fee": DEFAULT_MEDIATION_MAX_IMBALANCE_FEE, } def __init__( diff --git a/raiden/settings.py b/raiden/settings.py index 84898e650d..51ed7a3d29 100644 --- a/raiden/settings.py +++ b/raiden/settings.py @@ -43,6 +43,10 @@ DEFAULT_PATHFINDING_MAX_FEE = 1000 DEFAULT_PATHFINDING_IOU_TIMEOUT = 50000 # now the pfs has 200h to cash in +DEFAULT_MEDIATION_FLAT_FEE = FeeAmount(0) +DEFAULT_MEDIATION_PROPORTIONAL_FEE = 0 +DEFAULT_MEDIATION_MAX_IMBALANCE_FEE = FeeAmount(0) + ORACLE_BLOCKNUMBER_DRIFT_TOLERANCE = 3 ETHERSCAN_API = "https://{network}.etherscan.io/api?module=proxy&action={action}" diff --git a/raiden/ui/cli.py b/raiden/ui/cli.py index de0683a2f6..443c37e5f5 100644 --- a/raiden/ui/cli.py +++ b/raiden/ui/cli.py @@ -23,6 +23,9 @@ from raiden.network.utils import get_free_port from raiden.settings import ( DEFAULT_HTTP_SERVER_PORT, + DEFAULT_MEDIATION_FLAT_FEE, + DEFAULT_MEDIATION_MAX_IMBALANCE_FEE, + DEFAULT_MEDIATION_PROPORTIONAL_FEE, DEFAULT_PATHFINDING_IOU_TIMEOUT, DEFAULT_PATHFINDING_MAX_FEE, DEFAULT_PATHFINDING_MAX_PATHS, @@ -400,21 +403,22 @@ def options(func): option( "--flat-fee", help=("Flat fee required for every mediation in wei of the mediated token."), - default=FeeAmount(0), + default=DEFAULT_MEDIATION_FLAT_FEE, type=FeeAmount, show_default=True, ), option( "--proportional-fee", help=("Mediation fee as ratio of mediated amount in parts-per-million (10^-6)."), - default=0, + default=DEFAULT_MEDIATION_PROPORTIONAL_FEE, type=int, show_default=True, ), option( "--max-imbalance-fee", help="Set the worst-case imbalance fee in wei of the mediated token. (Preview)", - default=FeeAmount(0), + default=DEFAULT_MEDIATION_MAX_IMBALANCE_FEE, + type=FeeAmount, show_default=True, ), ),