You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an edge case - in practice if everyone sells their tokens its probably OK that the contract is dead. However it would be nice to have a work around for this.
Proposed solution:
if totalSupply and poolBalance are 0 use a function similar to calculatePurchaceReturn to compute the number of tokens you would need to sell if you reduce the poolBalance from intialPoolBalance (poolBalance the contract was initialized with) to msg.value.
additional note - should probably also do this if tokenSupply < minTokenSupply or poolsBalance < minPoolBalance because BancorFormula behaves unpredictably with very small amounts.
The text was updated successfully, but these errors were encountered:
This is an edge case - in practice if everyone sells their tokens its probably OK that the contract is dead. However it would be nice to have a work around for this.
Proposed solution:
if
totalSupply
andpoolBalance
are 0 use a function similar tocalculatePurchaceReturn
to compute the number of tokens you would need to sell if you reduce thepoolBalance
fromintialPoolBalance
(poolBalance
the contract was initialized with) tomsg.value
.psudo code:
additional note - should probably also do this if
tokenSupply < minTokenSupply
orpoolsBalance < minPoolBalance
because BancorFormula behaves unpredictably with very small amounts.The text was updated successfully, but these errors were encountered: