Skip to content

Instantly share code, notes, and snippets.

View anontheauditor's full-sized avatar

Anon anontheauditor

View GitHub Profile
c2dc67f3bfa73d31817d7b30d37d5d5535038230
b33e5713ae0bfe6b3893dad3cfbb7ab0355c5f5d
2563bef0a467e0b6c9abefac1adcdc96af523005
e33cf5eddce94aa9ab81e0fdd78c9c9b4ddef17b
f1922ef8e28d064415d52f1c1a2cdde69e00ece3
b657b93f2006b6c9833e42fdaab0446f4de830fe
b657b93f2006b6c9833e42fdaab0446f4de830fe
8daee5ed6b3d55195a18ac918ca8d794972c7022
2a0f08a595b51cbb447c59a331fc0d9f3efb88c9
85c64476c3d25a37652bcd49ebf81251ceff1a2e

[H-02] code4rena issue #338 not fixed properly

Severity

Impact: High

Likelihood: Medium

Description

[C-01] Missing asset decimal adjustment when calculating TVL

Severity

Impact: High

Likelihood: High

Description

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
contract Winner is ReentrancyGuard {
address public currentleader;
uint256 public lastDepositedAmount;
uint256 public currentLeaderReward;
uint256 public nextLeaderReward;
pragma solidity =0.8.9;
import "./DepositReceipt_Base.sol";
contract DepositReceipt_USDC is DepositReceipt_Base {
uint256 private constant SCALE_SHIFT = 1e12; //brings USDC 6.d.p up to 18d.p. standard
uint256 private constant USDC_BASE = 1e6; //used for division in USDC 6.d.p scale
uint256 private constant ALLOWED_DEVIATION = 5e16; //5% in 1e18 / ETH scale
address private constant USDC = 0x7F5c764cBc14f9669B88837ca1490cCa17c31607;