Judging

Silo Finance

Isolated lending markets on Ethereum.

  • Start date24 Mar 2025
  • End date31 Mar 2025
  • Total awards$50,000 in USDC
  • Duration7 days

Silo Finance audit details

  • Total Prize Pool: $50,000 in USDC
    • HM awards: $33,500 in USDC
    • QA awards: $1,400 in USDC
    • Judge awards: $4,000 in USDC
    • Validator awards: $2,600 in USDC
    • Scout awards: $500 in USDC
    • Mitigation Review: $8,000 in USDC
  • Read our guidelines for more details
  • Starts March 24, 2025 20:00 UTC
  • Ends March 31, 2025 20:00 UTC

Note re: risk level upgrades/downgrades

Two important notes about judging phase risk adjustments:

  • High- or Medium-risk submissions downgraded to Low-risk (QA) will be ineligible for awards.
  • Upgrading a Low-risk finding from a QA report to a Medium- or High-risk finding is not supported.

As such, wardens are encouraged to select the appropriate risk level carefully during the submission phase.

Automated Findings / Publicly Known Issues

The 4naly3er report can be found here.

Note for C4 wardens: Anything included in this Automated Findings / Publicly Known Issues section is considered a publicly known issue and is ineligible for awards.

  • Donation/first deposit attack is possible but unprofitable because of decimal offset.
  • Acknowledged issues from previous audits.

Overview

Silo Finance is a non-custodial money protocol that implements permissionless, isolated lending markets, known as silos. Silo Vault serves as the managed liquidity layer, channeling liquidity into Silo’s lending markets (silos) or any 4626 lending vaults.


Scope

See scope.txt

Files in scope

FileLogic ContractsInterfacesnSLOCPurposeLibraries used
/silo-vaults/contracts/IdleVault.sol1****33openzeppelin5/token/ERC20/extensions/ERC4626.sol<br>openzeppelin5/interfaces/IERC4626.sol
/silo-vaults/contracts/IdleVaultsFactory.sol1****22openzeppelin5/proxy/Clones.sol<br>openzeppelin5/interfaces/IERC4626.sol
/silo-vaults/contracts/PublicAllocator.sol1****90openzeppelin5/interfaces/IERC4626.sol<br>morpho-blue/libraries/UtilsLib.sol<br>silo-core/contracts/lib/RevertLib.sol
/silo-vaults/contracts/SiloVault.sol1****554openzeppelin5/utils/math/SafeCast.sol<br>openzeppelin5/token/ERC20/extensions/ERC4626.sol<br>openzeppelin5/interfaces/IERC4626.sol<br>openzeppelin5/access/Ownable2Step.sol<br>openzeppelin5/token/ERC20/extensions/ERC20Permit.sol<br>openzeppelin5/utils/Multicall.sol<br>openzeppelin5/token/ERC20/ERC20.sol<br>openzeppelin5/token/ERC20/utils/SafeERC20.sol<br>morpho-blue/libraries/UtilsLib.sol<br>silo-core/contracts/lib/TokenHelper.sol
/silo-vaults/contracts/SiloVaultsFactory.sol1****37openzeppelin5/proxy/Clones.sol
/silo-vaults/contracts/incentives/VaultIncentivesModule.sol1****106openzeppelin5-upgradeable/access/Ownable2StepUpgradeable.sol<br>openzeppelin5/utils/structs/EnumerableSet.sol<br>openzeppelin5/interfaces/IERC4626.sol<br>silo-vaults/contracts/interfaces/ISiloVault.sol
/silo-vaults/contracts/incentives/claiming-logics/SiloIncentivesControllerCL.sol1****25silo-core/contracts/incentives/interfaces/ISiloIncentivesController.sol
/silo-vaults/contracts/incentives/claiming-logics/SiloIncentivesControllerCLFactory.sol1****11
/silo-vaults/contracts/interfaces/IIncentivesClaimingLogic.sol****15
/silo-vaults/contracts/interfaces/INotificationReceiver.sol****13
/silo-vaults/contracts/interfaces/IPublicAllocator.sol****320openzeppelin5/interfaces/IERC4626.sol
/silo-vaults/contracts/interfaces/ISiloIncentivesControllerCLFactory.sol****15
/silo-vaults/contracts/interfaces/ISiloVault.sol****515openzeppelin5/token/ERC20/extensions/ERC20Permit.sol<br>openzeppelin5/interfaces/IERC4626.sol
/silo-vaults/contracts/interfaces/ISiloVaultsFactory.sol****14
/silo-vaults/contracts/interfaces/IVaultIncentivesModule.sol****123openzeppelin5/interfaces/IERC4626.sol
/silo-vaults/contracts/libraries/ConstantsLib.sol1****7
/silo-vaults/contracts/libraries/ErrorsLib.sol1****52openzeppelin5/interfaces/IERC4626.sol
/silo-vaults/contracts/libraries/EventsLib.sol1****64openzeppelin5/interfaces/IERC4626.sol
/silo-vaults/contracts/libraries/PendingLib.sol1****24
/silo-vaults/contracts/libraries/SiloVaultActionsLib.sol1****43openzeppelin5/interfaces/IERC4626.sol<br>morpho-blue/libraries/UtilsLib.sol<br>openzeppelin5/token/ERC20/utils/SafeERC20.sol
/silo-core/contracts/incentives/SiloIncentivesController.sol1****78openzeppelin5/token/ERC20/utils/SafeERC20.sol<br>openzeppelin5/token/ERC20/IERC20.sol<br>openzeppelin5/utils/structs/EnumerableSet.sol<br>openzeppelin5/utils/Strings.sol
/silo-core/contracts/incentives/SiloIncentivesControllerFactory.sol1****11
/silo-core/contracts/incentives/SiloIncentivesControllerGaugeLike.sol1****44openzeppelin5/token/ERC20/IERC20.sol
/silo-core/contracts/incentives/SiloIncentivesControllerGaugeLikeFactory.sol1****11
/silo-core/contracts/incentives/base/BaseIncentivesController.sol1****159openzeppelin5/token/ERC20/IERC20.sol<br>openzeppelin5/token/ERC20/utils/SafeERC20.sol<br>openzeppelin5/utils/structs/EnumerableSet.sol
/silo-core/contracts/incentives/base/DistributionManager.sol1****162openzeppelin5/token/ERC20/IERC20.sol<br>openzeppelin5/token/ERC20/extensions/IERC20Metadata.sol<br>openzeppelin5/utils/math/Math.sol<br>openzeppelin5/access/Ownable2Step.sol<br>openzeppelin5/utils/structs/EnumerableSet.sol
/silo-core/contracts/incentives/interfaces/IDistributionManager.sol****134
/silo-core/contracts/incentives/interfaces/ISiloIncentivesController.sol****128
/silo-core/contracts/incentives/interfaces/ISiloIncentivesControllerFactory.sol****14
/silo-core/contracts/incentives/interfaces/ISiloIncentivesControllerGaugeLikeFactory.sol****14
/silo-core/contracts/incentives/lib/DistributionTypes.sol1****19
Totals20171697

Files out of scope

See out_of_scope.txt

Scoping Q & A

General questions

QuestionAnswer
ERC20 used by the protocolAny
Test coverage~90% on average (see coverage folder for details)
ERC721 used by the protocolNone
ERC777 used by the protocolNone
ERC1155 used by the protocolNone
Chains the protocol will be deployed onEthereum,Arbitrum,Base,Optimism,Polygon,OtherSonic

ERC20 token behaviors in scope

External integrations (e.g., Uniswap) behavior in scope:

QuestionAnswer
Enabling/disabling fees (e.g. Blur disables/enables fees)Yes
Pausability (e.g. Uniswap pool gets paused)Yes
Upgradeability (e.g. Uniswap gets upgraded)No

EIP compliance checklist

QuestionAnswer
silo-vaults/contracts/SiloVault.solERC4626
silo-vaults/contracts/IdleVault.solERC4626

Additional context

Main invariants

See Certora prover specs files

Attack ideas (where to focus for bugs)

Forked code: SiloVault is a fork of MorphoVault. Original code only supported deploying capital to Morpho protocol while SiloVault was changed to support any ERC4626 vault and highly configurable rewards. Admin role stayed unchanged. New admin function were added to manage rewards setup. It is a good start to make sure that code integrity is kept and no bugs were introduced during forking.

Rewards: SiloVault supports custom rewards distribution. It is important that rewards do not compromise the SiloVault logic in any way and are distributed correctly.

All trusted roles in the protocol

  • Owner
  • Curator
  • Allocator
  • Guardian

Same as MorphoVault with addition to new privileges for owner to manage the rewards. For details, see Morpho docs.
See also more details in the following doc

Describe any novel or unique curve logic or mathematical models implemented in the contracts:

N/A

Running tests

See docs: https://github.com/silo-finance/silo-contracts-v2/blob/develop/MOREDOCS.md

git clone --recurse-submodules https://github.com/code-423n4/2025-03-silo-finance.git cd 2025-03-silo-finance # Create the file ".env" in a root of this folder. ".env.example" is an example. # RPC_MAINNET, RPC_ARBITRUM, RPC_ANVIL, PRIVATE_KEY are required to run the tests. # Build Silo foundry utils to prepare tools for Silo deployment and testing $ cd ./gitmodules/silo-foundry-utils && cargo build --release && cp target/release/silo-foundry-utils ../../silo-foundry-utils && cd - # ensure foundry is set to v0.3.0 foundryup -i 0.3.0 forge -V # Should output `forge 0.3.0 (5a8bd89 2024-12-19T17:17:08.560665000Z)` # Core tests: FOUNDRY_PROFILE=core-test forge test --no-match-test "_skip_" --nmc "SiloIntegrationTest|MaxBorrow|MaxLiquidationTest|MaxLiquidationBadDebt|PreviewTest|PreviewDepositTest|PreviewMintTest" --ffi -vv # Vaults tests: FOUNDRY_PROFILE=vaults-with-tests forge test --no-match-test "_skip_" --no-match-contract "SiloIntegrationTest" --ffi

Miscellaneous

Employees of Silo Finance and employees' family members are ineligible to participate in this audit.

Code4rena's rules cannot be overridden by the contents of this README. In case of doubt, please check with C4 staff.