Coder Social home page Coder Social logo

Generate list of events about yearn-vaults HOT 4 CLOSED

yearn avatar yearn commented on September 17, 2024
Generate list of events

from yearn-vaults.

Comments (4)

fubuloubu avatar fubuloubu commented on September 17, 2024 2

Vault has:

  • Vault.debtLimit() -> uint256: total debt limit of Vault (will lend more than this amount)
  • Vault.totalDebt() -> uint256: total debt lent out by the Vault to strategies
  • Vault.totalAssets() -> uint256: balance of want in Vault + debt owed by all strategies
  • Vault.pricePerShare() -> uint256: amount of want for one full share (based on debt, not current positions)
  • Vault.maxAvailableShares() -> uint256: number of shares that can be withdrawn, based on balance of want in Vault + sum of estimated value of all positions in all strategies in the withdrawal queue (the total withdrawable depth)
  • Vault.emergencyShutdown() -> bool: whether Vault is in "emergency shutdown mode"
  • Vault.withdrawalQueue() -> address[20]: the strategies that will be forcibly withdrawn from in the event a user wants to go that deep, based on the order provied

Vault has (for strategies):

  • Vault.strategies(address _strategy) -> StrategyParams: all the stateful parameters of _strategy
  • Vault.debtOutstanding(address _strategy) -> uint256: total debt Vault needs from _strategy
  • Vault.creditAvailable(address _strategy) -> uint256: total credit Vault has availalble for _strategy
  • Vault.expectedReturn(address _strategy) -> uint256: expected amount _strategy would return (since the last time it reported) if Vault.report were called at the calling block
  • Vault.balanceSheetOfStrategy(address _strategy) -> uint256: estimated value of all positions of strategy in want (uncorrelated to debt)
  • Vault.totalBalanceSheet(address[40] _strategies) -> uint256: loop through s in _strategies and call Vault.balanceSheetOfStrategy(s) + balance of want in Vault
  • Vault.StrategyUpdate: event that occurs every time a strategy changes it's parameters with the Vault (addStrategy, Vault.updateStrategy, Vault.revokeStrategy, Vault.report)

from yearn-vaults.

fubuloubu avatar fubuloubu commented on September 17, 2024

Reminder to think of events for BaseStrategy and also to add BaseStrategy API version.

  • Harvested(returnGenerated, ...)

from yearn-vaults.

fubuloubu avatar fubuloubu commented on September 17, 2024

I think this can be closed with the addition of the Registry?

from yearn-vaults.

storming0x avatar storming0x commented on September 17, 2024

Agree this can be closed now that we have registry

from yearn-vaults.

Related Issues (20)

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.