The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

Lack of EUROs Consideration in `LiquidationPool::distributeFees` Disadvantages Users Staking EUROs

Description

The documentation specifies that Stakers are users adding TST and/or EUROs to the Liquidation Pool to gain rewards from borrowing fees and vault liquidations. However, the LiquidationPool::distributeFees function does not take EUROs into account, resulting in no fee rewards for users exclusively staking EUROs.

Impact

Users staking EUROs experience a loss of rewards.

Proof of Concept

Foundry PoC
function testEurosStakersGainNoFee() public {
// Stakers put EUROs in staking
vm.startPrank(staker);
EUROs.approve(address(pool), 10000e18);
pool.increasePosition(0, 9000e18);
uint remainingBalanceOfStaker = 10000e18 - 9000e18;
vm.stopPrank();
// Skip time to allow pending stake consolidation
skip(1 days + 1);
vm.deal(vaultUser, 10 ether);
// User sends ETH to vault and borrows EUROs (producing fees : 0.5%)
vm.startPrank(vaultUser);
(bool _sent, ) = address(vault).call{value: 1 ether}(""); // 1 ETH = 2000e18 EUROs in ChainlinkMock instance
require(_sent);
vault.mint(vaultUser, 1000e18);
liquidationPoolManager.distributeFees();
vm.stopPrank();
// Stakers have the same balance, no additional rewards!
assertEq(EUROs.balanceOf(staker), remainingBalanceOfStaker);
}

Recommended Mitigation

Consider the following possibilities:

  • Update documentation to inform users that fees are only gained with TST staked.

  • Enhance LiquidationPool::distributeFees to incorporate EUROs using LiquidationPool::stake or implement a new logic.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

no-fee-euro

informational/invalid

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.