code-423n4 / 2022-07-swivel-findings

0 stars 1 forks source link

QA Report #170

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Issue #1

Compounding.sol implements underlyingAssets() and exchangeRate() for Rari Fuse. It however does not allow for withdrawals or deposits in Swivel.sol. Therefore a user can create a market for Rari but is barred from depositing or withdrawing funds making this functionality obselete

Consider adding the withdraw() and deposit() abstractions for RariFuse or removing it alltogether

Occurences: https://github.com/code-423n4/2022-07-swivel/blob/daf72892d8a8d6eaa43b9e7d1924ccb0e612ee3c/VaultTracker/Compounding.sol#L44 https://github.com/code-423n4/2022-07-swivel/blob/daf72892d8a8d6eaa43b9e7d1924ccb0e612ee3c/Tokens/Compounding.sol#L44 https://github.com/code-423n4/2022-07-swivel/blob/daf72892d8a8d6eaa43b9e7d1924ccb0e612ee3c/Marketplace/Compounding.sol#L54 https://github.com/code-423n4/2022-07-swivel/blob/daf72892d8a8d6eaa43b9e7d1924ccb0e612ee3c/Marketplace/Compounding.sol#L72 https://github.com/code-423n4/2022-07-swivel/blob/daf72892d8a8d6eaa43b9e7d1924ccb0e612ee3c/Creator/Compounding.sol#L44

robrobbins commented 2 years ago

there was some missing logic in the audit repo, that was added (missing rari conditional)

libFuse was removed here:

robrobbins commented 2 years ago

https://github.com/Swivel-Finance/gost/pull/433