From 4fe74153e448727c66d83b1e377325c208ff9d61 Mon Sep 17 00:00:00 2001 From: Schlag <89420541+Schlagonia@users.noreply.github.com> Date: Mon, 6 Nov 2023 09:23:00 -0700 Subject: [PATCH] fix: readme link (#21) * fix: readme link * test: update for protocol fees --- README.md | 2 +- tests/test_operation.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bd8a04a..3a13fa6 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,6 @@ Tip: You can make them persistent by adding the variables in ~/.env (ENVVAR=... ## Strategy Writing -For a complete guide to creating a Tokenized Strategy please visit: https://docs.yearn.fi/developers/v3/strategy_development +For a complete guide to creating a Tokenized Strategy please visit: https://docs.yearn.fi/developers/v3/strategy_writing_guide See the ApeWorx [documentation](https://docs.apeworx.io/ape/stable/) and [github](https://github.com/ApeWorX/ape) for more information. diff --git a/tests/test_operation.py b/tests/test_operation.py index ea8f803..20b8fb1 100644 --- a/tests/test_operation.py +++ b/tests/test_operation.py @@ -102,6 +102,7 @@ def test__profitable_report__with_fee( rewards, amount, whale, + factory, RELATIVE_APPROX, keeper, ): @@ -135,7 +136,11 @@ def test__profitable_report__with_fee( assert profit > 0 - expected_performance_fee = profit * performance_fee // MAX_BPS + (protocol_fee, protocol_fee_recipient) = factory.protocol_fee_config() + + expected_performance_fee = ( + (profit * performance_fee // MAX_BPS) * (10_000 - protocol_fee) // MAX_BPS + ) # TODO: Implement logic so totalDebt == amount + profit check_strategy_totals( @@ -159,8 +164,6 @@ def test__profitable_report__with_fee( strategy.redeem(expected_performance_fee, rewards, rewards, sender=rewards) - check_strategy_totals(strategy, total_assets=0, total_debt=0, total_idle=0) - assert asset.balanceOf(rewards) >= rewards_balance_before + expected_performance_fee