Skip to content

Missing input validation on many functions throughout the code #1

@code423n4

Description

@code423n4

Handle

tensors

Vulnerability details

Impact

Many functions throughout LongShort.sol and YieldManager.sol have no simple checks for validating inputs.
Below some examples are linked.

Proof of Concept

https://github.com/code-423n4/2021-08-floatcapital/blob/bd419abf68e775103df6e40d8f0e8d40156c2f81/contracts/contracts/LongShort.sol#L254
https://github.com/code-423n4/2021-08-floatcapital/blob/bd419abf68e775103df6e40d8f0e8d40156c2f81/contracts/contracts/YieldManagerAave.sol#L149

Recommended Mitigation Steps

Simple validations like requiring non-zero address or checking that amounts are non-zero would fix this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions