code-423n4 / loopfi-bug-bounty

5 stars 6 forks source link

LoopFi Bounty Details


Note for participants: The sponsor's repo, scope definition, and contents herein are all subject to change.

Publicly Known Issues

All known/disputed/unsatisfactory issues from LoopFi contest in C4 and any previous audits.

Project Overview

Users can lock ETH, WETH and wrapped LRTs into this contract, which will emit events tracked on a backed to calculate their corresponding amount of points. When staking, users can use a referral code encoded as bytes32 that will give the referral extra points.

When Loop contracts are launched, the owner of the contract can call only once setLoopAddresses to set the lpETH contract as well as the staking vault for this token. This activation date is stored at loopActivation.

Once these addresses are set, all deposits are paused and users have 7 days to withdraw their tokens in case they changed their mind, or they detected a malicious contract being set. On withdrawal, users loose all their points.

After these 7 days the owner can call convertAllETH, that converts all ETH in the contract for lpETH. This conversion has the timestamp startClaimDate. The conversion for LRTs happens on each claim by using 0x API. This is triggered by each user.

After the global ETH conversion, users can start claiming their lpETH or claiming and staking them in a vault for extra rewards. The amount of lpETH they receive is proportional to their locked ETH amount or the amount given by the conversion by 0x API. The minimum amount to receive is determined offchain and controlled by a slippage parameter in the frontend dApp.

For more information about LoopFi, please visit https://www.loopfi.xyz/.

Links

Scope

Contract SLOC Purpose Libraries used
PrelaunchPoints.sol 135 Users can stake ETH into this contract, which will emit events tracked on a backed to calculate their corresponding amount of points. When staking, users can use a referral code encoded as bytes32 that will give the referral extra points. @openzeppelin/*

Additional context

Main invariants

Attack ideas (where to focus for bugs)

All trusted roles in the protocol

Role Description
Owner Has access to privileged functions, contract owner

Miscellaneous

Employees of LoopFi and employees' family members are ineligible to participate in this bounty.