Fastswap Staking - Smart Contract Audit Report
Summary
FastSwap is a decentralized exchange and yield farming platform.
We reviewed Fastswap's MasterChef staking contract at 0x5c72CB5F3cf810fed7434FA4e789C1E68e89889a on the Binance Smart Chain mainnet.
Please note we have not reviewed the FastSwap token.
Notes on the Contract:Users can stake various LP tokens into the MasterChef contract into order to earn FastSwap tokens. There is a no fee associated with making a deposit to or withdrawing from the contract. An emergencyWithdraw function exists so users can withdraw without collecting rewards. The owner has the ability to add different types of tokens for staking and update reward rates. The owner can change the start time, end time, and duration of the staking rewards contract. Utilization of SafeMath (or similarily safe functions) across all contracts to prevent overflows. The team must exercise caution when adding tokens to avoid fee-on-transfer and ERC777-compliant tokens.
Audit Findings Summary
- No external threats were identified.
- Date: September 5th, 2021
External Threat Results
Vulnerability Category | Notes | Result |
---|---|---|
Arbitrary Storage Write | N/A | PASS |
Arbitrary Jump | N/A | PASS |
Delegate Call to Untrusted Contract | N/A | PASS |
Dependence on Predictable Variables | N/A | PASS |
Deprecated Opcodes | N/A | PASS |
Ether Thief | N/A | PASS |
Exceptions | N/A | PASS |
External Calls | N/A | PASS |
Integer Over/Underflow | N/A | PASS |
Multiple Sends | N/A | PASS |
Suicide | N/A | PASS |
State Change External Calls | N/A | PASS |
Unchecked Retval | N/A | PASS |
User Supplied Assertion | N/A | PASS |
Critical Solidity Compiler | N/A | PASS |
Overall Contract Safety | PASS |
FastSwap MasterChef Contract - Details
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Lib] SafeMath
- [Int] tryAdd
- [Int] trySub
- [Int] tryMul
- [Int] tryDiv
- [Int] tryMod
- [Int] add
- [Int] sub
- [Int] mul
- [Int] div
- [Int] mod
- [Int] sub
- [Int] div
- [Int] mod
+ [Lib] Address
- [Int] isContract
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionCallWithValue #
- [Int] functionStaticCall
- [Int] functionStaticCall
- [Int] functionDelegateCall #
- [Int] functionDelegateCall #
- [Prv] _verifyCallResult
+ [Lib] SafeERC20
- [Int] safeTransfer #
- [Int] safeTransferFrom #
- [Int] safeApprove #
- [Int] safeIncreaseAllowance #
- [Int] safeDecreaseAllowance #
- [Prv] _callOptionalReturn #
+ [Lib] EnumerableSet
- [Prv] _add #
- [Prv] _remove #
- [Prv] _contains
- [Prv] _length
- [Prv] _at
- [Int] add #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
- [Int] add #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
- [Int] add #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Int] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ MasterChef (Ownable)
- [Pub] #
- [Pub] changeStartTime #
- modifiers: onlyOwner
- [Pub] changeEndTime #
- modifiers: onlyOwner
- [Pub] changeReward #
- modifiers: onlyOwner
- [Pub] changeDuration #
- modifiers: onlyOwner
- [Ext] poolLength
- [Ext] pendingFast
- [Pub] add #
- modifiers: onlyOwner
- [Pub] token #
- modifiers: onlyManager
- [Pub] massUpdatePools #
- [Pub] updatePool #
- [Pub] deposit #
- [Pub] withdraw #
- [Pub] emergencyWithdraw #
- [Pub] emergencyFastWithdraw #
- modifiers: onlyOwner
- [Int] safeFastTransfer #