Open c4-bot-2 opened 4 months ago
Waiting for the sponsor's input but it can make sense to want the team and the DAO to have an initial allocation
othernet-global (sponsor) confirmed
VestingWallets now start at boostrapBallot.completionTimestamp
Fixed in: https://github.com/othernet-global/salty-io/commit/46d395f791a8e3a5d8753eb3f4918cc0e24b23d0
Following the sponsor's answer, it seems that this was indeed unintended. As a functionality of the protocol isn't working as expected but funds aren't really at risk, I'll validate under Medium severity
Picodes marked the issue as satisfactory
Picodes marked the issue as selected for report
Lines of code
https://github.com/othernet-global/salty-io/blob/main/src/dev/Deployment.sol#L213-L214
Vulnerability details
Impact
The protocol's reputation could be damaged due to distributing more SALT than expected to the DAO and development team. It's difficult to pinpoint the direct loss, but at the very least, users' willingness to become liquidity providers on Salty may be affected due to unfair initial SALT distribution.
Proof of Concept
When Salty exchange is actived,
25M SALT will be transferred to
daoVestingWallet
and 10M SALT will be transferred toteamVestingWallet
by callingInitialDistribution#distributionApproved()
:daoVestingWallet
is responsible for distributing 25M SALT toDAO
linely over 10 yearsteamVestingWallet
is responsible for distributing 10M SALT toteamWallet
linely over 10 years Check the smart contract deployments in Deployment.sol:As we can see, the distribution start time of
daoVestingWallet
andteamVestingWallet
is the deployment time. However the exchange is not active at the moment. If we check line 216 in Deployment.sol, we can see that it will take at least 5 days to active the exchange becauseballotDuration
was initialized to5 days
.From the above we can see,
DAO
andteamWallet
can get 5 days SALT distribution immediately once the exchanged is active.Copy below codes to BootstrapBallot.t.sol and run
COVERAGE="yes" NETWORK="sep" forge test -vv --rpc-url RPC_URL --match-test test_finalizeBallotThenCheckVestingBalance
Tools Used
Manual review
Recommended Mitigation Steps
The vesting start time should not be early than the exchange activation time. It is recommended to deploy
daoVestingWallet
andteamVestingWallet
inInitialDistribution#distributionApproved()
, and useblock.timestamp
as start timestamp.Assessed type
Context