Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate list of events #6

Closed
milkyklim opened this issue Oct 11, 2020 · 4 comments
Closed

Generate list of events #6

milkyklim opened this issue Oct 11, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request p2 important

Comments

@milkyklim
Copy link
Contributor

Current subgraph is ugly cause there is no standartized way to retrieve parameters.

Filter which parameters are used/useful and introduce corresponding events.

@fubuloubu
Copy link
Member

fubuloubu commented Oct 14, 2020

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)

@fubuloubu
Copy link
Member

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

  • Harvested(returnGenerated, ...)

@fubuloubu fubuloubu assigned fubuloubu and unassigned fubuloubu Oct 18, 2020
@milkyklim milkyklim self-assigned this Oct 21, 2020
@milkyklim milkyklim added the enhancement New feature or request label Oct 21, 2020
@fubuloubu
Copy link
Member

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

@storming0x
Copy link
Contributor

Agree this can be closed now that we have registry

@saltyfacu saltyfacu added the p2 important label Feb 4, 2021
pandadefi added a commit that referenced this issue Oct 25, 2022
* refactor: reduce base strategy size (#422)

* refactor: reduce base strategy size

* fix: do not add onlyManagement

* fix: allow harvest on add strategy block (#428)

* fix: allow harvest on add strategy block

* docs: comment

Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>

Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>

* fix: updated setRewards (#474)

* feat: add deposit and withdraw events (#499)

* feat: add event to add_event_to_setLockedProfitDegradation (#506)

* fix: implement modifiers (#513)

* fix: implement modifiers

* fix: typo

* fix: formatting

* fix: test same time harvest not allowed

* fix: merge mistake

* fix: gov event

* fix: add pps protection

* chore: update solc version

* chore: add FeeReport event

* chore: update FeeReport

* chore: bump vyper version

* chore: bump brownie version

* test: fixes

* chore: bump ganache version

* style: fix format

* test: airdrop do not change pps

* test: make sure deposits are still possible

* ci: cancel same branch run

* style: fix python formating

* fix: wrong math operation

* fix: tests

* fix: add missing WithdrawFromStrategy event

* docs: fix comment

* chore: cleanup docs folder

* chore: remove not used code

* feat: prevent fork replay EIP712 signature (#3)

* chore: bump version

* fix: clone check (#5)

* fix: make sure strategy isn't in emergency mode when updating debt (#4)

* fix: change permit definition (#6)

* fix: change permit definition

* fix: tests

* chore: format

* fix: do not use external call

* fix: allow setEmergency after revoke (#7)

Co-authored-by: Steffel <2143646+steffenix@users.noreply.github.com>
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
Co-authored-by: John Bergschneider <jhb10c@my.fsu.edu>
Co-authored-by: jmonteer <68742302+jmonteer@users.noreply.github.com>
pandadefi added a commit to pandadefi/yearn-vaults that referenced this issue Oct 25, 2022
pandadefi added a commit that referenced this issue Nov 1, 2022
* Revert "fix: change permit definition (#6)"

This reverts commit f49101b.

* fix: remove unlimited permit approval

* fix: tests expiry

* feat: update harvestTrigger

Update harvestTrigger with base fee oracle, force trigger once, and credit available checks

* fix: remove extra harvest that occasionally reverts

* feat: always return true if no baseFeeOracle set

* fix: add submodule for provider

* feat: updates from PR review

* fix: weasel suggestions

* feat: add more events to baseFeeOracle

* fix: add indexing for addresses in basefeeOracle events

Co-authored-by: dudesahn <dudesahn@gmail.com>
pandadefi added a commit to pandadefi/yearn-vaults that referenced this issue Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p2 important
Projects
None yet
Development

No branches or pull requests

4 participants