2023-05-05 10:12:38 +00:00
|
|
|
# Coordinator Alias (Same as longAlias)
|
|
|
|
COORDINATOR_ALIAS="Local Dev"
|
2023-05-22 14:56:15 +00:00
|
|
|
# Lightning node vendor: CLN | LND
|
2023-10-23 22:48:38 +00:00
|
|
|
LNVENDOR='LND'
|
2023-05-05 10:12:38 +00:00
|
|
|
|
2022-02-09 20:51:05 +00:00
|
|
|
# LND directory to read TLS cert and macaroon
|
|
|
|
LND_DIR='/lnd/'
|
|
|
|
MACAROON_PATH='data/chain/bitcoin/testnet/admin.macaroon'
|
|
|
|
# LND directory can not be specified, instead cert and macaroon can be provided as base64 strings
|
2022-01-10 23:27:48 +00:00
|
|
|
# base64 ~/.lnd/tls.cert | tr -d '\n'
|
2022-02-09 20:51:05 +00:00
|
|
|
LND_CERT_BASE64='LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNLVENDQWRDZ0F3SUJBZ0lRQ0VoeGpPZXY1bGQyVFNPTXhKalFvekFLQmdncWhrak9QUVFEQWpBNE1SOHcKSFFZRFZRUUtFeFpzYm1RZ1lYVjBiMmRsYm1WeVlYUmxaQ0JqWlhKME1SVXdFd1lEVlFRREV3d3dNakJtTVRnMQpZelkwTnpVd0hoY05Nakl3TWpBNE1UWXhOalV3V2hjTk1qTXdOREExTVRZeE5qVXdXakE0TVI4d0hRWURWUVFLCkV4WnNibVFnWVhWMGIyZGxibVZ5WVhSbFpDQmpaWEowTVJVd0V3WURWUVFERXd3d01qQm1NVGcxWXpZME56VXcKV1RBVEJnY3Foa2pPUFFJQkJnZ3Foa2pPUFFNQkJ3TkNBQVNJVWdkcVMrWFZKL3EzY0JZeWd6ZDc2endaanlmdQpLK3BzcWNYVkFyeGZjU2NXQ25jbXliNGRaMy9Lc3lLWlRaamlySDE3aEY0OGtIMlp5clRZSW9hZG80RzdNSUc0Ck1BNEdBMVVkRHdFQi93UUVBd0lDcERBVEJnTlZIU1VFRERBS0JnZ3JCZ0VGQlFjREFUQVBCZ05WSFJNQkFmOEUKQlRBREFRSC9NQjBHQTFVZERnUVdCQlEwWUJjZXdsd1BqYTJPRXFyTGxzZnJscEswUFRCaEJnTlZIUkVFV2pCWQpnZ3d3TWpCbU1UZzFZelkwTnpXQ0NXeHZZMkZzYUc5emRJSUVkVzVwZUlJS2RXNXBlSEJoWTJ0bGRJSUhZblZtClkyOXVib2NFZndBQUFZY1FBQUFBQUFBQUFBQUFBQUFBQUFBQUFZY0V3S2dRQW9jRUFBQUFBREFLQmdncWhrak8KUFFRREFnTkhBREJFQWlBd0dMY05qNXVZSkVwanhYR05OUnNFSzAwWmlSUUh2Qm50NHp6M0htWHBiZ0lnSWtvUQo3cHFvNGdWNGhiczdrSmt1bnk2bkxlNVg0ZzgxYjJQOW52ZnZ2bkk9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K'
|
2022-01-10 23:27:48 +00:00
|
|
|
# base64 ~/.lnd/data/chain/bitcoin/testnet/admin.macaroon | tr -d '\n'
|
2022-02-09 20:51:05 +00:00
|
|
|
LND_MACAROON_BASE64='AgEDbG5kAvgBAwoQsyI+PK+fyb7F2UyTeZ4seRIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaIQoIbWFjYXJvb24SCGdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgMt90uD6v4truTadWCjlppoeJ4hZrL1SBb09Y+4WOiI0='
|
2022-01-10 23:27:48 +00:00
|
|
|
|
2023-05-22 14:56:15 +00:00
|
|
|
# CLN directory
|
|
|
|
CLN_DIR='/cln/testnet/'
|
|
|
|
CLN_GRPC_HOST='localhost:9999'
|
2023-09-06 15:18:22 +00:00
|
|
|
CLN_GRPC_HOLD_HOST='localhost:9998'
|
2023-05-22 14:56:15 +00:00
|
|
|
|
2022-07-31 14:35:12 +00:00
|
|
|
# Bitcoin Core Daemon RPC, used to validate addresses
|
|
|
|
BITCOIND_RPCURL = 'http://127.0.0.1:18332'
|
|
|
|
BITCOIND_RPCUSER = 'robodev'
|
|
|
|
BITCOIND_RPCPASSWORD = 'robodev'
|
|
|
|
|
2022-02-20 12:03:53 +00:00
|
|
|
# Postgresql Database
|
2022-08-09 09:44:29 +00:00
|
|
|
POSTGRES_DB='postgres'
|
2022-02-20 12:03:53 +00:00
|
|
|
POSTGRES_USER='postgres'
|
|
|
|
POSTGRES_PASSWORD='example'
|
|
|
|
POSTGRES_HOST='127.0.0.1'
|
|
|
|
POSTGRES_PORT='5432'
|
|
|
|
|
2022-08-03 21:21:02 +00:00
|
|
|
# Tor proxy for remote calls (e.g. fetching prices or sending Telegram messages)
|
2023-11-11 15:48:54 +00:00
|
|
|
USE_TOR=True
|
2022-08-03 21:21:02 +00:00
|
|
|
TOR_PROXY='127.0.0.1:9050'
|
|
|
|
|
2022-02-09 20:51:05 +00:00
|
|
|
# Auto unlock LND password. Only used in development docker-compose environment.
|
2022-07-31 14:35:12 +00:00
|
|
|
# It will fail starting up the node without it.
|
2022-02-09 20:51:05 +00:00
|
|
|
# To disable auto unlock, comment out 'wallet-unlock-password-file=/tmp/pwd' from 'docker/lnd/lnd.conf'
|
|
|
|
AUTO_UNLOCK_PWD='1234'
|
2022-01-13 14:08:21 +00:00
|
|
|
|
2022-07-13 18:55:30 +00:00
|
|
|
LND_GRPC_HOST='localhost:10009'
|
|
|
|
|
2022-02-16 22:02:21 +00:00
|
|
|
REDIS_URL='redis://localhost:6379/1'
|
|
|
|
|
2022-01-14 14:57:56 +00:00
|
|
|
# List of market price public APIs. If the currency is available in more than 1 API, will use median price.
|
2023-07-24 17:49:55 +00:00
|
|
|
MARKET_PRICE_APIS = https://blockchain.info/ticker, https://api.yadio.io/exrates/BTC, https://bitpay.com/rates/BTC, https://criptoya.com/api/btc
|
2022-01-06 16:54:37 +00:00
|
|
|
|
2022-01-18 13:20:19 +00:00
|
|
|
# Host e.g. robosats.com
|
2022-01-12 21:22:16 +00:00
|
|
|
HOST_NAME = ''
|
2022-02-13 16:43:49 +00:00
|
|
|
HOST_NAME2 = ''
|
2022-06-26 22:43:57 +00:00
|
|
|
I2P_ALIAS = ''
|
|
|
|
I2P_LONG = ''
|
2022-02-20 11:12:57 +00:00
|
|
|
LOCAL_ALIAS = ''
|
2022-02-12 13:59:59 +00:00
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
2022-02-10 21:38:56 +00:00
|
|
|
SECRET_KEY = 'django-insecure-6^&6uw$b5^en%(cu2kc7_o)(mgpazx#j_znwlym0vxfamn2uo-'
|
2022-01-12 21:22:16 +00:00
|
|
|
|
2022-01-18 13:20:19 +00:00
|
|
|
# e.g. robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion
|
|
|
|
ONION_LOCATION = ''
|
|
|
|
|
2022-02-12 13:59:59 +00:00
|
|
|
# Link to robosats alternative site (shown in frontend in statsfornerds so users can switch mainnet/testnet)
|
|
|
|
ALTERNATIVE_SITE = 'RoboSats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion'
|
|
|
|
ALTERNATIVE_NAME = 'RoboSats Mainnet'
|
2022-01-31 19:12:49 +00:00
|
|
|
|
2022-02-21 23:41:36 +00:00
|
|
|
# Telegram bot token
|
|
|
|
TELEGRAM_TOKEN = ''
|
2023-11-06 14:01:56 +00:00
|
|
|
TELEGRAM_BOT_NAME = 'RoboCoordinatorNotificationBot'
|
2023-03-27 09:37:36 +00:00
|
|
|
# Notify new messages in-chat app (fiat exchange step) if at least X minutes has passed since the last chat message.
|
|
|
|
CHAT_NOTIFICATION_TIMEGAP = 5
|
2022-02-21 23:41:36 +00:00
|
|
|
|
2023-09-08 15:33:00 +00:00
|
|
|
# Maintainance notice or and other coordinator messages on client start
|
|
|
|
# Style of the notice on the client app, use None for no notice: 'none' | 'warning' | 'success' | 'error' | 'info'
|
|
|
|
NOTICE_SEVERITY = 'none'
|
|
|
|
NOTICE_MESSAGE = ''
|
|
|
|
|
2022-01-31 19:12:49 +00:00
|
|
|
# Lightning node open info, url to amboss and 1ML
|
2022-02-13 17:55:44 +00:00
|
|
|
NETWORK = 'testnet'
|
2022-02-12 13:59:59 +00:00
|
|
|
NODE_ALIAS = '🤖RoboSats⚡(RoboDevs)'
|
|
|
|
NODE_ID = '033b58d7......'
|
2022-01-31 19:12:49 +00:00
|
|
|
|
2022-03-03 12:47:55 +00:00
|
|
|
# Total trade fee as fraction
|
2022-01-06 16:54:37 +00:00
|
|
|
FEE = 0.002
|
2022-03-03 12:47:55 +00:00
|
|
|
# Maker/taker fee split. As seen in https://bisq.wiki/Trading_fees . It is implicit that TAKER_FEE_SPLIT = (1 - MAKER_FEE_SPLIT)
|
|
|
|
# Shall incentivize order making
|
|
|
|
MAKER_FEE_SPLIT=0.125
|
|
|
|
|
2023-05-16 17:12:15 +00:00
|
|
|
# Robosats Development Fund donation as fraction. 0.2 = 20% of successful orders proceeds are donated via keysend.
|
|
|
|
# Donations to the devfund are important for the sustainabilty of the project, however, these are totally optional (you
|
|
|
|
# can run a coordinator without donating devfund!). Coordinators with higher devfund donations % will be more prominently
|
|
|
|
# displayed (and have special badges), while coordinators that do not donate might eventually lose frontend/client support.
|
|
|
|
# Leaving the default value (20%) will grant the DevFund contributor badge.
|
|
|
|
DEVFUND = 0.2
|
|
|
|
|
2022-01-10 23:27:48 +00:00
|
|
|
# Time out penalty for canceling takers in SECONDS
|
|
|
|
PENALTY_TIMEOUT = 60
|
2022-01-23 21:12:30 +00:00
|
|
|
# Time between routing attempts of buyer invoice in MINUTES
|
2022-06-09 10:56:17 +00:00
|
|
|
RETRY_TIME = 1
|
2022-01-06 16:54:37 +00:00
|
|
|
|
2023-09-11 16:24:03 +00:00
|
|
|
# Store Order Logs in DB. Verbose logging for each order as property of the order object in DB. Useful for debugging and for learning
|
|
|
|
# the order flow for new robosats coordinators (prints a pretty timestamped table on the coordinator panel on each order). But a bit heavy
|
|
|
|
# on write operations and can potentially affect performance for every request.
|
|
|
|
DISABLE_ORDER_LOGS = False
|
|
|
|
|
|
|
|
# Coordinator activity limits
|
2022-02-25 20:08:22 +00:00
|
|
|
MAX_PUBLIC_ORDERS = 100
|
|
|
|
|
2023-10-10 12:48:05 +00:00
|
|
|
# Coordinator Order size limits in Satoshi
|
|
|
|
# Minimum order size (must be bigger than DB constrain in /robosats/settings.py MIN_TRADE, currently 20_000 Sats)
|
|
|
|
MIN_ORDER_SIZE = 20000
|
|
|
|
# Minimum order size (must be smaller than DB constrain in /robosats/settings.py MAX_TRADE, currently 5_000_000 Sats)
|
|
|
|
MAX_ORDER_SIZE = 5000000
|
2022-01-06 16:54:37 +00:00
|
|
|
|
2022-07-31 14:35:12 +00:00
|
|
|
# For CLTV_expiry calculation
|
2022-07-21 13:19:47 +00:00
|
|
|
# Assume 8 min/block assumed
|
|
|
|
BLOCK_TIME = 8
|
|
|
|
# Safety multiplier in case of mining speed up (CLTV expiry will be times X larger than real time needs for locked bonds/escrow)
|
|
|
|
MAX_MINING_NETWORK_SPEEDUP_EXPECTED = 1.7
|
2022-01-08 00:29:04 +00:00
|
|
|
|
2022-01-12 00:02:17 +00:00
|
|
|
# Expiration time for locking collateral in SECONDS
|
2022-07-31 14:35:12 +00:00
|
|
|
EXP_MAKER_BOND_INVOICE = 300
|
2022-01-08 00:29:04 +00:00
|
|
|
EXP_TAKER_BOND_INVOICE = 200
|
2022-01-12 00:02:17 +00:00
|
|
|
|
2022-06-05 16:15:40 +00:00
|
|
|
# ROUTING
|
2022-01-30 13:18:32 +00:00
|
|
|
# Proportional routing fee limit (fraction of total payout: % / 100)
|
2022-06-05 21:16:03 +00:00
|
|
|
PROPORTIONAL_ROUTING_FEE_LIMIT = 0.001
|
2022-01-30 13:18:32 +00:00
|
|
|
# Base flat limit fee for routing in Sats (used only when proportional is lower than this)
|
|
|
|
MIN_FLAT_ROUTING_FEE_LIMIT = 10
|
2022-03-06 18:10:05 +00:00
|
|
|
MIN_FLAT_ROUTING_FEE_LIMIT_REWARD = 2
|
2022-06-05 16:15:40 +00:00
|
|
|
# Routing timeouts
|
2022-07-10 11:04:27 +00:00
|
|
|
REWARDS_TIMEOUT_SECONDS = 30
|
2022-06-16 15:31:30 +00:00
|
|
|
PAYOUT_TIMEOUT_SECONDS = 90
|
2023-04-25 10:13:28 +00:00
|
|
|
DEBUG_PERMISSIONED_PAYOUTS = False
|
2022-01-30 13:18:32 +00:00
|
|
|
|
2023-05-16 17:12:15 +00:00
|
|
|
# Allow self keysend on keysend function (set true to debug keysend functionality)
|
|
|
|
ALLOW_SELF_KEYSEND = False
|
|
|
|
|
2022-06-05 21:16:03 +00:00
|
|
|
# REVERSE SUBMARINE SWAP PAYOUTS
|
2022-06-16 15:31:30 +00:00
|
|
|
# Disable on-the-fly swaps feature
|
|
|
|
DISABLE_ONCHAIN = False
|
2023-03-14 19:54:31 +00:00
|
|
|
MAX_SWAP_ALLOWED = 500000
|
2022-06-07 22:14:56 +00:00
|
|
|
# Shape of fee to available liquidity curve. Either "linear" or "exponential"
|
|
|
|
SWAP_FEE_SHAPE = 'exponential'
|
|
|
|
# EXPONENTIAL. fee (%) = MIN_SWAP_FEE + (MAX_SWAP_FEE - MIN_SWAP_FEE) * e ^ (-LAMBDA * onchain_liquidity_fraction)
|
|
|
|
SWAP_LAMBDA = 8.8
|
2022-07-31 14:35:12 +00:00
|
|
|
# LINEAR. 4 parameters needed: min/max fees and min/max balance points. E.g. If 25% or more of liquidity
|
2022-06-05 21:16:03 +00:00
|
|
|
# is onchain the fee for swap is 2% (minimum), if it is 12% fee is 6%, and for 0% fee is 10%.
|
2022-06-07 22:14:56 +00:00
|
|
|
# Minimum swap fee as fraction (1%)
|
2023-05-15 09:46:59 +00:00
|
|
|
MIN_SWAP_FEE = 0.008
|
2022-06-05 21:16:03 +00:00
|
|
|
# Liquidity split point (LN/onchain) at which we use MIN_SWAP_FEE
|
2022-06-07 22:14:56 +00:00
|
|
|
MIN_SWAP_POINT = 0.35
|
2022-06-05 21:16:03 +00:00
|
|
|
# Maximum swap fee as fraction (~10%)
|
|
|
|
MAX_SWAP_FEE = 0.1
|
|
|
|
# Liquidity split point (LN/onchain) at which we use MAX_SWAP_FEE
|
|
|
|
MAX_SWAP_POINT = 0
|
2023-03-18 10:39:37 +00:00
|
|
|
# Min and Max amount allowed for Swap
|
2022-07-21 13:19:47 +00:00
|
|
|
MIN_SWAP_AMOUNT = 10000
|
2023-03-18 10:39:37 +00:00
|
|
|
MAX_SWAP_AMOUNT = 1000000
|
2023-03-10 12:52:33 +00:00
|
|
|
# Spend Unconfirmed UTXOS (more capital efficient, more risky)
|
|
|
|
SPEND_UNCONFIRMED = False
|
2023-03-18 10:39:37 +00:00
|
|
|
# Mining fee confirmation target
|
|
|
|
SUGGESTED_TARGET_CONF = 4
|
|
|
|
MINIMUM_TARGET_CONF = 24
|
2022-01-30 13:18:32 +00:00
|
|
|
|
2022-03-07 21:46:52 +00:00
|
|
|
# Fraction rewarded to user from the slashed bond of a counterpart.
|
|
|
|
# It should not be close to 1, or could be exploited by an attacker trading with himself to DDOS the LN node.
|
|
|
|
SLASHED_BOND_REWARD_SPLIT = 0.5
|
2022-03-05 18:43:15 +00:00
|
|
|
|
2022-01-06 16:54:37 +00:00
|
|
|
# Username for HTLCs escrows
|
2023-11-11 15:48:54 +00:00
|
|
|
ESCROW_USERNAME = 'admin'
|