hats-finance / Accumulated-finance-0x75278bcc0fa7c9e3af98654bce195eaf3bb6a784

0 stars 0 forks source link

delegation amount not updated #40

Open hats-bug-reporter[bot] opened 1 week ago

hats-bug-reporter[bot] commented 1 week ago

Github username: -- Twitter username: -- Submission hash (on-chain): 0x2283a7dd2098c940ae119f38de760bc3899f18554e447827ea6a99c30d7dc1b8 Severity: low

Description: Description\ The commens inside stRoseMinter.sol state that the delegation amount should be updated. However the amount is never updated.

function takeReceiptDelegate(uint64 receiptId) public onlyOwner returns (uint128 shares) {
    ...

    // update delegation amount and shares
    d.shares += shares;
    @> delegation amount is never updated
    _addDelegation(receipt.to);
    emit TakeReceiptDelegate(receiptId);
}

Attack Scenario

Attachments

  1. Proof of Concept (PoC) File

    Code snippet: https://github.com/hats-finance/Accumulated-finance-0x75278bcc0fa7c9e3af98654bce195eaf3bb6a784/blob/fea3cdcd7693e95c7ddcfa4c79df9b5fa715aafc/contracts/minters/stROSEMinter.sol#L729-L733

ilzheev commented 1 week ago

Amount is not tracked anymore, comment is outdated. Thanks for notice, but comment is not a bug.