Yield Witch v2 contest - ladboy233's results

Fixed-rate borrowing and lending on Ethereum

General Information

Platform: Code4rena

Start Date: 14/07/2022

Pot Size: $25,000 USDC

Total HM: 2

Participants: 63

Period: 3 days

Judge: PierrickGT

Total Solo HM: 1

Id: 147

League: ETH

Yield

Findings Distribution

Researcher Performance

Rank: 34/63

Findings: 1

Award: $41.28

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

41.2753 USDC - $41.28

Labels

QA (Quality Assurance)

External Links

Lines of code

https://github.com/code-423n4/2022-07-yield/blob/6ab092b8c10e4dabb470918ae15c6451c861655f/contracts/Witch.sol#L253

Vulnerability details

Impact

A detailed description of the impact of this finding.

The protocol relies on auctioneers to put bad debt into auction and liquidation or cancel the liquidated position

but it is possible that when auctioneers put debt into auction, the user adds more collateral to avoid liquidation,

and the

cancel

the function is never called.

Then the user's position is not subject to liquidation and can still be liquidated.

Proof of Concept

Provide direct links to all referenced code on GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.

  • A auctioneer calls and starts the auction
  • user adds more collateral and the position is not subject to liquidation.
  • the auctioneer never calls to cancel
  • liquidator call payBase or payFYToken to liquidate the user's fund.

Tools Used

VIM

The developer can check if the user's position is subject to liqudiation when user calling payBase or payFYToken

https://github.com/code-423n4/2022-07-yield/blob/6ab092b8c10e4dabb470918ae15c6451c861655f/contracts/Witch.sol#L357

function payFYToken( bytes12 vaultId, address to, uint128 minInkOut, uint128 maxArtIn ) external returns ( uint256 liquidatorCut, uint256 auctioneerCut, uint256 artIn ) { DataTypes.Auction memory auction_ = auctions[vaultId]; require(auction_.start > 0, "Vault not under auction"); require(cauldron.level(vaultId) < 0, "Not undercollateralized"); // this line is added to ensure user's position is subject to liquidation.

#0 - HickupHH3

2022-07-18T14:39:38Z

dup of #91

#1 - alcueca

2022-07-21T10:28:44Z

Duplicate of #40

#2 - PierrickGT

2022-07-28T15:29:00Z

Downgraded to QA Report since this issue is related to a design decision.

#3 - PierrickGT

2022-07-30T16:04:48Z

Only issue submitted by this warden, since it has been downgraded to QA report, I will remove the duplicate label and reopen it.

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter