10190 matches found
expiry is not work in contract
Reported by warden rayn in 98, duplicate of 28 Low Risk Findings - expiry is not work in contract In document, we define that: Expiry The expiry date of the market. If a market has not settled by its expiry date, it will automatically settle at the lower bound of its Valuation Range. But in...
Function getUserPastLock may return incorrect values
Lines of code Vulnerability details Impact userLocks array can contain elements with the same fromBlock properties, but different total locked amounts. This edge case is not considered in the implementation of getUserPastLock function, which returns a value as soon as it finds a UserLock with...
Use .call instead of .transfer for increased security
Lines of code Vulnerability details Impact The issue highlighted here will reduce gas costs and avoid hacks Proof of Concept The .transfer function at the following places can be replaced with .call as the former has a hard dependency on gas costs as it forwards a fixed amount of gas: 2300. For...
admin can rug
Lines of code Vulnerability details In the function transferToken, the admin can steal all the money. --- The text was updated successfully, but these errors were encountered: All reactions...
User withdrawal can be stuck
Lines of code Vulnerability details Impact Any transfer will lead to updation of cooldown period for the recipient. This can become a problem if recipient wished to withdraw some amount using unstake. Proof of Concept 1. User A wished to withdraw amount 100 2. User A is pending 1 more day where...
System could be wrapped and made useless without contract whitelisting
Lines of code Vulnerability details Impact Anyone could create a contract or a contract factory "PAL Locker" with a fonction to deposit PAL tokens through a contract, lock them and delegate the voting power to the contract owner. Then, the ownership of this contract could be sold. By doing so,...
UserLock information can be found during emergency mode
Lines of code Vulnerability details When the contract is in blocked state emergency mode, the protocol wants to return an empty UserLock info, on calling the function getUserLock. However, there is another way, by which the users can find the same information. The below function is not protected...
PaladinRewardReserve.sol may have potential bugs if it uses new tokens as rewards
Lines of code Vulnerability details Impact PaladinRewardReserve.sol may have potential bugs if it uses new tokens as rewards. Proof of Concept Currently, PaladinRewardReserve.sol has following behaviors: mappingaddress = bool public approvedSpenders does not store the info regarding which token i...
Staking cooldown can be avoided for a part of the funds
Lines of code Vulnerability details Impact Part of the stake can be withdrawn immediately at any time. Proof of Concept Ratio between COOLDOWNPERIOD and UNSTAKEPERIOD = 2 only and should be much higher ex 5 or 10 l.28 COOLDOWNPERIOD = 864000; // 10 days ... UNSTAKEPERIOD = 432000; // 5 days Vario...
Precision loss
Lines of code Vulnerability details Impact In line 729 of HolyPaladinToken.sol a huge precision loss occurs if dropDecreaseDuration is not a multiple of MONTH. In its current implementation dropDecreaseDuration / MONTH will get rounded down, which means that dropDecreaseDuration of 1 month and 29...
Add a timelock to PaladinRewardReserve functions
Lines of code Vulnerability details Impact The owner of PaladinRewardReserve can approve and transfer any amount of tokens with no limits on any account. This is not good for investors. To give more trust to users: these functions should be put behind a timelock. Proof of Concept Tools Used VS Co...
User can always stay in UNSTAKE_PERIOD
Lines of code Vulnerability details Impact Due to how the cooldown period is calculated after a transfer, a user can strategically transfer between accounts to increase their cooldown timestamp while keeping it within the UNSTAKEPERIOD, so they can unstake anytime, defeating the cooldown mechanis...
Malicious user can indefinitely freeze the funds of another user
Lines of code Vulnerability details Impact By design, a user's cooldown period is extended if they receive a transfer of hPal. The cooldown is extended based on the weight of the receiver's original balance and cooldown period compared to the sent amount and sender's cooldown period. Due to this...
Delegations incorrectly tracked when multiple delegate() calls occur in the same block
Lines of code Vulnerability details The README.md states: If the user has a Lock, and delegates to someone, then the bonus voting power is not counted. Impact Accounts are still able to claim bonus voting power even if they delegate to someone else, and any operations that rely on the public...
Setting the minter address to address(0) can lead to breaking the contract set.
Lines of code Vulnerability details Impact The highlighted issue can lead to breaking the functionality of the contract set. Proof of Concept At certain set functions in the codebase, we are allowing setting the values to address0 or the case where old address = new address. This was observed in...
Past state query results are susceptible to manipulation due to multiple states with same block number
Lines of code https://github.com/code-423n4/2022-0...
Users with large cooldowns can grief other users
Lines of code Vulnerability details Impact If an account has a large cooldown, that account can grief other accounts that are waiting for their own cooldowns, by sending small amounts to them. Proof of Concept Every transfer to an account increases the cooldown / @dev Hook called before any...
Whole balance self transfer set user's cooldown to zero
Lines of code Vulnerability details Impact If a user transfers to self the whole balance, then user’s cooldown resets to zero. A user will have to reset its cooldown manually to current timestamp via cooldown call to be able to unstake in the future. As a transfer to self can happen by mistake an...
Cooldown tricking possible
Lines of code Vulnerability details Impact Due to an approach that upon a transfer the weighted average is calculated for the cooldown, it is possible to trick it in a way that ready funds can "thrive" in the allowed window, ready to payout. Anytime it is ending, those funds can be "mixed" with...
Emergency mode enable/disable issue
Lines of code Vulnerability details Impact Enabling emergency mode should be one way process that sets contracts in emergency mode. It should be not possible to revert that process, otherwise it puts owner of the contracts in very privileged position. Owner can trigger emergency mode, perform...
Function cooldown() is not protected when protocol in emergency mode
Lines of code Vulnerability details Function cooldown is not protected when protocol is in emergency mode. Its behavior is not consistent with the other major functions defined. Impact While other major functions like stake, unstake, lock, unlock, etc., of this contract is protected by checking f...
updating the state
Lines of code Vulnerability details Impact In the Emergency withdraw function userCurrentBonusRatio and durationRatio aren't update which will user clime funds with the wrong ratio Proof of Concept Tools Used Manual Recommended Mitigation Steps set these variables to zero in the EmergencyWithdraw...
DropPerSecond is not updated homogeneously, the rewards emission can be much higher than expected in some cases
Lines of code Vulnerability details function updateDropPerSecond internal returns uint256 // If no more need for monthly updates = decrease duration is over ifblock.timestamp startDropTimestamp + dropDecreaseDuration // Set the current DropPerSecond as the end value // Plus allows to be updated i...
Function getPastDelegate may return incorrect values
Lines of code Vulnerability details Impact By calling delegate function of HolyPaladinToken contract two or more times in a single block including a transaction so it is possible to flash loan assets and pass them to more and more accounts, users can add elements to the delegateCheckpoints array...
Add a timelock to setPlatformFee()
Lines of code Vulnerability details Impact It is a good practice to give time for users to react and adjust to critical changes. A timelock provides more guarantees and reduces the level of trust required, thus decreasing risk for users. It also indicates that the project is legitimate. Here, no...
Unsafe usage of transfer and transferFrom functions
Lines of code Vulnerability details Impact Use transfer instead of safeTransfer - in CoreCollection you don't check if the transfer has ben successful or not, and in RoyaltyVault you assume it returns bool. It is more safe to use safeTransfer instead of using the transfer functions, because some...
Initializer can be called many times and change critical parameters in an existing collection
Lines of code Vulnerability details Impact Anyone can create a collection so the owner is not a trusted actor. Someone can create a collection with a maxSupply and then call initialize again to increase it. Also, the creator can use it to change price and front-run a mint with an arbitrary bigger...
CoreCollection.setRoyaltyVault doesn't check royaltyVault.royaltyAsset against payableToken, resulting in potential permanent lock of payableTokens in royaltyVault
Lines of code Vulnerability details Impact Each CoreProxy is allowed to be associated with a RoyaltyVault, the latter which would be responsible for collecting minting fees and distributing to beneficiaries. Potential mismatch between token used in CoreProxy and RoyaltyVault might result in minti...
Non unique token ID might lead to collusion
Lines of code Vulnerability details Impact Token IDs are defined as concatenation of points, total supply + 1. The total supply can decrease when split process in progress. This means that the contract might try to mint a token with an ID which already exists. Proof of Concept 1. Navigate to the...
Possible problem when mintToken and the user wants to purchase a token
Lines of code Vulnerability details Impact A User can mint tokens even if the payment doesn't succeed. Proof of Concept the contract ERC721Payable uses erc20 to handle payments. When this contract handles the payment of the user , calls the function transferFrom from the ERC20 payableToken variab...
Improper Upper Bound Definition on the Fee
Lines of code Vulnerability details Impact The platformFee does not have any upper or lower bounds. Values that are too large will lead to reversions in several critical functions or the platform user will lost all funds when paying the fee. Proof of Concept 1. Navigate to the following contract...
Collection Owners Can Brick the CoreCollection.sol Contract by Preventing Token Transfers
Lines of code Vulnerability details Impact Joyn allows project owners to configure their own royalty vault or give the SplitFactory.sol contract the ability to do this when the Splitter.sol and RoyaltyVault.sol contracts are deployed. Because there is an option for the owner to control the...
A large platformFee (>10000), would cause underflow during sendToSplitter (at RoyaltyVault.sol)
Lines of code Vulnerability details Impact at RoyaltyVault.sol Presently platformFee, does not have a upper limit and can be set to any value through setPlatformFee function. If the value is set beyond 10,000 it would cause an underflow during split share calculation at sendToSplitter function...
QA Report
Paladin Contest March 31, 2022 @securerodd Non-Critical 1. Inconsistent Removal of Bonus Multiplier The bonus multipliers userCurrentBonusRatiouser and userBonusRatioDecreaseuser are zeroed out in the kickaddress user, address kicker and unlockaddress user functions where an empty lock is set...
Wrong constant definition
Lines of code Vulnerability details Impact PERCENTAGESCALE in Splitter.sol is defined as 1e6 and this is not aligned with used percentage scale, which is an inverse of a basis point - 1e4. Contracts rely on the values displayed by external function of a contract. They may align a percentage to th...
RoyaltyVault.sol is Not Equipped to Handle On-Chain Royalties From Secondary Sales
Lines of code Vulnerability details Impact The Joyn documentation mentions that Joyn royalty vaults should be equipped to handle revenue generated on a collection's primary and secondary sales. Currently, CoreCollection.sol allows the collection owner to receive a fee on each token mint, however,...
User can mint without paying if the token used doesn't revert on failure
Lines of code Vulnerability details Impact User can mint and if he doesn't have enough tokens the transfer will fail and if the token doesn't revert it will return false and the minting will continue. The user will mint everything for free. Proof of Concept Some ERC20 tokens like USDT don't rever...
Collection Owners Can Reinitialize CoreCollection.sol and Mint Duplicate NFTs
Lines of code Vulnerability details Impact The initialize function is called by CoreFactory.sol when creating projects or adding collections to an existing project. When ownership of the CoreCollection.sol contract is transferred to the project owner, it gives the owner access to a subset of...
STORAGE COLLISION BETWEEN PROXY AND IMPLEMENTATION (LACK EIP 1967)
Lines of code Vulnerability details Impact Storage collision because of lack of EIP1967 could cause conflicts and override sensible variables Proof of Concept contract CoreProxy is Ownable address private immutable implement; When you implement proxies, logic and implementation share the same...
Not handling return value of transferFrom command can create inconsistency
Lines of code Vulnerability details The below transferFrom command is called at two places in the core contracts, followed by an emit event payableToken.transferFrommsg.sender,recipient,amount emit ......; The return value is not checked during the payableToken.transferFrom Impact In the event of...
Differing percentage denominators causes confusion and potentially brick claims
Lines of code Vulnerability details Details & Impact There is a PERCENTAGESCALE = 10e5 defined, but the actual denominator used is 10000. This is aggravated by the following factors: 1. Split contracts are created by collection owners, not the factory owner. Hence, there is a likelihood for someo...
Fee-on-Transfer tokens aren’t supported
Lines of code Vulnerability details Details & Impact Tokens that are charge a fee on transfer will not work correctly if it is specified as a payment token for NFT mints or as a royalty asset. For NFT mints, the amount recorded by the NewPayment and NewWithdrawal events might not match the actual...
Missing onlyUnInitialized modifier on initialize() function
Missing onlyUnInitialized modifier on initialize function Guess that onlyUnInitialized modifier were created for initialized function, but it wasn't called on the function. As the name, initialize should be called once early when the contract is deployed. But in the current implementation the...
Duplicate NFTs Can Be Minted if payableToken Has a Callback Attached to it
Lines of code Vulnerability details Impact The mintToken function is called to mint unique tokens from an ERC721 collection. This function will either require users to provide a merkle proof to claim an airdropped token or pay a fee in the form of a payableToken. However, because the payableToken...
One co-creator with a small share can get 100% of the funds in the splitter
Lines of code Vulnerability details Impact One co-creator with a small share can get 100% of the funds by calling the incrementWindow function from an attacker contract that mimics RoyaltyVault. He can then create one or multiple fake windows and claim them to get the full balance of the splitter...
CoreCollection: Starting index is pseudo-randomly generated, allowing for gameable NFT launches
Lines of code Vulnerability details Details & Impact In Paradigm’s article “A Guide to Designing Effective NFT Launches”, one of the desirable properties of an NFT launch is unexploitable fairness: Launches must have true randomness to ensure that predatory users cannot snipe the rarest items at...
Use safeTransfer instead of transferFrom
Lines of code Vulnerability details Impact In the following line, transferFrom is used. However, this function transfers funds from CoreCollection contract to msg.sender. That's why transfersafeTransfer must be used. Like the comment describes, if a royalty vault isn't set, tokens are kept within...
No reentrancy guard on mint() function that has a callback
Lines of code Vulnerability details Impact the mint function calls mint which has a callback to the "to" address argument. Functions with callbacks should have reentrancy guards in place for protection against possible malicious actors both from inside and outside the protocol. Proof of Concept...
Any User Can Call incrementWindow() by Using a Spoofed Contract
Lines of code Vulnerability details Impact The incrementWindow function is used to notify the splitter contract whenever funds are sent to the contract. Users who belong to the merkle tree are able to claim their set percentage allocation on each new window. However, it is possible to spoof a cal...
Users at UNSTAKE_PERIOD can assist other users in unstaking tokens.
Lines of code Vulnerability details Impact Consider the following scenario: Day 0: User A stakes 200 tokens and calls the cooldown function. At this time, user A's cooldown is Day 0. Day 15: User B stakes 100 tokens, but then wants to unstake tokens. So user A said that he could assist user B in...