TokenEngineeringCommunity / BalancerPools_Model

cadCAD model to simulate Balancer AMMs
MIT License
54 stars 29 forks source link

token_(symbol)_weights to normalized weights #77

Closed AngelaKTE closed 3 years ago

AngelaKTE commented 3 years ago

Refactor "token_(symbol)_weight" to normalized weights:

The white paper defines it in terms of the normalized weights (such that the sum of all normalized weights is 1) - so 0.8 and 0.2 in that case.

As for the why, it's not explicitly stated in the white paper, but from eq 10 in this proof we see that Wn must be a number between 0 and 1 (since 0<Vn<V by definition).

_Originally posted by @markusbkoch in https://github.com/TokenEngineeringCommunity/BalancerPools_Model/issues/45#issuecomment-792732438_

Ramarti commented 3 years ago

So i add token_(symbol)denorm and token(symbol)_weight from 0 to 1

AngelaKTE commented 3 years ago

Wait - no need to touch token(symbol)denorm.

Just change token_(symbol)_weight as outlined (0 to 1).

Ramarti commented 3 years ago

Done