-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamic time lock in the value lock mechanism #279
Comments
@pippellia-btc thanks for this thoughtful proposal, and taking time to understand the mechanics of value locking in ION in the first place! I want to clarify on the "amount of btc needed for spamming the network forever" part. There are two types of cost involved here:
The main intent for value locking was to discourage once-off spam ION transactions, the primary anti-spam mechanism is still the fee imposed. Above said, the proposal of using dynamic algorithms over hardcoded magic value is still valuable, and I am supportive if it significantly improves ION's anti-spam capability further! Also in addition to or instead of dynamically adjusting the value lock period, we can also look at dynamically adjusting Fortunately given the relatively low write traffic right now, we have time to discuss and brainstorm further. Adding @csuwildcat to ascertain his view on this. |
@thehenrytsai thank you for your response. Let's list some facts (please correct me if I am wrong in any of these points)
This of NFTs is just an example of how we might see a marketplace for VCs build on top of ION. Every time one buys one such VC he/she is writing an operation on ION. That being said, the financialisation of ION (which is possible), might bring incentives to spam the network. In this case increasing the fee level is only a partial solution, because it comes to the detriment of onest users. Those are the reasons that imho we/you should consider when choosing how to implement the value locking mechanism. unrelated Question : Let's say that attacker wants to spam one single ION transaction.
Is the second approach feasible? Are there any drawbacks ? |
The following is a draft proposal for using a dynamic time lock in the value lock mechanism
tldr;
The idea behind value locking is to make sure that spamming the network is costly.
The cost involved is an opportunity cost. Needing to wait a some time for being able to use your bitcoin is surely worse than being able to use them immediately. The current approach is not optimal because :
1. constant time
Locking some btc for a certain time is costly. Here is how to compute the opportunity cost, given a base interest rate is known
opportunity_cost = btc_locked * base_btc_interest_rate * time_locked
Currently the
time_locked
is equal to 4500 blocks. This number sometimes it is too small and sometimes it is too big. When defending from an attack, higher is better, but it can be prove uneccessary costly for an honest user.There is nothing wrong with 4500 per se, but the choice of using any constant
time_lock
is always sub-optimal for the edge cases.2. what the cost will look like?
Saifedean Ammous has made the following compelling argument :
base_btc_interest_rate
is 'low''So my point is that even if the current value locking implementation seems costly now (1), in 100 years this might not be true.
Proposed solution / draft
Dynamic value locking draft (recursive approach)
max_operations = 600,000
(The maximum allowed ION operations per block is currently 600,000)initially time_lock = x1 blocks
(x1 is set as a constant)p1 > 1 , p2 < 1
This way the cost is dynamicaly adjusted based on the utilisation of the network.
(1) given the numbers provided by the example below
The amount of btc needed for spamming the network forever is
4500 * 60 * 6.66 btc ~= 1.8M btc
because after 4500 blocks the attacker would be able to re-use the newly unlocked btc for spamming the next block
The text was updated successfully, but these errors were encountered: