Skip to content

Commit

Permalink
refactor: remove withdrawal fee
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Oct 20, 2020
1 parent 8a06e4b commit 3a7e60d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions contracts/Vault.vy
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ def withdraw(_shares: uint256):
# We need to go get some from our strategies in the withdrawal queue
# NOTE: This performs forced withdrawals from each strategy. There is
# a 0.5% withdrawal fee assessed on each forced withdrawal (<= 0.5% total)
totalFee: uint256 = 0
for strategy in self.withdrawalQueue:
if strategy == ZERO_ADDRESS:
break # We've exhausted the queue
Expand Down Expand Up @@ -416,13 +415,6 @@ def withdraw(_shares: uint256):
self.strategies[strategy].totalDebt -= withdrawn
self.totalDebt -= withdrawn

# send withdrawal fee directly to strategist
fee: uint256 = 50 * withdrawn / FEE_MAX
totalFee += fee
self.token.transfer(Strategy(strategy).strategist(), fee)

value -= totalFee # fee is assessed here, sum(fee) above

# NOTE: We have withdrawn everything possible out of the withdrawal queue
# but we still don't have enough to fully pay them back, so adjust
# to the total amount we've freed up through forced withdrawals
Expand Down

0 comments on commit 3a7e60d

Please sign in to comment.