TempleGold
will be DoS-ed if the chainId changesTempleGold
minting can happen only on the chain with the given mintChainId
. Since, there is no way to change this variable, if the chainId
of the chain changes, the contract will no longer be usable.
It's possible that a chainId
gets changed because of chain reorgs or some other event.
If this happens, no mints will be executable.
Manual Review
GnosisTeam
will receive tokens even if params.gnosis == 0
According to the known issues
In Temple Gold contract, setDistributionParams() can be executed with 0 value for a parameter eg. params.gnosis - This is intentional to freely distribute minted TGLD to staking and dai gold auction only.
This is not entirely true.
Because of rounding down, there will be some dust amount minted to the gnosis team even if their parameter's value is set to 0
.
Increase in the balance of the gnosis team.
Manual Review
Document this behavior.
Add a function to manage the chainId
.
DaiGoldAuction.sol dust amounts can never be claimed.
The contract accumulates dust amounts over time because when a claim happens, the math will round it down. These dust amounts will be forever locked in the contract since the recover functionality allows withdrawing tokens for distribution that has not started.
Loss of funds
Manual Review
Consider if you wish to add a functionality that allows you to pull the dust amounts.
[!CAUTION]
Adding such functionality may introduce centralization issues
DaiGoldAuction.isCurrentEpochEnded
returns wrong valueDaiGoldAuction.isCurrentEpochEnded() returns true
for not started epochs.
The result of the function call is
This is not efficient for epochs that have either not been started yet or had their tokens claimed.
As we can see, a position with startTime = endTime = 0
will return true
as if it has ended.
Wrong return value
Manual Review
An event is emitted with a wrong value.
The second parameter of the AuctionConfigRemoved
event is epochId
.
In removeAuctionConfig this value is always hardcoded to 0 instead of using the correct epochId.
Wrong value will be emitted.
Manual Review
setAuctionConfig
and startAuction
There is a discrepancy about the minimumDistributedAuctionToken
between the two functions.
If we look startAuction, we can see that minimumDistributedAuctionToken
is enforced only when activationMode == AUCTION_TOKEN_BALANCE
.
However, setAuctionConfig reverts if the minimum is not set regardless of the activation mode. This means the check is redundant and one of the following is true:
the minimum should be always enforced
the minimum should be enforced only when activationMode == AUCTION_TOKEN_BALANCE
and the code currently doesn't allow that.
Ambiguity about the minimumDistributedAuctionToken
Manual Review
Remove the redundant check and modify setAuctionConfig
if needed.
SpiceAuction.setAuctionConfig()cannot set the config for an epoch if the previous one is active.
The code tries to prevent the DAO from setting a config for an active epoch. In order to do that, it introduced the following check:
However, the info
variable is about the current epoch, but setAuctionConfig
always sets the config of the next epoch.
The wrong check disallows setting config for an auction when the previous auction has not ended.
Manual Review
Remove the whole if check.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.