Sunday, February 19, 2017

The best glues

Glue stuff I wish I had known earlier in life. Actually, only two of these existed when I was young.

Surface preparation for plastics, glass, and metal: roughen surface, soap and water, rubbing alcohol, eyeglass cloth. Nitric acid is used to prepare some metals for epoxy even after sanding (100 grit).

In general: epoxies and acrylic are best for glass and metal.  Silicone and polyurethanes can work on them, but these are best on plastics.

glass and metal:  3M VHB double-sided tapes, >40 mil thickenss ones.  5952 seems most popular.  To be ideal glass needs silane pretreatment and copper and brass need lacquer or varnish (they oxidize even after it's applied).  Needs 15 psi pressure.  50% strength bond in 20 minutes. Has 20 pound/inch peel adhesion.

Drying time: usually 18 hours is needed for epoxies, polyurethanes, and thick layers of super glue is needed to reach 1/2 of their final strength. 

Glass: If 3M tape can't be used:  Super glues are not so great.  Thinner is better, but a thick layer on top instead of in between parts can work. Epoxies for glass are best. The best is Aralite for glass.

Metal: Locktite Metal Concrete and Quick Steel are a lot better than JB weld and Gorilla glue. There are a lot of videos concluding this. Super glues and polyurethanes (goop, aquaseal) can work too. 

Plastics and rubber: Goop and Aquaseal. (polyurethanes)

Wood: wood glue and hot glue sticks for temporary holding while the wood clue dries.

Hot glue:  The newer, hotter, slow-drying glue sticks are pretty impressive, often doing a good-enough job on all of the above. Arrow SuperPower slow setting is one.

Saturday, February 11, 2017

Bouncing balls a little beyond the elastic range

This is an edit to wikipedia

==Predicting the coefficient from material properties==
When colliding objects do not have a center of gravity that is inline with their direction of motion and point of impact, energy that would have been available for the post-collision velocity difference will be lost to rotation and friction. This section will consider only spherical objects colliding directly either with other spherical objects or with a flat surface to avoid rotation and friction losses.

When soft objects strike hard objects, most of the energy available for for the post-collision velocity different will be stored in the soft object and the value of the COR will depend on how efficient the soft object is at storing the compression energy without losing it to heat and plastic deformation. A rubber ball will bounce a lot better off concrete than glass, but the COR of glass-on-glass is a lot better than rubber-on-rubber. So when wanting to know the COR of an object, it's good to impact it with an object that is much harder. For this reason the [[Leeb rebound hardness test]] impacts test samples with a tip of tungsten carbide, one of the hardest substances available. There is no perfectly hard material, and the COR depends on both objects, so for ideal testing and theory, determining the COR of a material depends on both objects being that same material.

Many materials are assumed to be perfectly elastic when their yield strength is not approached during impact. The impact energy is theoretically stored only in the spring-effect of elastic compression and results in e=1. In practice a various stainless steels have a large variation well below e=1. Amorphous metals can achieve e = 0.95 or higher. The elastic range can be exceeded at low velocities because all the kinetic energy is concentrated at the point of impact. If the velocity is above 1 m/s, the yield strength of metals is usually exceeded in part of the contact area, losing energy to "plastic deformation" by not remaining in the elastic region. To account for this, the following method estimates the percent of the initial impact energy that did not get lost. Approximately, it divides how easy a volume of the material can store energy in compression (1/{\text{elastic modulus}}) by how well it can stay in the elastic range (1/{\text{yield strength}}):

% \text{impact energy available for restitution} \propto \frac{\text{yield strength}}{\text{elastic modulus}}

For a given material density and velocity this results in:

\text{coefficient of restitution} \propto \sqrt{\frac{\text{yield strength}}{\text{elastic modulus}} }

To be more precise, these and two more quantities can be shown to be important when predicting the COR at moderate velocities. A high ''yield strength'' allows the material to stay in the elastic region at higher energies. A lower ''elastic modulus'' allows a larger surface area of contact during impact so the energy is distributed to a larger volume at the contact point which helps prevent the yield strength from being exceeded. A ''lower velocity'' increases the coefficient by needing less energy to be absorbed. A ''lower density'' also means less initial energy needs to be absorbed. The density instead of mass is used because the volume of the sphere cancels out with the volume of the affected volume at the contact area.

Combining these four variables, a theoretical estimation of the coefficient of restitution can be made when a ball is dropped onto a surface of the same material.http://itzhak.green.gatech.edu/rotordynamics/Predicting%20the%20coefficient%20of%20restitution%20of%20impacting%20spheres.pdf

* e = coefficient of restitution
* Sy = dynamic yield strength (dynamic "elastic limit")
* E' = effective elastic modulus
* ρ = density
* v = velocity at impact
* μ = Poisson's ratio

e = 3.1 \left(\frac{S_{y}}{1}\right)^\frac{5}{8} \left(\frac{1}{E'}\right)^\frac{1}{2} \left(\frac{1}{v}\right)^\frac{1}{4} \left(\frac{1}{\rho}\right)^\frac{1}{8}

E' = \frac{E}{1-\mu^2}

This applies for a direct impact and when:

0.001 < \frac{\rho v^2}{S_y} < 0.1

Although the accuracy of this equation is not good, it is easy to calculate and accurately predicts the relative coefficient for many materials, even at velocities above and below its intended range.

Theoretical coefficient of restitution solid spheres dropped 1 meter (v= 4.5 m/s). Values > 1.0 indicates the equation indicates the equation has errors.http://www-mdp.eng.cam.ac.uk/web/library/enginfo/cueddatabooks/materials.pdf Yield strength instead of dynamic yield strength was used.

{|
|'''Metals and Ceramics:'''
|'''Predicted COR, e'''
|-
|silica glass
|1.36 to 1.71
|-
|Alumina
|0.45 to 1.63
|-
|silicon nitride
|0.38 to 1.63
|-
|silicon carbide
|0.47 to 1.31
|-
|highest amorphous metal
|1.27
|-
|tungsten carbide
|0.73 to 1.13
|-
|magnesium alloys
|0.5 to 0.89
|-
|titanium alloy grade 5
|0.84
|-
|aluminum alloy 7075-T6
|0.75
|-
|glass (soda-lime)
|0.69
|-
|glass (borosilicate)
|0.66
|-
|nickel alloys
|0.15 to 0.70
|-
|stainless steel alloys
|0.23 to 0.62
|-
|zinc alloys
|0.21 to 0.62
|-
|cast iron
|0.3 to 0.6
|-
|copper alloys
|0.15 to 0.55
|-
|titanium grade 2
|0.46
|-
|tungsten
|0.37
|-
|aluminum alloys 3003 6061, 7075-0
|0.35
|-
|zinc
|0.21
|-
|nickel
|0.15
|-
|copper
|0.15
|-
|aluminum
|0.1
|-
|lead
|0.08
|-
|
|-
|
|}

Plastics and rubbers will give higher values than their actual values because they are not as ideally elastic as metals, glasses, and ceramics because of heating during compression. So the following is only a guide to ranking of polymers.

'''Polymers''' (overestimated compared to metals and ceramics):

* polybutadiene (golf balls shell) 11.8
* butyl rubber 6.24
* EVA 4.85
* silicone elastomers 2.80
* polycarbonate 1.46
* nylon 1.28
* polyethylene 1.24
* Teflon 1.21
* polypropylene 1.14
* ABS 1.12
* acrylic 1.06
* PET 0.95
* polystyrene 0.87
* PVC 0.86

For metals the range of speeds to which this theory can apply is about 5 to 100 m/s which is a drop of 1 to 500 meters, provided the sphere is small enough for Hertzian contact theory to apply (see page 366http://www.ewp.rpi.edu/hartford/~ernesto/S2015/FWLM/Books_Links/Books/Johnson-CONTACTMECHANICS.pdf) But the above rankings that it provides remain accurate.

Dropping hard spherical objects onto a softer surface (lower elastic modulus) which also has a lower coefficient of restitution will reduce the apparent coefficient of restitution of the dropped object. For example, most rubber and plastic balls have a lower coefficient than glass and some metal alloys, but when dropped on wood or cement, the softer material will bounce higher. This is because the harder objects distribute the impact energy over a much smaller contact area, losing energy to heat by exceeding the elastic range of the floor.

For metals, the theoretically perfect elastic range (the coefficient theoretically equals 1.0 and the above equation does not apply) is when the velocity is less than

v = \left(26 \frac{S_y}{\rho} \left(\frac{S_{y}}{E'}\right)^4 \right)^{0.5}

which is less than 0.1 m/s.

Friday, February 3, 2017

Wikipedia edit to coefficient of restitution

=== COR variation due to object shape and off-center collisions ===
When colliding objects do not have a direction of motion that is in-line with their centers of gravity and point of impact, or if their contact surfaces at that point are not perpendicular to that line, some energy that would have been available for the post-collision velocity difference will be lost to rotation and friction. Energy losses to vibration and the resulting sound are usually negligible.

=== Colliding different materials and practical measurement ===
When a soft object strikes a harder object, most of the energy available for the post-collision velocity will be stored in the soft object. The COR will depend on how efficient the soft object is at storing the energy in compression without losing it to heat and plastic deformation. A rubber ball will bounce better off concrete than a glass ball, but the COR of glass-on-glass is a lot higher than rubber-on-rubber because some of the energy in rubber is lost to heat when it is compressed.  When a rubber ball collides with a glass ball, the COR will depend entirely on the rubber. For this reason, determining the COR of a material when there is not identical material for collision is best done by using a much harder material.

Since there is no perfectly rigid material, hard materials such as metals and ceramics have their COR theoretically determined by considering the collision between identical spheres. In practice, a 2-ball [[Newton's cradle]] may be employed but such a set up is not conducive to quickly testing samples.

The [[Leeb rebound hardness test]] is the only commonly-available test related to determining the COR.  It uses a tip of tungsten carbide, one of the hardest substances available, dropped onto test samples from a specific height. But the shape of the tip, the velocity of impact, and the tungsten carbide are all variables that affect the result that is expressed in terms of 1000*COR. It does not give an objective COR for the material that is independent from the test.

=== Predicting from material properties ===
The COR is not a material property because it changes with the shape of the material and the specifics of the collision, but it can be predicted from material properties and the velocity of impact when the specifics of the collision are simplified.  To avoid the complications of rotational and frictional losses, we can consider the ideal case of an identical pair of spherical objects, colliding so that their centers of mass and relative velocity are all in-line.

Many materials like metals and ceramics (but not rubbers and plastics) are assumed to be perfectly elastic when their yield strength is not approached during impact. The impact energy is theoretically stored only in the spring-effect of elastic compression and results in ''e'' = 1. But this applies only at velocities less than about 0.1 m/s to 1 m/s. The elastic range can be exceeded at higher velocities because all the kinetic energy is concentrated at the point of impact. Specifically, the yield strength is usually exceeded in part of the contact area, losing energy to plastic deformation by not remaining in the elastic region. To account for this, the following estimates the COR by estimating the percent of the initial impact energy that did not get lost to plastic deformation.  Approximately, it divides how easy a volume of the material can store energy in compression (<math>1/{\text{elastic modulus}}</math>) by how well it can stay in the elastic range (<math>1/{\text{yield strength}}</math>):

<math>% \text{impact energy available for restitution} \propto \frac{\text{yield strength}}{\text{elastic modulus}} </math>

For a given material density and velocity this results in:

<math>\text{coefficient of restitution} \propto \sqrt{\frac{\text{yield strength}}{\text{elastic modulus}} }</math>

A high yield strength allows more of the "contact volume" of the material to stay in the elastic region at higher energies.  A lower elastic modulus allows a larger contact area to develop during impact so the energy is distributed to a larger volume beneath the surface at the contact point. This helps prevent the yield strength from being exceeded.

A more precise theoretical development<ref>http://www-mdp.eng.cam.ac.uk/web/library/enginfo/cueddatabooks/materials.pdf</ref> shows the velocity and density of the material to also be important when predicting the COR at moderate velocities faster than elastic collision (greater than 0.1 m/s for metals) and slower than large permanent plastic deformation (less than 100 m/s). A lower velocity increases the coefficient by needing less energy to be absorbed. A lower density also means less initial energy needs to be absorbed. The density instead of mass is used because the volume of the sphere cancels out with the volume of the affected volume at the contact area. In this way, the radius of the sphere does not affect the coefficient.  A pair of colliding spheres of different sizes but of the same material have the same coefficient as below, but multiplied by <math>\left(\frac{R_1}{R_2}\right)^{\frac{3}{8}}</math>

Combining these four variables, a theoretical estimation of the coefficient of restitution can be made when a ball is dropped onto a surface of the same material.<ref>http://itzhak.green.gatech.edu/rotordynamics/Predicting%20the%20coefficient%20of%20restitution%20of%20impacting%20spheres.pdf</ref>

* ''e'' = coefficient of restitution
* ''S''<sub>y</sub> = dynamic yield strength (dynamic "elastic limit")
* ''E''′ = effective elastic modulus
* ''&rho;'' = density
* ''v'' = velocity at impact
* ''&mu;'' = Poisson's ratio

<math>e = 3.1 \left(\frac{S_\text{y}}{1}\right)^\frac{5}{8}  \left(\frac{1}{E'}\right)^\frac{1}{2}  \left(\frac{1}{v}\right)^\frac{1}{4} \left(\frac{1}{\rho}\right)^\frac{1}{8} </math>

<math>E' = \frac{E}{1-\mu^2}</math>

This equation overestimates the actual COR. For metals, it applies when v is approximately between 0.1 m/s and 100 m/s and in general when:

<math>0.001 < \frac{\rho v^2}{S_\text{y}} < 0.1</math>

At slower velocities the COR is higher than the above equation predicts, theoretically reaching e=1 when the above fraction is less than <math>10^{-6}</math> m/s.  It gives the the following theoretical coefficient of restitution for solid spheres dropped 1 meter (''v'' = 4.5&nbsp;m/s). Values greater than 1.0 indicate that the equation has errors. Yield strength instead of dynamic yield strength was used.

{|
|'''Metals and Ceramics:'''
|'''Predicted COR, ''e'''''
|-
|silicon
|1.79
|-
|Alumina
|0.45 to 1.63
|-
|silicon nitride
|0.38 to 1.63
|-
|silicon carbide
|0.47 to 1.31
|-
|highest amorphous metal
|1.27
|-
|tungsten carbide
|0.73 to 1.13
|-
|stainless steel
|0.63 to 0.93
|-
|magnesium alloys
|0.5 to 0.89
|-
|titanium alloy grade 5
|0.84
|-
|aluminum alloy 7075-T6
|0.75
|-
|glass (soda-lime)
|0.69
|-
|glass (borosilicate)
|0.66
|-
|nickel alloys
|0.15 to 0.70
|-
|zinc alloys
|0.21 to 0.62
|-
|cast iron
|0.3 to 0.6
|-
|copper alloys
|0.15 to 0.55
|-
|titanium grade 2
|0.46
|-
|tungsten
|0.37
|-
|aluminum alloys 3003 6061, 7075-0
|0.35
|-
|zinc
|0.21
|-
|nickel
|0.15
|-
|copper
|0.15
|-
|aluminum
|0.1
|-
|lead
|0.08
|-
|
|-
|
|}

Plastics and rubbers will give higher values than their actual values because they are not as ideally elastic as metals, glasses, and ceramics because of heating during compression.  So the following is only a guide to ranking of polymers.

'''Polymers''' (overestimated compared to metals and ceramics):

* polybutadiene (golf balls shell)    11.8
* butyl rubber    6.24
* EVA    4.85
* silicone elastomers    2.80
* polycarbonate    1.46
* nylon    1.28
* polyethylene    1.24
* Teflon    1.21
* polypropylene    1.14
* ABS    1.12
* acrylic    1.06
* PET    0.95
* polystyrene    0.87
* PVC    0.86

For metals the range of speeds to which this theory can apply is about 0.1 to 5&nbsp;m/s which is a drop of 0.5 mm to 1.25 meters (page 366<ref>http://www.ewp.rpi.edu/hartford/~ernesto/S2015/FWLM/Books_Links/Books/Johnson-CONTACTMECHANICS.pdf</ref>).

Saturday, January 14, 2017

anti-gravity wheel explained

https://youtu.be/GeyDf4ooPdo
https://youtu.be/tLMpdBjA2SU

Background observation and thoughts
There is obviously something very interesting in this demonstration. The 2nd video in no way is adequate to explain what this video shows. He held it out early in the video in a way that is impossible with a non-spinning 40 pound weight. I can easily lift this much compared to him (it's my workout dumbbell) and there's no way I can hold it out half way out to arm's length like he did at exactly 1:06 and part of 1:07 (i just tried it...no way). Also look at 3:30 to 3:34 where his arm is more extended. That's extremely difficult if it were a static weight. The way he did the static weight at 1:54 is easier and yet it looked a lot more difficult. His arm was least tired when he lifted it static. It should have been getting harder each time, but it was getting easier as he intuitively learned to take advantage of whatever effect is going on. I think I know what's happening. They do not explain in the 2nd video how it can feel so much lighter. The little push at the beginning seems to store energy to help overcome the increase in potential energy required to do the lift. But if that energy was indeed used to help, the lifting energy should have been reduced (somehow) by it and therefore the upward force*distance by his arm must have been less by that amount. But I am not refreshed on dynamics enough to know if the vertical forces can be made equal and opposite while permitting the downward force on  his hand to be less. They only say "it only feels lighter because you give it a little push at the beginning but it's not lighter". But my thinking is that any excess push at the beginning does not help other than to get it going stably and if there is an excess then the wheel will try to twist upward which might place greater downward force on his hand if it tries to raise it at the same time to keep the bar horizontal. There could be a slight upward twist at the bottom and slight downward at the top which might help something but again I would need to do the dynamics to know.  I just suspect it's not helping.. If the downward force*distance is not decreased and the little push at the beginning is not really helping anything other than to get it going, I think the solution to the enigma is this:

Solution
 The angular momentum is changed in one direction by pushing on the bar sideways and this increases the downward force against the locked "upward" muscles, like the push at the beginning. I've confirm this part by experiment and have a video. The center of gravity of the wheel rises as it twists slightly upward. Then the applied side-torque by the hand is released which allows the hand to rise to the center of gravity of the wheel with less force than the weight of the wheel as the angular momentum change is reversed, so the wheel is vertical again. Then the 2 steps repeat, as fast as muscles can twitch, following the path of least resistance. It is a lot easier to lock a muscle against a weight than it is to contract the position more. So briefly increasing weight in the first step will not overcome the locked position. They show the extent of the downward force changes in the 2nd video which shows what I've describe could be a large effect. The push at the beginning could be the other half of the effect, and by not letting it twist upward as in my first step, the energy is stored for extraction throughout the lift, if the lift is done smoothly.

Tuesday, October 4, 2016

Resveratrol + DMSO for age spots, scars, and freckles

The following were results obtained by mixing Resveratrol (that was in a japanese knot weed concentrate) with DMSO and applying for 10 days, about twice a day.   The scar on top of head was 10 years old from scraping scalp off on an overhang ledge (in 2006). It had gotten worse than the 2013 picture and then I bumped it recently and it was swelling up with a scab that was slow in healing (see picture), so I applied DMSO with resveratrol.  The Feb pic was actually after 5 treatments and I stopped a few days later. I did not think much else about it, but you can see from the march picture that it finished healing on its on. It appears the DMSO/Resv kills the cells and stains them then it takes a month or more to clear out the dead/stained material.

The Mole/age spot/whatever (keratosis since unlike age spots it was a little bumpy?) on the side of the head started about 6 years ago and was beginning to look a little frightening, getting raised above the skin 0.5 mm.  I have a close up of it that shows how remarkable this is. 

Since I wrote the above I've tried it on several other moles and spots.  It does not always work, at least not after about 15 days of twice-daily treatments.  But I had some serious sun damage on my shin from old exposure and it had a remarkable effect there too.  I have picture of that plus the moles provably better (they might be better).  The spots on my shoulders have returned a little after a year, but they are still a lot better.




Thursday, September 22, 2016

Cryptocoins equally to all people w/o 3rd party OR transaction fee feedback to create constant value coin

Maybe there is a way to issue a fixed quantity of coin to all people on Earth without a 3rd party.

Your biomeasures are different kinds of "hashes" of your genes (and environment and chance). The following might work because single genes affect multiple systems. Given the right set of biomeasures it may not be feasible to generate a valid survivable human DNA sequence. One biomeasure constrains DNA one way, and another in another way, and so on. But given the biomeasures and DNA sequence the blockchain might prove a given pairing is valid. People would use the set of biomeasures and their DNA to apply to the blockchain for coins and a private key. DNA and private key would generate wallet addresses.

The key is that each gene usually affects multiple biometric measures, maybe in the same way a prime can be used to generate many different public keys when combined with other primes. Or maybe I should view the biometric measures as a hash of the genes. Either way, there seems to be a 1-way function that can be exploited. You can get biometrics from genes, but maybe not valid genes from biometrics.

Genes causing the expression of biometrics (genotype creates phenotype) is such a messy business (a huge and messy kind of hashing, not subject to strict mathematics and influenced by environment and randomness), traditional cryptography might not be usable. At first it might require a world class neural net to get started, then the blockchain would have to take over as the neural net. The neural net would take all available DNA and biometric data and find all patterns backwards and forwards (genes -> biometrics, biometrics -> genes) that it can. It would attempt to predict viable DNA from biometrics and vice versa. The vice versa (determining biometrics from genes) is relatively easy, but we are in its infancy. A lot of medical research is doing this because having a disease is a biometric result of the genes. But getting DNA from biometrics could be made very difficult if the right biometrics are chosen. A neural net could predict viable biometrics from DNA, but my thesis is that it could be really difficult to create viable DNA from a correctly chosen set of measured biometrics. The neural net's job is to discover the best biometrics to use (the ones it can't crack), and to constantly try to crack it. Successful cracks are rewarded. Along the way it is discovering what genes do as the preliminary step to cracking (it has to get its list of "primes"?).

Since population growth I think is around 2% and slowing, the inflation problem should be small, and even a benefit as I stated before, in contradiction to the usual cryptocoin beliefs concerning fixed-quantity coins.

It seems I am requiring people to apply for their coins using their biometric and DNA data before others get their DNA and generate viable biometrics.

BTW, a 3rd party is always present if the code can be changed at any time after launch. Developers being guided by users is the same as government being guided by voters. Lobbies like the rich or bankers (PoS and miners) that subvert the users' voting process is the same system we have for the dollar.  Observational evidence for this viiwpoint: we seek ethics in the developers in the same way we seek ethics in government leaders.

There is another way to achieve a constant-value coin that is a lot less difficult than using DNA, but does not retain the virtue of blocking machines out of human economics. **Let the market-determined transaction fees per coin determine the coin release-rate.** If the fee rises there is a shortage of nodes compared to daily coin transaction volume.  Additional fees per byte and a base fee per transaction would be needed, but not used to determine the coin release rate. This uses the velocity of money theory.  So the developers are not allowed (and not required) to decide the final quantity or release schedule of the coin. The market does.  A PID controller would take the transaction fee per coin as the input and output the coins per block.  If the fees drop too much, it indicates the coin is not being used much  and coins per block can go to zero, keeping coin quantity constant.  Miners would stop mining and nodes would live off the base fee for transactions.  Another controller would take the number of nodes per transaction as the input and drop the base fee and/or per byte fee if the ratio of nodes to transactions got unnecessarily high, which keeps the coin competitive and lean without oversight. The more feedback controllers used intelligently, the more intelligent the coin (and anything else) is.

 I am not saying the above is perfectly correct or complete. I wanted to show that some idea like it could create the cryptocurrency holy grail: a constant value coin not based on perception, opinion, miners, or developers.

Intelligent direction (i.e. controller feedback) of permission  (i.e. legal tender, aka currency) to use available resources is the basis of all intelligence. Be it glucose and molecules in the brain, energy and matter in economics, or CPU time (kinetic joules=expenses) and RAM/HDD space (potential joules=initial investment) in computing, the intelligent direction of the currency directs the energy and matter for personal profit (growth based on more and more energy and matter coming under control of the movement of the currency). Democracy uses the feedback of votes to guide the taxes which directs the energy and matter in government which a controller on the economics which gives voters what they want.   The most intelligence cryptocoin will be a growing, spreading, changing A.I.  of feedback controllers (smart contracts directing the coin) that enables the market place that falls under its control to be the most profitable and growing so that the cryptocoin itself can be profitable and grow by riding (lightly) on its back so that it is a symbiotic relation instead of viral/cancerous.  The end goal is congeal the matter on Earth into a more ordered form, releasing entropy to the universe. We are doing this by shifting from organic bonds to metal and metalloid bonds, removing oxygen from metals, silicon, and carbon so that we have greater control through lower entropy per kg of our economic machine. Earth's unusual because of the order injected by the Moon, and why we look for life on Titan and Io (geological disturbances are cyclic forces that inject order into thermodynamically-stable systems).

The market itself is just a bunch of feedback going on between agents, under the rules of some governing coin (i.e. legal tender).   So ideally, the feedback systems would probably be nested and complicated from bottom to top so that the distinction between government and market is not clear, while the coin would be very clear.  Separate "organs" of law (code) could easily have their own internal coins, but still be based on a system wide coin. Maybe the highest level coin describes the boundaries and definition of an entity. The highest I know of is energy (Gibbs free energy). Maybe there is some sort of negative entropy that could be higher.  But a single coin and system without distinguishable "organs" should be the most efficient, like a highly compressed algorithm.

But for current work on cryptocurrencies, it seems 1 to 5 feedback measures should be the limit.

There is currently no feedback from the market place  (other than the difficulty) to tell cryptocoins how the coins are to be issued in order to best benefit the market. The arbitrary nature of coin quantity, release schedule, and fees needs to be changed and connected to the coin's usage and computational power.
=====
Let transaction fee per coin control coins per block issued and never let difficulty fall. Problem solved? A base fee per transaction and fee per byte would also be needed. A standard PID controller on the transaction "error signal" would be used. Difficulty can easily get too high, but there is no incentive for attacks to make it go high because they can't profit on downturns. Large miners can't profit from random difficulty swings or manipulate it for profit. If difficulty is too high, miners will get out if fees are not high enough. But surviving this demonstrates the system is not a Ponzi scheme that will end when mining ends. A decrease in network hash rate might adjust the set point that the transaction fee error signal needs. With the right feedback (checks and balances) developers would not be required (or allowed) to choose any aspects of coin issuance (not total quantity, schedule, coins/block, difficulty, or fees). The market should be able to dictate everything without anyone needing to explicitly vote except by their marketplace choices (miners getting in or out, and transaction fees). If the market for the coin starts to dry up (it's fees were too high to sustain miners) then it merely shows a more efficient coin is taking its place, and it should dry up. But the quantity of the at the point is constant.

Friday, September 9, 2016

Ideal difficulty algorithms for cryptocurrencies

a post to github related to monero and zcash:

I've come to the conclusion that the best difficulty will be a simple rolling average:

next Diff = avg past N Diff * TargetInterval / Avg past N solve times.

The shorter the window average, the more protection against attacks, but there is more variation in solve times. This is unavoidable. There is a law written in stone: if difficulty is allowed to go down, you can have good protection or good solve times with a low standard deviation, but you can't have both. You have to choose how many blocks you want to "give away" by choosing the max time for say 10% of the block solves. Low block window averaging is higher protecting but wider swings in solve times. You could use N=5 for great protection if it is OK to have time to solve > 5x your target for 5% of the blocks. Once manipulators come in, you need to be prepared for 5x target 10% of the time. But such a short averaging window requires an accurate timestamp on blocks instead of miner generated times. Without that I would copy what Zcash is doing (N=17 window average with a median instead of mean for the solve times), except be sure not to use the 8% up and 16% down limits they are using, which I hope and suspect they drop before release. There is something weird with their method of getting the median that works better than the way I get the median, so us eit, which I guess comes from Digishield v3. But if you get an accurate timestamp, use the mean.

And low N averages have accidental spikes in difficulty and solve times. Miners can choose to come in immediately after those which makes the next difficulty and solve time spike even higher. so they can put it into oscillation for profit. But this might be a problem for all windows of even larger N.

The biggest protection against attacks might be to discover the methods and encourage and enable everyone to use them. That tends to block the profits of cheaters by actually leveling out the swings, helpig the constant-on miners. For example, in time warp attack is less and less useful if you initiate it and 10 people come in to take it away, splitting the profit. So maybe you shoulld give the code to enable everyone to do it. It might then become useless to everyone. Of you try to pick a bottom, but then someone comes in earlier so your bottom does not occur, and so on, until there is no bottom.

The only way I have found to get perfect protection against attackers (and fairness) and to have a perfect release schedule is to never let the difficulty drop but follow a slow steady rise, use a valid timestamp on solved blocks, and pay miners inversely proportional (Tim Olson's idea) to their solve time relative to the average time that is expected for the current difficulty setting. If a miner solves fast, he gets paid proportionally less. If he solves slow, he gets paid more. The coin release schedule stays as perfect as your clock, and there's zero profit from manipulations. The problem with a clock is that it is a third party. But it is not a problem if you're already using a subtle 3rd party going under the name of "trusted peers" who will set to a universal time clock. (The trusted timestamp also prevents timewarp attacks. ETH uses one.)

This has very important stable, real value implications. For example, miners are paid PER BLOCK for the amount of electricity needed, getting closer to the ideal of value=joules, not merely based on the average electricity expense per block expected. This requires abandoning the idea that blocks must be solved within a certain time frame. If the coin can survive post-mining on fees, then it should survive solve delays in the exact same manner to prove it can survive on fees ahead of time. But it may not result in substantial delays as everything is done so well.

This probably changes too much in bitcoin's core, and there are likely good reasons Satoshi did not do it. But it's best by starting with a known ideal and work backwards. In this case it means every time you let difficulty fall, you are harming constant-on miners relative to other types of miners.