Submitted by ZanyBonzy, also found by Trooper, 0x3b, Sabit, King_ (1, 2), _karanel, sl1, Shubham, 0xR360, inzinko, 0x0bserver, PetarTolev, AvantGard, and 0xJoyBoy03
https://github.com/code-423n4/2024-07-traitforge/blob/279b2887e3d38bc219a05d332cbcb0655b2dc644/contracts/TraitForgeNft/TraitForgeNft.sol#L47 
https://github.com/code-423n4/2024-07-traitforge/blob/279b2887e3d38bc219a05d332cbcb0655b2dc644/contracts/TraitForgeNft/TraitForgeNft.sol#L148 
https://github.com/code-423n4/2024-07-traitforge/blob/279b2887e3d38bc219a05d332cbcb0655b2dc644/contracts/TraitForgeNft/TraitForgeNft.sol#L294 
https://github.com/code-423n4/2024-07-traitforge/blob/279b2887e3d38bc219a05d332cbcb0655b2dc644/contracts/TraitForgeNft/TraitForgeNft.sol#L329
TraitForge NFTs can be transferred and sold, but the new owner can burn or most likely nuke the token to reduce the the initial owners airdrop benefits.
When a user mints or forges a new token, theyre set as the tokens initialOwner and given airdrop benefits equal to the entropy of their newly minted token.
When burning, the entropy is then deducted from the initialOwners amount, but not removed when transfered or when the token is bought, which in another case could allow the owner to earn from minting airdrop and from token sale.
However, a transferred or sold token can still be nuked or burned which directly reduces the initial owners user amount causing loss of funds to the initial owner. Also by nuking, the nuker doesnt lose as much in the griefing attack compared to burning the token.
The gist link here holds a test case that shows that airdrop amounts are not migrated to new owner during transfers/sales, and that by burning/nuking the token, the sellers airdrop amount can be successfully reduced.
The expected result should look like this:
Note: to view the provided image, please see the original submission here.
Recommend introducing a check in the burn function that skips reducing user amount if the caller is the NukeFund contract or not the initial owner.
TForge1 (TraitForge) confirmed and commented:
Koolex (judge) increased severity to High
KupiaSec (warden) commented:
dimulski (warden) commented:
ZanyBonzy (warden) commented:
dimulski (warden) commented:
Koolex (judge) commented:
