Guardian's review of USD0 Updates for Abracadabra Money, published December 2024. The report records 4 findings, including 1 high and 1 medium.
- Published
- Review window
- December 22 to 28, 2024
- Language
- Solidity
- Chains
- Ethereum
- Sector
- Lending, Stablecoins
- 0 Critical
- 1 High
- 1 Medium
- 2 Low
- 0 Informational
Findings 4
-
H-01 High Swapped Funds Are Trapped In The Router Resolved
Description
In the run function the reward tokens are transferred to the router address instead of approving the router address and allowing the router to transferFrom the harvester contract. The Odos router is planned to be used, based upon deploy scripts, and attempts to transferFrom the caller instead of relying on the router contract balance, thus any funds sent to the Odos router would be trapped. As long as a nonzero amountOut is specified and the asset balance of the harvester is zero then this swap will simply fail rendering the harvester incapable of performing harvest actions.
Recommendation
Include optionality for whether to transfer funds to the router address or to approve the router address in the run function.
-
M-01 Medium Harvest Extractable Value Sandwhich Attack Acknowledged
Description
The Harvester
runfunction calls distribute rewards on theMagicUSD0ppvault which immediately increases the value of the MagicUsd0++ shares. Given the vault exists on ethereum mainnet this value increase may be arbitraged by an actor observing the mempool for a large harvest. The attacker may deposit directly before and withdraw directly after the share value increase for risk free gain.Recommendation
Consider introducing a deposit/withdrawal fee to ensure that a reasonable sized harvest cannot be profitably arbitraged. Otherwise consider adding logic such that the harvested rewards are distributed to the vault over time to avoid stepwise jumps in share value.
-
L-01 Low Events Emitted On No Update Events Resolved
Description
In the
setAllowedRouterandsetFeeParametersfunctions events are emitted indicating that a configuration change has taken place even when the configurations have not changed.Recommendation
Be aware of this behavior and consider reverting/not emitting these events when the new configurations are the same as the existing configurations.
-
L-02 Low Ownership Not Transferred In Deploy Script Warning Resolved
Description
In
MagicUsd0pp.s.solscript the ownership of the vault is transferred to thesafe.opstoolkit address, however the ownership for the harvester contract is left with the EOA executing the script.Recommendation
Consider transferring the harvester ownership to the
safe.opsaddress in the toolkit at the end of the deploy script.
No findings match.
More from Abracadabra Money
All 19 reports-
MagicGLP Upgrade
11 findings1 high 11 findings: 1 high, 10 low -
PurrSwap Aerodrome
105 findings9 high 105 findings: 9 high, 23 medium, 45 low, 28 informational -
PurrSwap ve33
74 findings5 critical · 10 high 74 findings: 5 critical, 10 high, 20 medium, 39 low -
Hyperliquid OFT Deployment
3 findings 3 findings: 1 low, 2 informational
Put your code through the same review.
This review started with a conversation about scope. Tell us what you are building and we will plan yours with you.
