GolomToken.sol doesn’t contain a function to mint treasury tokens
The token contract lacks a function to mint treasury tokens, so the minter must be changed via a timelocked process. During the 24-hour timelock, the reward distributor cannot mint, causing all trades to revert.
Submitted by 0x52
Potential downtime in GolomTrader
Proof of Concept
GolomToken.sol doesn’t have a function to mint the treasury tokens as specified in the docs (https://docs.golom.io/tokenomics-and-airdrop). In order for these tokens to be minted, the minter would have to be changed via setMinter() and executeSetMinter() to a contract that can mint the treasury tokens. Because of the 24 hour timelock, this would lead to downtime for GolomTrader.sol if trading has already begun. This is because GolomTrader.sol calls RewardDistributor.sol#addFees each time there is a filled order. When the epoch changes, RewardDistributor.sol will try to call the mint function in GolomToken.sol. Because of the timelock, there will be at least a 24 hours period where RewardDistributor.sol is not the minter and doesn’t have the permission to mint. This means that during that period all trades will revert.
Recommended Mitigation Steps
Add a function to GolomToken.sol to mint the treasury tokens similar to the mintAirdrop() and mintGenesisReward() functions.
0xsaruman (Golom) confirmed, but disagreed with severity
0xsaruman (Golom) resolved and commented:
https://github.com/golom-protocol/contracts/commit/746507ea6f71a017be178f7eeb66d2dbf92a4524
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the token contract does not include a dedicated function to mint treasury tokens, forcing a minter change that triggers a timelock and temporarily removes minting permission from the reward distributor.
Impact
All trades could revert for at least 24 hours during the minter change, causing downtime for GolomTrader.
What the attacker needed
Trading has already begun; minter change is initiated
The fix
A function should be added to GolomToken.sol to mint treasury tokens, similar to the existing mintAirdrop() and mintGenesisReward() functions.
How it was found
- The minter is changed via setMinter() and executeSetMinter() to a contract that can mint treasury tokens.
- Because of the 24-hour timelock, RewardDistributor.sol is not the minter for at least 24 hours.
- During that period, when the epoch changes, RewardDistributor.sol tries to call the mint function but lacks permission, so all trades revert.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract controls who can create new tokens. The report says the token contract is missing a way to create tokens for the treasury, so the team would have to change the minter through a slow, 24-hour process. During that wait, the reward distributor cannot create tokens, so trades that depend on it fail.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.