code-423n4 / 2021-12-yetifinance-findings

0 stars 0 forks source link

Unbounded number of Collateral #215

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

gzeon

Vulnerability details

Impact

Each additional collateral will increase gas required for many operations, e.g. Liquidation. If there are too many collateral it may exceed the block gas limit.

Proof of Concept

https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/Dependencies/Whitelist.sol#L105

Recommended Mitigation Steps

Define a max number of collateral asset

kingyetifinance commented 2 years ago

@LilYeti: Duplicate of #151