Overlay Protocol contest - nathaniel's results

A protocol for trading #DeFi data streams.

General Information

Platform: Code4rena

Start Date: 16/11/2021

Pot Size: $50,000 ETH

Total HM: 11

Participants: 17

Period: 7 days

Judge: LSDan

Total Solo HM: 8

Id: 49

League: ETH

Overlay Protocol

Findings Distribution

Researcher Performance

Rank: 16/17

Findings: 1

Award: $226.14

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: defsec

Also found by: WatchPug, cmichel, gzeon, nathaniel, pauliax

Labels

bug
duplicate
2 (Med Risk)

Awards

0.0489 ETH - $226.14

External Links

Handle

nathaniel

Vulnerability details

Impact

The highly privileged Governor role gives access to the setMarketInfo function in overlayV1OVLCollateral.sol. In this function, the caller can arbitrarily change the marginMaintenance and the marginRewardRate for any market. They can increase the marginMaintenance to a very high value such that all positions are liquidatable, and increase the marginRewardRate to 100% such that upon calling the liquidate function, it will liquidate the entire value of the position and reward it to the liquidator (to themself).

Proof of Concept

https://github.com/code-423n4/2021-11-overlay/blob/main/contracts/collateral/OverlayV1OVLCollateral.sol#L94-L105 https://github.com/code-423n4/2021-11-overlay/blob/main/contracts/collateral/OverlayV1OVLCollateral.sol#L379 https://github.com/code-423n4/2021-11-overlay/blob/main/contracts/collateral/OverlayV1OVLCollateral.sol#L401 https://github.com/code-423n4/2021-11-overlay/blob/main/contracts/collateral/OverlayV1OVLCollateral.sol#L413

Tools Used

manual

  • Governor role should be assigned to a DAO like entity to require consensus to allow change to critical configurations.
  • Apply boundary restrictions (min and max values) on the values that can be changed. Utilise the MIN/MAX_MARGIN_MAINTENANCE values in the OverlayV1Mothership.sol.

#0 - mikeyrf

2021-12-06T23:25:09Z

duplicate #77 - bounds on governance params

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