Transferring bond doesn't update owner #532
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-1030
edited-by-warden
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2023-08-dopex/blob/0ea4387a4851cd6c8811dfb61da95a677f3f63ae/contracts/decaying-bonds/RdpxDecayingBonds.sol#L162
Vulnerability details
Impact
Detailed description of the impact of this finding.
Transferring bond doesn't update owner
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
Decayed bonds are meant to be transferring(exchanging) due to the fact that there is a function that forbid to transfer them if bonds in a pause state.
RdpxDecayingBonds.sol#L162
But whenever user trasferring their bonds he still holds power and all bonuses of that bond due to the fact that
bonds[bondId].to
stays the same.Tools Used
POC
Recommended Mitigation Steps
function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal override(ERC721, ERC721Enumerable) { _whenNotPaused(); + bonds[tokenId].owner = to; super._beforeTokenTransfer(from, to, tokenId, batchSize); }
Assessed type
Error
The text was updated successfully, but these errors were encountered: