# Lack of ability to make an some external function calls makes the DAO stage unreachable

TraitForgeNft owns Airdrop but lacks a wrapper to call allowDaoFund(), so NukeFund's dev-share routing can never reach the DAO stage.

- Payout: Audit contest
- Severity: medium
- Program: TraitForge
- Found by: pfapostol
- Disclosed: 2024-09-13
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2024-07-traitforge-findings/issues/378
- Library page: https://bugbountylibrary.com/r/c4%3A2024-07-traitforge%3AM-08
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:code4rena sev:medium tech:solidity technique:source-review vuln:access-control vuln:business-logic

**Target:** TraitForgeNft / Airdrop / NukeFund Solidity contracts
**Root cause:** Airdrop ownership is transferred to TraitForgeNft, but TraitForgeNft exposes no function to forward the onlyOwner call allowDaoFund(), leaving that flag permanently false.
**Steps:**
1. Deploy contracts; call `airdrop.setTraitToken(token)` and `airdrop.transferOwnership(address(nft))` as deployer
2. Observe `airdrop.owner() == address(nft)`
3. Attempt to call `airdrop.allowDaoFund()` — reverts since caller is not owner
4. Confirm no wrapper exists in TraitForgeNft, so `airdropContract.daoFundAllowed()` stays false forever
5. NukeFund dev-share branch `else if (!airdropContract.daoFundAllowed())` always routes to owner(), never daoAddress
**How found:** Code reading of ownership transfer flow: noticed Airdrop ownership moves to TraitForgeNft, then checked which onlyOwner Airdrop functions TraitForgeNft wraps (startAirdrop yes, allowDaoFund no), confirming the DAO-stage branch in NukeFund is unreachable.
**Insight:** When ownership of a contract is transferred to another contract, enumerate every onlyOwner function the new owner must invoke and verify each has a forwarding wrapper — missing wrappers silently dead-code downstream branches.

## Proof of concept (copied exactly from the original report)

**Foundry test showing Airdrop owned by TraitForgeNft**

```
function testMedium_deadFunc() public {
      _initVars();
  
      console2.log(airdrop.owner());
      assert(airdrop.owner() == address(nft));
  }
```

**NukeFund DAO stage branch relying on daoFundAllowed**

```
if (!airdropContract.airdropStarted()) {
            (bool success,) = devAddress.call{value: devShare}("");
            require(success, "ETH send failed");
            emit DevShareDistributed(devShare);
        } else if (!airdropContract.daoFundAllowed()) {
            (bool success,) = payable(owner()).call{value: devShare}("");
            require(success, "ETH send failed");
        } else {
            (bool success,) = daoAddress.call{value: devShare}("");
            require(success, "ETH send failed");
            emit DevShareDistributed(devShare);
        }
```

