pull down to refresh
127 sats \ 7 replies \ @nullama 12h \ on: Stacker Saloon
I've seen phoenixd being discussed here quite a bit, and I have a question about it.
It seems great, and it works seamlessly. But, isn't it a bit too expensive to actually use it?
Having to pay 2m sats (~2k USD) to open your first channel seems massive. And any sats you send to it are basically trapped until you send at least 2m sats, which will go to pay the fee, so you end up with 0.
Am I missing something here?, or does it really cost about 2 grand USD to use it in practice?
reply
You're right!, it works flawlessly.
I actually read a bit into it, and you can even get an estimate of the current fees, so, for example, to receive 2m sats, you would have to pay this fee right now:
phoenix-cli estimateliquidityfees --amountSat 2000000 { "miningFeeSat": 1219, "serviceFeeSat": 20000 }
So a total of 21,219 sats for receiving up to 2m sats, which is about ~1%.
phoenixd rocks ⚡
reply
mmm, I actually have an issue with SN and phoenixd when making payments.
It seems that SN sends an OPTIONS HTTP request when trying to pay an invoice, which phoenixd replies with
"Invalid http method (use the correct GET/POST)"
If I change the OPTIONS to POST in my localhost test it seems to work fine.
I also am able to manually pay the invoices created in SN, so the only thing wrong seems to be the OPTIONS method in the request, when it actually should be POST.
reply
This is actually an issue in phoenixd.
Because the request is cross-origin, your browser sends an OPTIONS pre-flight request. Phoenixd should handle that, but it doesn't. I guess it assumes that only other servers will call it, but not a browser.
However, since you will also need to reply with CORS headers, you will need to run a reverse proxy to enable CORS anyway. You can then also handle the OPTIONS request in the reverse proxy.
For reference, this is my nginx config:
upstream phoenixd {
server 127.0.0.1:9740;
}
server {
server_name phoenixd.ekzy.is;
listen 80;
listen [::]:80;
return 301 https://phoenixd.ekzy.is$request_uri;
}
server {
server_name phoenixd.ekzy.is;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/phoenixd.ekzy.is/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/phoenixd.ekzy.is/privkey.pem;
location / {
if ($request_method = OPTIONS) {
return 204;
}
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow_Credentials' 'true' always;
add_header 'Access-Control-Allow-Headers' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH' always;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /;
proxy_pass http://phoenixd$request_uri;
}
include letsencrypt.conf;
}
Does this make sense to you?
This is the first time I've seen someone having problems with Phoenix. I've actually been using it for a long time and it works perfectly. I also opened my own channel and haven't had any problems since.
reply