PartySwap - Smart Contract Audit Report
Summary
PartySwap is an application focused on bringing liquidity to the Avalanche Ecosystem.
We reviewed the project team's PartySwap contracts at the following GitHub commits:
Notes on the Contracts:
PartyToken contract:PartyERC20 Contract:
- The total supply of the token is set to 110 million [110,000,000] $PARTY.
- No minting functions are accessible beyond deployment.
- Any user can burn their own tokens to reduce the total supply.
- As the token has not yet been deployed to the mainnet, there was no token allocation for our team to analyze.
- The contact utilizes the EIP712 standard which offers a secure and user friendly method for typed message signing.
- Any user can call the 'permit' function, which can be used to change an account's ERC20 allowance by presenting a message signed by the account.
- No ownership-restriction functions are present.
- The contract utilizes SafeMath to prevent overflows and complies with the ERC20 standard.
PartyFactory Contract:
- The PartyERC20 contract implements the ERC20 standard liquidity token.
- This contract utilizes a 'permit' mechanism which allows the owner of the $PARTY tokens to sign a transaction that allows another user to withdraw tokens and send it to the recipient. The recipient, then submits the permit on behalf of the owner.
PartyPair Contract:
- The PartyFactory contract is responsible for the creation of liquidity pairs for the token, thereby enabling trading on the platform.
- At the time of deployment, the initiliaze() function is called from the PartyPair contract which allows the factory to specify the two ERC20 tokens that this pair will exchange.
- Once the pool is created, its address is stored with a double mapping that takes both token addresses as input.
PartyRouter Contract:
- The PartyPair contract is the core Uniswap functionality that implements the liquidity pool that exchanges tokens.
- This contract is responsible for tracking the PartyERC20 token balance, as well as mints and burns of the liquidity token.
Jacuzzi Contract:
- The PartyRouter contract is used to interact with the liquidity pool that was created in the PartyFactory contract.
- PartyRouter routes orders to the user-determined pair contract to swap assets.
- This contract performs requirement checks needed for swapping tokens, adding liquidity, and removing liquidity.
LiquidityPoolManager Contract (Pinatas):
- The Party Jacuzzi contract allows users to stake their PartySwap tokens.
- Users who stake will receive xPARTY tokens, representing their stake.
- As staking rewards accrue, each xPARTY token will be worth more PARTY tokens upon redemption.
- The staking-lockup period defined by the team is 180 days after deployment. So, for the first 180 days of the contract's existence, users who withdraw from the contract will incur a fee.
- The early withdraw fee is by default 20% but can be set to any value by the team.
- The enter() and leave() functions could be declared external instead of public to save users some gas on each call.
StakingRewards Contract (Pinatas):
- This contract is used to distribute PARTY tokens to users who provide liquidity to pools selected by the team.
- Any user may call vestAllocation() to collect reward tokens from the TreasuryVesting contract and calculateReturns() to have the contract update reward balances.
- Once reward balances are updated, rewards can be distributed using the distributeTokens() or distributeTokensSinglePool() functions.
- Alternativley, users can call calculateAndDistribute() to perform mutliple actions at once; but this operation may be very expensive gas-wise and possibly approach the block.gaslimit.
- The team can call the activateFeeSplit() funtion, which will make the AVAX and PARTY pools receive a fixed proportion of the rewards regardless of the underlying liquidity. The team can also deactivate this functionality.
- The team update whether a liquidity pool will receive rewards or not and the weighting of rewards between liquidity pools at any time.
- The distributeTokens() function of the LiquidityPoolManager contract has external calls inside of a loop. When distributing tokens in batches, the batch must be limited or split across multiple transactions as to not exceed the block.gaslimit. The team has taken this into account by implementing the distributeTokensSinglePool() function.
- The contract uses the ratios of the reserve tokens in the AVAX/PARTY pair in the quote() function to determine the value of the token. This implementation is vulnerable to price manipulation via flash loan, potentially allowing a user to provide increase or decrease rewards to that pool.
TreasuryVester Contract (Pinatas):
- This contract allows users to stake a token in order to earn rewards in the form of another token.
- The team will set the staking and reward tokens upon deployment, after which they cannot be changed.
- To save on gas, users can use a permit signature instead of performing a token approval prior to depositing.
- Note that users' rewards will not be automatically claimed; they must be claimed by calling the getReward() function.
- The team will set the reward rate and can provide additional reward tokens at any time as well as alter the duration of rewards.
- The team also has the ability to remove any token except the staking token from the contract.
General Notes on all Contracts:
- This contract allows its deployer to time-lock tokens and have them released to a specified recipient address over time.
- The contract is designed to be used by the team to distribute PARTY tokens.
- After deployment, the team will need to send 48.125 million PARTY tokens to the contract and call startVesting().
- Tokens will be released every 24 hours. Every four years, the amount distributed every 24 hours will be cut in half.
- The owner of the contract can update the address which will receive the tokens at any time.
- The recipient of the tokens must claim them from the contract when available.
- The halvingPeriod, startingBalance, and vestingCliff variables can be set constant to save gas on both deployment and each reference.
- Solidity 0.8.x is uses across all contracts, providing built-in overflow checks.
- ReentrancyGuard is used on applicable functions to prevent reentrancy attacks.
Audit Findings Summary:
- No external threats were identified.
- Ensure trust in the team prior to investing as they have some control in the ecosystem.
- Date: September 2nd, 2021
- Update Date: September 2nd, 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 |
Flash Loans | The mechanism used to get AVAX/PARTY pricing in the LiquidityPoolManager may be susceptible to flash loans. | WARNING |
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 |
Details: Token Contract
($) = 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 #
+ [Int] IERC20Metadata (IERC20)
- [Ext] name
- [Ext] symbol
- [Ext] decimals
+ Context
- [Int] _msgSender
- [Int] _msgData
+ ERC20 (Context, IERC20, IERC20Metadata)
- [Pub] #
- [Pub] name
- [Pub] symbol
- [Pub] decimals
- [Pub] totalSupply
- [Pub] balanceOf
- [Pub] transfer #
- [Pub] allowance
- [Pub] approve #
- [Pub] transferFrom #
- [Pub] increaseAllowance #
- [Pub] decreaseAllowance #
- [Int] _transfer #
- [Int] _mint #
- [Int] _burn #
- [Int] _approve #
- [Int] _beforeTokenTransfer #
- [Int] _afterTokenTransfer #
+ ERC20Burnable (Context, ERC20)
- [Pub] burn #
- [Pub] burnFrom #
+ [Int] IERC20Permit
- [Ext] permit #
- [Ext] nonces
- [Ext] DOMAIN_SEPARATOR
+ [Lib] ECDSA
- [Int] recover
- [Int] recover
- [Int] recover
- [Int] toEthSignedMessageHash
- [Int] toTypedDataHash
+ EIP712
- [Pub] #
- [Int] _domainSeparatorV4
- [Prv] _buildDomainSeparator
- [Int] _hashTypedDataV4
+ [Lib] Counters
- [Int] current
- [Int] increment #
- [Int] decrement #
- [Int] reset #
+ ERC20Permit (ERC20, IERC20Permit, EIP712)
- [Pub] #
- modifiers: EIP712
- [Pub] permit #
- [Pub] nonces
- [Ext] DOMAIN_SEPARATOR
- [Int] _useNonce #
+ UnireviewToken (ERC20, ERC20Burnable, ERC20Permit)
- [Pub] #
- modifiers: ERC20,ERC20Permit
Details: PartyERC20 Contract
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IPartyERC20
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
+ [Lib] SafeMath
- [Int] add
- [Int] sub
- [Int] mul
+ PartyERC20 (IPartyERC20)
- [Pub] #
- [Int] _mint #
- [Int] _burn #
- [Prv] _approve #
- [Prv] _transfer #
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] permit #
Details: PartyFactory Contract
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IPartyFactory
- [Ext] feeTo
- [Ext] feeToSetter
- [Ext] getPair
- [Ext] allPairs
- [Ext] allPairsLength
- [Ext] createPair #
- [Ext] setFeeTo #
- [Ext] setFeeToSetter #
+ [Int] IPartyPair
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
- [Ext] MINIMUM_LIQUIDITY
- [Ext] factory
- [Ext] token0
- [Ext] token1
- [Ext] getReserves
- [Ext] price0CumulativeLast
- [Ext] price1CumulativeLast
- [Ext] kLast
- [Ext] mint #
- [Ext] burn #
- [Ext] swap #
- [Ext] skim #
- [Ext] sync #
- [Ext] initialize #
+ [Int] IPartyERC20
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
+ [Lib] SafeMath
- [Int] add
- [Int] sub
- [Int] mul
+ PartyERC20 (IPartyERC20)
- [Pub] #
- [Int] _mint #
- [Int] _burn #
- [Prv] _approve #
- [Prv] _transfer #
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] permit #
+ [Lib] Math
- [Int] min
- [Int] sqrt
+ [Lib] UQ112x112
- [Int] encode
- [Int] uqdiv
+ [Int] IERC20
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
+ [Int] IPartyCallee
- [Ext] partyCall #
+ PartyPair (IPartyPair, PartyERC20)
- [Pub] getReserves
- [Prv] _safeTransfer #
- [Pub] #
- [Ext] initialize #
- [Prv] _update #
- [Prv] _mintFee #
- [Ext] mint #
- modifiers: lock
- [Ext] burn #
- modifiers: lock
- [Ext] swap #
- modifiers: lock
- [Ext] skim #
- modifiers: lock
- [Ext] sync #
- modifiers: lock
+ PartyFactory (IPartyFactory)
- [Pub] #
- [Ext] allPairsLength
- [Ext] createPair #
- [Ext] setFeeTo #
- [Ext] setFeeToSetter #
Details: PartyPair Contract
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IPartyPair
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
- [Ext] MINIMUM_LIQUIDITY
- [Ext] factory
- [Ext] token0
- [Ext] token1
- [Ext] getReserves
- [Ext] price0CumulativeLast
- [Ext] price1CumulativeLast
- [Ext] kLast
- [Ext] mint #
- [Ext] burn #
- [Ext] swap #
- [Ext] skim #
- [Ext] sync #
- [Ext] initialize #
+ [Int] IPartyERC20
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
+ [Lib] SafeMath
- [Int] add
- [Int] sub
- [Int] mul
+ PartyERC20 (IPartyERC20)
- [Pub] #
- [Int] _mint #
- [Int] _burn #
- [Prv] _approve #
- [Prv] _transfer #
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] permit #
+ [Lib] Math
- [Int] min
- [Int] sqrt
+ [Lib] UQ112x112
- [Int] encode
- [Int] uqdiv
+ [Int] IERC20
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
+ [Int] IPartyFactory
- [Ext] feeTo
- [Ext] feeToSetter
- [Ext] getPair
- [Ext] allPairs
- [Ext] allPairsLength
- [Ext] createPair #
- [Ext] setFeeTo #
- [Ext] setFeeToSetter #
+ [Int] IPartyCallee
- [Ext] partyCall #
+ PartyPair (IPartyPair, PartyERC20)
- [Pub] getReserves
- [Prv] _safeTransfer #
- [Pub] #
- [Ext] initialize #
- [Prv] _update #
- [Prv] _mintFee #
- [Ext] mint #
- modifiers: lock
- [Ext] burn #
- modifiers: lock
- [Ext] swap #
- modifiers: lock
- [Ext] skim #
- modifiers: lock
- [Ext] sync #
- modifiers: lock
Details: PartyRouter Contract
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IPartyFactory
- [Ext] feeTo
- [Ext] feeToSetter
- [Ext] getPair
- [Ext] allPairs
- [Ext] allPairsLength
- [Ext] createPair #
- [Ext] setFeeTo #
- [Ext] setFeeToSetter #
+ [Lib] TransferHelper
- [Int] safeApprove #
- [Int] safeTransfer #
- [Int] safeTransferFrom #
- [Int] safeTransferAVAX #
+ [Int] IPartyRouter
- [Ext] factory
- [Ext] WAVAX
- [Ext] addLiquidity #
- [Ext] addLiquidityAVAX ($)
- [Ext] removeLiquidity #
- [Ext] removeLiquidityAVAX #
- [Ext] removeLiquidityWithPermit #
- [Ext] removeLiquidityAVAXWithPermit #
- [Ext] swapExactTokensForTokens #
- [Ext] swapTokensForExactTokens #
- [Ext] swapExactAVAXForTokens ($)
- [Ext] swapTokensForExactAVAX #
- [Ext] swapExactTokensForAVAX #
- [Ext] swapAVAXForExactTokens ($)
- [Ext] quote
- [Ext] getAmountOut
- [Ext] getAmountIn
- [Ext] getAmountsOut
- [Ext] getAmountsIn
- [Ext] removeLiquidityAVAXSupportingFeeOnTransferTokens #
- [Ext] removeLiquidityAVAXWithPermitSupportingFeeOnTransferTokens #
- [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
- [Ext] swapExactAVAXForTokensSupportingFeeOnTransferTokens ($)
- [Ext] swapExactTokensForAVAXSupportingFeeOnTransferTokens #
+ [Int] IPartyPair
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
- [Ext] MINIMUM_LIQUIDITY
- [Ext] factory
- [Ext] token0
- [Ext] token1
- [Ext] getReserves
- [Ext] price0CumulativeLast
- [Ext] price1CumulativeLast
- [Ext] kLast
- [Ext] mint #
- [Ext] burn #
- [Ext] swap #
- [Ext] skim #
- [Ext] sync #
- [Ext] initialize #
+ [Lib] SafeMath
- [Int] add
- [Int] sub
- [Int] mul
+ [Lib] PartyLibrary
- [Int] sortTokens
- [Int] pairFor
- [Int] getReserves
- [Int] quote
- [Int] getAmountOut
- [Int] getAmountIn
- [Int] getAmountsOut
- [Int] getAmountsIn
+ [Int] IERC20
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
+ [Int] IWAVAX
- [Ext] deposit ($)
- [Ext] transfer #
- [Ext] withdraw #
+ PartyRouter (IPartyRouter)
- [Pub] #
- [Ext] ($)
- [Int] _addLiquidity #
- [Ext] addLiquidity #
- modifiers: ensure
- [Ext] addLiquidityAVAX ($)
- modifiers: ensure
- [Pub] removeLiquidity #
- modifiers: ensure
- [Pub] removeLiquidityAVAX #
- modifiers: ensure
- [Ext] removeLiquidityWithPermit #
- [Ext] removeLiquidityAVAXWithPermit #
- [Pub] removeLiquidityAVAXSupportingFeeOnTransferTokens #
- modifiers: ensure
- [Ext] removeLiquidityAVAXWithPermitSupportingFeeOnTransferTokens #
- [Int] _swap #
- [Ext] swapExactTokensForTokens #
- modifiers: ensure
- [Ext] swapTokensForExactTokens #
- modifiers: ensure
- [Ext] swapExactAVAXForTokens ($)
- modifiers: ensure
- [Ext] swapTokensForExactAVAX #
- modifiers: ensure
- [Ext] swapExactTokensForAVAX #
- modifiers: ensure
- [Ext] swapAVAXForExactTokens ($)
- modifiers: ensure
- [Int] _swapSupportingFeeOnTransferTokens #
- [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
- modifiers: ensure
- [Ext] swapExactAVAXForTokensSupportingFeeOnTransferTokens ($)
- modifiers: ensure
- [Ext] swapExactTokensForAVAXSupportingFeeOnTransferTokens #
- modifiers: ensure
- [Pub] quote
- [Pub] getAmountOut
- [Pub] getAmountIn
- [Pub] getAmountsOut
- [Pub] getAmountsIn
Details: PartySwap Jacuzzi Contract
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [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
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Int] IERC20Metadata (IERC20)
- [Ext] name
- [Ext] symbol
- [Ext] decimals
+ Context
- [Int] _msgSender
- [Int] _msgData
+ ERC20 (Context, IERC20, IERC20Metadata)
- [Pub] #
- [Pub] name
- [Pub] symbol
- [Pub] decimals
- [Pub] totalSupply
- [Pub] balanceOf
- [Pub] transfer #
- [Pub] allowance
- [Pub] approve #
- [Pub] transferFrom #
- [Pub] increaseAllowance #
- [Pub] decreaseAllowance #
- [Int] _transfer #
- [Int] _mint #
- [Int] _burn #
- [Int] _approve #
- [Int] _beforeTokenTransfer #
- [Int] _afterTokenTransfer #
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
- [Prv] _setOwner #
+ PartyToken (ERC20, Ownable)
- [Pub] #
- [Ext] burnOwnTokens #
- [Ext] permit #
+ PartyJacuzzi (ERC20, Ownable)
- [Pub] #
- [Pub] enter #
- [Pub] leave #
- [Ext] setEarlyWithdrawalFee #
- modifiers: onlyOwner
Details: LiquidityPoolManager Contract (Pinata)
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [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] 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
+ ReentrancyGuard
- [Pub] #
+ [Lib] Math
- [Int] max
- [Int] min
- [Int] average
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [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 #
+ [Int] IPartyERC20
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
+ StakingRewards (ReentrancyGuard, Ownable)
- [Pub] #
- [Ext] totalSupply
- [Ext] balanceOf
- [Pub] lastTimeRewardApplicable
- [Pub] rewardPerToken
- [Pub] earned
- [Ext] getRewardForDuration
- [Ext] stakeWithPermit #
- modifiers: nonReentrant,updateReward
- [Ext] stake #
- modifiers: nonReentrant,updateReward
- [Pub] withdraw #
- modifiers: nonReentrant,updateReward
- [Pub] getReward #
- modifiers: nonReentrant,updateReward
- [Ext] exit #
- [Ext] notifyRewardAmount #
- modifiers: onlyOwner,updateReward
- [Ext] recoverERC20 #
- modifiers: onlyOwner,nonReentrant
- [Ext] setRewardsDuration #
- modifiers: onlyOwner
+ LiquidityPoolManager (Ownable, ReentrancyGuard)
- [Pub] #
- [Pub] isWhitelisted
- [Ext] isAvaxPair
- [Ext] isPartyPair
- [Ext] setavaxPartyPair #
- modifiers: onlyOwner
- [Ext] addWhitelistedPool #
- modifiers: onlyOwner
- [Ext] removeWhitelistedPool #
- modifiers: onlyOwner
- [Ext] changeWeight #
- modifiers: onlyOwner
- [Ext] activateFeeSplit #
- modifiers: onlyOwner
- [Ext] deactivateFeeSplit #
- modifiers: onlyOwner
- [Pub] getAvaxLiquidity
- [Pub] getPartyLiquidity
- [Pub] getAvaxPartyRatio
- [Pub] calculateReturns #
- [Pub] distributeTokens #
- modifiers: nonReentrant
- [Ext] distributeTokensSinglePool #
- modifiers: nonReentrant
- [Ext] calculateAndDistribute #
- [Ext] vestAllocation #
- modifiers: nonReentrant
- [Int] quote
+ [Int] ITreasuryVester
- [Ext] claim #
+ [Int] IPARTY
- [Ext] balanceOf
- [Ext] transfer #
+ [Int] IPartyPair
- [Ext] token0
- [Ext] token1
- [Ext] factory
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] burn #
- [Ext] getReserves
Details: StakingRewards Contract (Pinata)
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [Lib] Math
- [Int] max
- [Int] min
- [Int] average
+ [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
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [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 #
+ ReentrancyGuard
- [Pub] #
+ [Int] IPartyERC20
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
+ StakingRewards (ReentrancyGuard, Ownable)
- [Pub] #
- [Ext] totalSupply
- [Ext] balanceOf
- [Pub] lastTimeRewardApplicable
- [Pub] rewardPerToken
- [Pub] earned
- [Ext] getRewardForDuration
- [Ext] stakeWithPermit #
- modifiers: nonReentrant,updateReward
- [Ext] stake #
- modifiers: nonReentrant,updateReward
- [Pub] withdraw #
- modifiers: nonReentrant,updateReward
- [Pub] getReward #
- modifiers: nonReentrant,updateReward
- [Ext] exit #
- [Ext] notifyRewardAmount #
- modifiers: onlyOwner,updateReward
- [Ext] recoverERC20 #
- modifiers: onlyOwner,nonReentrant
- [Ext] setRewardsDuration #
- modifiers: onlyOwner
Details: TreasuryVester Contract (Pinata)
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [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
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ ReentrancyGuard
- [Pub] #
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [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 #
+ TreasuryVester (Ownable, ReentrancyGuard)
- [Pub] #
- [Ext] startVesting #
- modifiers: onlyOwner
- [Ext] setRecipient #
- modifiers: onlyOwner
- [Ext] claim #
- modifiers: nonReentrant