Skip to content

Commit

Permalink
Fix/wsteth wrapper (#651)
Browse files Browse the repository at this point in the history
* fix: bump ypricemagic to fix/wrapped-wsteth

* fix: simplified check for slightly different method names on curve

* fix: adding yvCurve-dETH-f to temp_rekt_vaults because it has an underlying token which is unverified on etherscan
  • Loading branch information
crebsy authored Oct 20, 2023
1 parent 0f1de3f commit 7ae4db6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ pytest-bdd>=5.0.0
dank_mids==4.20.64
eth_retry>=0.1.18
eth-hash[pysha3]
ez-a-sync==0.12.1
ypricemagic==2.15.4
ez-a-sync==0.7.4
python-telegram-bot==13.15
git+https://www.github.com/BobTheBuidler/eth-portfolio@0fb0db03365404824e109893bc8e042d2f140d85
git+https://www.github.com/BobTheBuidler/ypricemagic@382cb3a6e35fee96f6565dbdf7b709c6d699f0d1
git+https://www.github.com/BobTheBuidler/eth-portfolio@594b4eddf979739e23efa427e3dc508bf90594dc
git+https://www.github.com/BobTheBuidler/toolcache@e37b53cec64556d2b35df66767fca4c8f366a2fa
memray
12 changes: 5 additions & 7 deletions yearn/apy/curve/rewards.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@ async def staking(staking_rewards: Contract, pool_price: int, base_asset_price:
return 0

snx_address = await staking_rewards.snx.coroutine(block_identifier=block) if hasattr(staking_rewards, "snx") else None
reward_token = None
if hasattr(staking_rewards, "rewardToken"):
reward_token, rewards_token = await asyncio.gather(
staking_rewards.rewardToken.coroutine(block_identifier=block),
staking_rewards.rewardsToken.coroutine(block_identifier=block),
)
else:
reward_token, rewards_token = None, None
reward_token = await staking_rewards.rewardToken.coroutine(block_identifier=block)
elif hasattr(staking_rewards, "rewardsToken"):
reward_token = await staking_rewards.rewardsToken.coroutine(block_identifier=block)

token = reward_token or rewards_token or snx_address
token = reward_token or snx_address

total_supply = await staking_rewards.totalSupply.coroutine(block_identifier=block) if hasattr(staking_rewards, "totalSupply") else 0
rate = await staking_rewards.rewardRate.coroutine(block_identifier=block) if hasattr(staking_rewards, "rewardRate") else 0
Expand Down
3 changes: 3 additions & 0 deletions yearn/v2/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@

# populate rekt vaults here
TEMP_REKT_VAULTS = {
Network.Mainnet: [
"0xcd68c3fC3e94C5AcC10366556b836855D96bfa93" # yvCurve-dETH-f 0.4.6 has dETH as unverified token contract
],
Network.Optimism: [
"0x9E724b3f65b509326A4F5Ec90D4689BeE6b6C78e", # ERN-USDC, issue with pricing
]
Expand Down

0 comments on commit 7ae4db6

Please sign in to comment.