GithubHelp home page GithubHelp logo

bancor-contracts-solidity-legacy's People

Contributors

barakman avatar lbeder avatar yudilevi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bancor-contracts-solidity-legacy's Issues

LiquidityPoolV2Converter: More explanation , details of the implementation

Hello,

1st of all, thanks a lot for the work you've been doing since the creation of Bancor !
Trying to learn about DeFi by studying the smart contracts of the biggest protocols. Started with Uniswap v1 and now focusing on Bancor v1 and v2. Would it be possible to provide me with more details (any blogs or whitepaper or external references would be nice) so that I understand the following:

  • What's the meaning of "beta" . Ex: available as a temporary mechanism during the beta. Does it mean "beta launch"? (Hence, a temporary protection mechanism)
  • stakedBalances : Since the staked balance is higher than the reserve balance. does it mean that liquidity providers cannot all withdraw their reserve tokens at once? (sorry, maybe the question is too naive)
  • AMPLIFICATION_FACTOR: what's the purpose of amplification. Could you please also explain the formula in amplifiedBalance() function?
  • What's the purpose of oracleDeviationFee ? I see that it is setup by the owner. How to come up with the right configuration without harming the users?
  • If I understand correctly, one of the main difference with LiquidityPoolV1Converter is that the reserve weights are dynamic and recalculated with effectiveReserveWeights correct? what are the benefits of having dynamic reserve weights?
  • Can you explain the balancedWeights and balancedWeightsByStake in bancorFormula ? I don't understand the origination of this formula x = W(t / r * q / p * log(s / t)) / log(s / t)
  • How do you come up with crossReserveTargetAmount in bancorFormula ? Is it a combination of purchaseTargetAmount (reserve1 --> main token) and saleTargetAmount ? (main token --> reserve2)
  • Can you explain why rebalancing pushes the current primary reserve token balance to its staked balance?
  • I understood that with bancor v2, LPs are protected against impermanent loss. Does removeLiquidity() guarantee LPs to get back at least the same amount of reserve token they provided in addLiquidity() ?

thanks a lot for your help

contract LiquidityPoolV2Converter is LiquidityPoolConverter {

Gas price limiter causing reversions for all USDB transactions for older Katana USDB Hub and Peg USDB vault TX with USDB!

This limiter appears to be causing problems.

I want to upgrade my old legacy pool to v2.1 but i cannot do any transactions without a reversion.

I have been discussing this with Glenn in length on discord and you a little but I think I may have pinned down the issue.

If this needs to be updated for the USDB system from the Top level yudi, you'd have to be the guy to upgrade the prices to accounting for the high GWEI costs these days in gas.

Fortunately you built in a way to fix it:
/**
* @dev allows the owner to update the gas price limit
*
* @param _gasPrice new gas price limit
*/
function setGasPrice(uint256 _gasPrice)
public
ownerOnly
greaterThanZero(_gasPrice)
{
gasPrice = _gasPrice;
}

I do not think this is a Per-converter thing, but a protocol systemic limit.  Thus only the private key owner for the system [I believe this is you Yudi] can change this limiter.

Please upgrade this so i can finish my converter upgrade? I am stuck halfway through with it!

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.