Transferring Ownership Might Break The Market
After the transfer of the market ownership, the market might stop working, and no one could purchase any bond token from the market leading to a loss of sale for the market makers.\\nThe `callbackAuthorized` mapping contains a list of whitelisted market owners authorized to use the callback. When the users call the `purchaseBond` function, it will check at Line 390 if the current market owner is still authorized to use a callback. Otherwise, the function will revert.\\n```\\nFile: BondBaseSDA.sol\\n    function purchaseBond(\\n        uint256 id_,\\n        uint256 amount_,\\n        uint256 minAmountOut_\\n    ) external override returns (uint256 payout) {\\n        if (msg.sender != address(_teller)) revert Auctioneer_NotAuthorized();\\n\\n        BondMarket storage market = markets[id_];\\n        BondTerms memory term = terms[id_];\\n\\n        // If market uses a callback, check that owner is still callback authorized\\n        if (market.callbackAddr != address(0) && !callbackAuthorized[market.owner])\\n            revert Auctioneer_NotAuthorized();\\n```\\n\\nHowever, if the market owner transfers the market ownership to someone else. The market will stop working because the new market owner might not be on the list of whitelisted market owners (callbackAuthorized mapping). As such, no one can purchase any bond token.\\n```\\nFile: BondBaseSDA.sol\\n    function pushOwnership(uint256 id_, address newOwner_) external override {\\n        if (msg.sender != markets[id_].owner) revert Auctioneer_OnlyMarketOwner();\\n        newOwners[id_] = newOwner_;\\n    }\\n```\\n
Before pushing the ownership, if the market uses a callback, implement an additional validation check to ensure that the new market owner has been whitelisted to use the callback. This will ensure that transferring the market ownership will not break the market due to the new market owner not being whitelisted.\\n```\\nfunction pushOwnership(uint256 id_, address newOwner_) external override {\\n    if (msg.sender != markets[id_].owner) revert Auctioneer_OnlyMarketOwner();\\n// Add the line below\\n   if (markets[id_].callbackAddr != address(0) && !callbackAuthorized[newOwner_])\\n// Add the line below\\n    revert newOwnerNotAuthorizedToUseCallback();\\n    newOwners[id_] = newOwner_;\\n}\\n```\\n
After the transfer of the market ownership, the market might stop working, and no one could purchase any bond token from the market leading to a loss of sale for the market makers.
```\\nFile: BondBaseSDA.sol\\n    function purchaseBond(\\n        uint256 id_,\\n        uint256 amount_,\\n        uint256 minAmountOut_\\n    ) external override returns (uint256 payout) {\\n        if (msg.sender != address(_teller)) revert Auctioneer_NotAuthorized();\\n\\n        BondMarket storage market = markets[id_];\\n        BondTerms memory term = terms[id_];\\n\\n        // If market uses a callback, check that owner is still callback authorized\\n        if (market.callbackAddr != address(0) && !callbackAuthorized[market.owner])\\n            revert Auctioneer_NotAuthorized();\\n```\\n