Edit: this is not some stupid game or scam. There is a very serious reason for this research. And you will eventually come to know the reason. Please do help me ascertain the market rates for the above loan.
Yes it is. a NLockTime transaction is not valid until the time/block set by the transaction. Until that time/block, it would be trivial to double spend the transaction. The only way to protect against this is to fund a transaction to a 2-of-2 multisig address and then sign a NLockTime transaction from that multisig address to the lender's address.
Thank you for correcting my error. I didn't study nLockTime carefully enough. I see you are correct.
Let's change the specification of the OP to your suggestion to sign the BTC to a 2-of-2 multisig, then the borrower signs the multi-sig with the nLockTime. So then the lender is in control and can submit the multi-sig transaction after the nLockTime has expired. Which is the intent of the OP.
I suspect that you have studied the Lighting Network as this is very
similar to how LN will work.
There is also the risk that there will be some kind of fork (hard or soft) that would invalidate the NLockTime transaction that would prevent it from ever confirming.
nLockTime times can apparently be specified as Unix timestamps, so how do you envision a fork invalidating nLockTime transactions?
https://en.bitcoin.it/wiki/Protocol_documentation#txDo you mean that some crazy Chinese mining cartel takes control of Bitcoin and decides to remove that feature for no forseeable valid reason?
There are a couple of different scenarios that could harm the lender:
*The transaction could contain some kind of "flag" or other feature that would cause the transaction to no longer be valid according to consensus rules (due to a hard and/or soft fork) at the time the transaction becomes valid -- this is essentially what happened in July 2015 when a soft fork caused certain types of transactions to become invalid; someone signed and pushed a transaction (either because they were not aware the transaction was no longer valid, or
they signed it prior to the transaction becoming invalid), and the found block that confirmed that transaction was invalid and was forked from the main blockchain
*There could be a fork that causes any unspent bitcoin "in" addresses in their current form to be invalid either due to security issues with EDSCA or some other reason. Users would likely be given a lot of time to spend their bitcoin to a "new" address format, although with the NLockTransaction only being valid after a long time, it would be possible that the lender would not be able to get their bitcoin spent to a "new" address format.
*It is possible that
all NLockTransactions in their current format become invalid due to a fork, for whatever reason that the core devs make for making these transactions invalid
*It would be the responsibility for the lender to broadcast the transaction once the NLockTime expires (and the transaction become confirmable), and storing unbroadcast transactions is significantly more difficult then it is to store private keys (with private keys, I can simply store my deterministic seed, while I would need to store the entire signed transaction)
*It is difficult to keep a private key to a bitcoin address secure for long periods of time, and this transaction would require that the private key be kept secure for an extended period of time. If I have a wallet that contains 100
BTC that is encrypted with a password that would take ~4 days to brute force with current technology, then as long as I can detect that my wallet has been compromised within 4 days of the compromise then I can simply transfer my bitcoin to a new address/wallet in order to protect my
BTC, however under your proposed loan, the lender would have no way to protect himself if his wallet/private keys are compromised.
*It is possible that the lender makes a mistake in decoding the transaction that sends BTC back to them. If they were to receive BTC directly, it is very easy to confirm the amount of BTC they are receiving, however you will need to use some amounts of technical skills/tools to confirm that a transaction that cannot yet be broadcast will in fact send BTC in a certain amount to a certain address
*It is possible that the transaction will not contain a sufficient transaction fee to even propagate throughout the network (let alone confirm), and as a result the lender would never be able to actually spend their BTC
What about the risk of BTC/USD exchange price changing during longer terms, is that a risk/opportunity cost that concerns lenders or are we BTC permabulls here?
See above for most of my concerns. However for exchange rate concerns, it is possible that a lender would be made aware of some new information that might change their outlook on the price of bitcoin that would cause them to sell. Or it is possible that the USDBTC price could get to ridiculous levels that would cause the lender to wish to sell their bitcoin.
Most loans that I make do not require periodic payments (as this does not usually fit the needs of the borrower), although they do sometimes have a variable amount to repay based on the date they repay. I don't see the above being any kind of real issue.
Lastly, what you are claiming to propose is that the lender sent you BTC and you subsequently return the BTC to the lender immediately with interest (at least from your point of view).
Agreed you're correct. I know it seems illogical, but there is a very valid case where this is extremely profitable for the borrower due to an externality. I will end up telling you what this case is much later, but I can't tell you now.
You have my attention
And the reason for the borrower wanting this is irrelevant. I want you to operate on the assumption that once the borrower explains the reason, you will clearly agree without any doubt it is not a scam.
I disagree that the reason the borrower wants the loan is irrelevant. Although I will generally not ask the reason behind asking for a loan, I will generally not make a loan if I am unable to at least speculate as to a possible benefit the borrower might receive as a result of the loan. For example, if a borrower were to ask for a BTC based loan using LTC as collateral, then it would be possible that the borrower could benefit if the LTC price rises over the course of the loan. I would not however make a BTC based loan that uses BTC as collateral because that is essentially trading 1 BTC for 1 BTC (the transactions of which are public, so there is no privacy reasons for this transaction), which looks a lot like trust building.
Btw, this is a very high economy-of-scale scenario. We can handle say up to 1000 BTC, maybe 10,000 BTC. But I will accept feedback in increments as low as say 50 BTC.
I might speculate that you are someone who is trying to convince people that the technology behind LN is safe. I don't think there is anything inherently wrong with this, however I also believe that there are risks to both of what you are proposing and to LN overall.