Skip to content

Instantly share code, notes, and snippets.

@valo
Last active November 7, 2021 17:48
Show Gist options
  • Save valo/022d5705fb35f35428cb6bd2186b4e12 to your computer and use it in GitHub Desktop.
Save valo/022d5705fb35f35428cb6bd2186b4e12 to your computer and use it in GitHub Desktop.
from brownie import Vault, chain, interface
def main():
vault = Vault.at("0x7Cd28e21a89325EB5b2395591E86374522396E77")
decimals = vault.decimals()
print(f"Current pps: {vault.pricePerShare() / 10**decimals}")
print(f"Current degradation: {vault.lockedProfitDegradation().to('ether')}")
print(f"Total assets: {vault.totalAssets() / 10**decimals}")
print(f"Total supply: {vault.totalSupply() / 10**decimals}")
# vault.setManagementFee(vault.managementFee() / 2, {"from": vault.governance()})
strat = interface.StrategyAPI("0xE6951cef4968F03D42A6c30683F102A5cEb59B82")
strat.harvest({"from": strat.keeper()})
chain.sleep(60 * 60 * 2)
chain.mine(1)
print(f"Current pps: {vault.pricePerShare() / 10**decimals}")
print(f"Current degradation: {vault.lockedProfitDegradation().to('ether')}")
print(f"Total assets: {vault.totalAssets() / 10**decimals}")
print(f"Total supply: {vault.totalSupply() / 10**decimals}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment