Banner
https://sherlock-files.ams3.digitaloceanspaces.com/profile_images/88154c64-01c4-44d2-9158-e522061b9e82.png

Cosine

SR @GuardianAudits | #2 @CodeHawks 2023

https://github.com/cosine-function/Portfolio

Contact Me

High

1

Solo

28

Total

Medium

1

Solo

29

Total

$74.19K

Total Earnings

#123 All Time

18x

Payouts

gold

1x

1st Places

silver

2x

2nd Places

regular

7x

Top 10

All

Sherlock

Code4rena

Cantina

CodeHawks

Mar '25

liquity-bold

liquity-bold

36,712.62 USDC • 2 total findings • Cantina • Cosine

gold

medium

Finding not yet public.

medium

Finding not yet public.

Jan '25

silo-contracts-v2

silo-contracts-v2

15,654.32 USDC • 4 total findings • Cantina • Cosine

silver

high

Finding not yet public.

medium

Finding not yet public.

medium

Finding not yet public.

medium

Finding not yet public.

May '24

Elfi

Elfi

391.52 USDC • 5 total findings • Sherlock • Cosine

#13

high

LP rewards are accumulated after burning in the redeem flow

high

Funds may be stored in the wrong contract on depositing liquidity

high

Execution fee for providing liquidity may be taken from the wrong vault

medium

`tradeCollateralTokenDatas[token].totalCollateral` is never reduced

medium

Keeper pays gas for all withdrawals

Mar '24

DittoETH

DittoETH

5,209.1 USDC • 3 total findings • Code4rena • Cosine

#4

high

Valid redemption proposals can be disputed by decreasing collateral

high

Closing a SR during a wrong redemption proposal leads to loss of funds

medium

Valid redemption proposals can be disputed when bad debt occurs by applying it to a SR outside of the proposal

Jan '24

LooksRare YOLO

LooksRare YOLO

17.38 USDC • 1 total finding • Sherlock • Cosine

#7

high

Users can win rounds without risking any funds

Curves

Curves

24.8 USDC • 7 total findings • Code4rena • Cosine

#75

high

Whitelised accounts can be forcefully DoSed from buying curveTokens during the presale

high

Unrestricted claiming of fees due to missing balance updates in `FeeSplitter`

high

Unauthorized Access to setCurves Function

medium

Protocol and referral fee would be permanently stuck in the Curves contract when selling a token

medium

onBalanceChange causes previously unclaimed rewards to be cleared

medium

Curves::_buyCurvesToken(), Excess of Eth received is not refunded back to the user.

medium

If a user sets their curve token symbol as the default one plus the next token counter instance it will render the whole default naming functionality obsolete

Dec '23

The Standard

The Standard

311.45 USDC • 8 total findings • CodeHawks • cosine

#12

high

Rewards can be drained because of lack of access control

high

Looping over unbounded `pendingStakes` array can lead to permanent DoS and frozen funds

medium

Fees are hardcoded to 3000 in ExactInputSingleParams

medium

Wrong Implementation of `LiquidationPool::empty` excludes holder with pending stakes when decreasing a position, resulting in exclusion from asset distribution

medium

Incorrect calculation of amount of EURO to burn during liquidation

medium

Removing assets in the `TokenManager` leads to major issues

low

Removal of approved token from token manager can lead to unintended liquidation of vaults

low

Lack of Minimum Amount Check in `SmartVaultV3::mint`, `SmartVaultV3::burn`, and `SmartVaultV3::swap` Can Result in Loss of Fees

Ethereum Credit Guild

Ethereum Credit Guild

1,317.36 USDC • 3 total findings • Code4rena • Cosine

#13

high

The creation of bad debt (`mark-down` of Credit) can force other loans in auction to also create bad debt

medium

Replay attack to suddenly offboard the re-onboarded lending term

medium

Auction manipulation by block stuffing and reverting on ERC-777 hooks

Nov '23

core-and-erc1155a

core-and-erc1155a

282.99 USDC • 1 total finding • Cantina • Cosine

#21

high

Finding not yet public.

Oct '23

Steadefi

Steadefi

2,348.49 USDC • 8 total findings • CodeHawks • cosine

#5

high

try-catch does not store the state when it is reverted

high

Yield in trove is lost when closing a strategy vault

medium

`emergencyPause` does not check the state before running && can cause loss of funds for users

medium

The transfer of ERC-20 tokens with blacklist functionality in process functions can lead to stuck vaults

medium

`emergencyClose()` may fail to repay any debt

medium

Missing minimum token amounts in the emergency contract functions allows MEV bots to take advantage of the protocols emergency situation

medium

Chainlinks oracle feeds are not immutable

medium

Missing fees allow cheap griefing attacks that lead to DoS

Ethena Labs

Ethena Labs

161.8 USDC • 1 total finding • Code4rena • Cosine

#23

medium

Soft Restricted Staker Role can withdraw stUSDe for USDe

Sep '23

DittoETH

DittoETH

9,197.42 USDC • 7 total findings • CodeHawks • cosine

silver

high

Owner of a bad ShortRecord can front-run flagShort calls AND liquidateSecondary and prevent liquidation

high

Flag can be overriden by another user

high

Margin callers can drain the TAPP during liquidation by willingly increase gas costs with the shortHintArray

low

Loss of precision in `twapPriceInEther` due to division before multiplication

low

Lack of Duplicate ID Check in combineShorts Function

low

Changes in `dittoShorterRate` affect retroactively to accrued Ditto yield shares

low

The protocol allows less flags to be generated than possible which could lead to a DoS of the primary liquidation process

Aug '23

Dopex

Dopex

96.33 USDC • 1 total finding • Code4rena • Cosine

#81

high

Improper precision of strike price calculation can result in broken protocol

Sparkn

Sparkn

270.41 USDC • 5 total findings • CodeHawks • cosine

#16

high

The same signature can be used in different `distribution` implementation causing that the caller who owns the signature, can distribute on unauthorized implementations

medium

Blacklisted STADIUM_ADDRESS address cause fund stuck in the contract forever

low

If a winner is blacklisted on any of the tokens they can't receive their funds

low

Potential DOS due to Gas Exhaustion Due to Large Array Iteration in `_distribute` Function

low

DAI Tokens at Risk Due to Lack of address(0) Check in distribute

Jul '23

Beedle - Oracle free perpetual lending

Beedle - Oracle free perpetual lending

42.58 USDC • 8 total findings • CodeHawks • cosine

#78

high

Tokens with less than 18 decimals allow for draining of funds

high

Lender contract can be drained by re-entrancy in `setPool`

high

Borrower can use Refinance to cancel auctions so they can extend their loan indefinitely

high

During refinance() new Pool balance debt is subtracted twice

high

[H-04] Lender#buyLoan - Malicious user could take over a loan for free without having a pool because of wrong access control

high

Using forged/fake lending pools to steal any loan opening for auction

high

Lender can Sandwich a borrower to seize his collateral

medium

The `borrow` and `refinance` functions can be front-run by the pool lender to set high interest rates

Foundry DeFi Stablecoin CodeHawks Audit Contest

Foundry DeFi Stablecoin CodeHawks Audit Contest

0.54 USDC • 2 total findings • CodeHawks • cosine

#142

gas

Double checks

gas

Use `==` instead for `<=` for `uints` when comparing for `zero` values

CodeHawks Escrow Contract - Competition Details

CodeHawks Escrow Contract - Competition Details

3.13 USDC • 2 total findings • CodeHawks • cosine

#92

medium

[H-01] Lack of emergency withdraw function when no arbiter is set

low

Constructor of `Escrow` should make sure that `buyer`, `seller`, `arbiter` are different from each other.

Basin

Basin

2,152.37 USDC • 1 total finding • Code4rena • Cosine

#6

medium

addLiquidity Sandwich Attack for unbalanced token deposits