Skip to content

Code4rena

Joyn contest

Every publicly disclosed report for Joyn contest and what kind of bugs they were.

disclosed reports
20
most reported class
Business logic
bug classes found
4
first disclosure
2022
Find Joyn contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Joyn contest chose to make public.

DoS

CoreCollection’s token transfer can be disabled

The royalty vault's sendToSplitter function can be manipulated so that a tiny balance causes a zero-amount transfer to the platform fee recipient, which reverts for certain ERC20 tokens. An attacker can repeatedly empty the vault and send 1 wei, causing every CoreCollection token transfer to fail and disabling the token.

Joyn contest

Medium
Smart contracts

STORAGE COLLISION BETWEEN PROXY AND IMPLEMENTATION (LACK EIP 1967)

The proxy contract does not use EIP-1967 storage slots, so its implementation address and owner variable share the same storage layout as the logic contract. An attacker could potentially overwrite sensitive variables or cause an upgrade to brick the contract by rearranging inheritance order.

Joyn contest

High
Access control

Splitter: Anyone can call incrementWindow to steal the tokens in the contract

The Splitter contract's incrementWindow function can be called by anyone using a fake RoyaltyVault contract, allowing the caller to inflate the recorded balance for a window. A verified user can then claim more tokens than they are entitled to, stealing funds from the contract.

Joyn contest

High
DoS

DoS: claimForAllWindows() May Be Made Unusable By An Attacker

The claimForAllWindows function loops over all windows up to currentWindow, which can grow indefinitely. An attacker can repeatedly call incrementWindow by impersonating a royalty vault, causing the loop to exceed the block gas limit and making claimForAllWindows unusable.

Joyn contest

High
Access control

CoreCollection can be reinitialized

The CoreCollection contract's initialize function can be called multiple times because it sets an initialized flag but does not check it. This allows the owner to reset core variables such as payableToken, potentially retrieving all contract funds.

Joyn contest

High
Access control

Centralisation RIsk: Owner Of RoyaltyVault Can Take All Funds

The owner of the RoyaltyVault contract could set the platform fee to any arbitrary value, including 100%, so that the whole balance and future balances went to an owner-controlled recipient instead of the splitter. This let the owner take all funds and, if the splitter is called during NFT transfers, could block those transfers.

Joyn contest

High
Business logic

Differing percentage denominators causes confusion and potentially brick claims

A constant named PERCENTAGE_SCALE was defined as 10e5 while the code actually divided by 10000, so a collection owner could easily use the wrong denominator when creating a split. If that happened, the calculated claimable amount could exceed the contract's funds, making claims fail and locking funds permanently.

Joyn contest

Medium
Business logic

createProject can be frontrun

The createProject function in a smart contract can be called by anyone, allowing a malicious user to front-run a legitimate project creation and become the owner of the collection. As owner, the attacker can withdraw the payment token.

Joyn contest

Medium
Business logic

ERC20 transferFrom return values not checked

The contract called transferFrom() but did not check its boolean return value, so tokens that return false instead of reverting were treated as a successful payment. An attacker could use such a token to mint NFTs without paying the mint fee.

Joyn contest

High
Business logic

Funds cannot be withdrawn in CoreCollection.withdraw

The withdraw function of the CoreCollection contract moved tokens using transferFrom from the contract to its owner, but many ERC20 tokens require an allowance for that call, which the contract never grants to itself. As a result the withdrawal reverts and the funds stay locked in the contract.

Joyn contest

High
Smart contracts

ERC20 tokens with no return value will fail to transfer

The contract uses the standard ERC20 transfer function, which expects a boolean return value. Many tokens, including USDT, do not return a value, so the transfer call reverts even when the transfer would succeed, causing the contract to fail to transfer those tokens.

Joyn contest

High
Business logic

Ineffective Handling of FoT or Rebasing Tokens

The contracts do not account for tokens that charge a fee on transfer or rebase, so the Splitter records more tokens than it actually holds. If all users claim, the last user cannot withdraw their share because the contract runs out of funds.

Joyn contest

Medium
DoS

Fixed Amount of Gas Sent in Call May Be Insufficient

The contract's ETH transfer function uses a fixed gas amount of 30,000, which may be insufficient for a receiving contract's receive() function, preventing the recipient from receiving funds. An attacker could exploit this by deploying a contract that requires more gas, causing the transfer to fail and funds to be stuck.

Joyn contest

Medium