Dandy Caramel Tortoise
Medium
Sudden drop/increase in share value allows users who monitor to gain at the expense of the others
The pools value is calculated as:
function getPoolTotalEstimatedValue()
public
view
returns (uint256 poolTotalEstimatedValue_)
{
int256 poolTotalEstimatedValueSigned = int256(totalPrincipalTokensCommitted)
+ int256(totalInterestCollected) + int256(tokenDifferenceFromLiquidations)
- int256(totalPrincipalTokensWithdrawn);
//if the poolTotalEstimatedValue_ is less than 0, we treat it as 0.
There are multiple reasons why the pools share value can sharply increase/decrease:
-
The possible value of
tokenDifferenceFromLiquidations
for an auction ranges from (764% * amountDue , -amountDue) and is updated when the dutch auction for the collateral liquidation settles. This allows for a user to either front-run and deposit (in case the auction will be settling at a higher price) or prepare for a withdrawal and then withdraw their share at a higher price before the auction settles at a lower price inflicting the loss to the other shareholders. This also affects the new depositors since the_minSharesAmountOut
won't be effective -
Interest repayment: In case of a large interest repayment, users who monitor for this can front run this repayment and then queue a withdrawal. This way they won't be deposited into the pool but will still earn the interest
No response
No response
- User monitors a large repayment of interest
- User front-runs this tx and deposits into the pool
- User then queues withdrawal for their shares to take the profit
Naive users can suffer unfair losses
No response
Implementing a depsoit queue could solve the share value increase issue