sherlock-audit / 2023-06-tokemak

0 stars 1 forks source link

Tokemak contest details

Q&A

Q: On what chains are the smart contracts going to be deployed?

Mainnet


Q: Which ERC20 tokens do you expect will interact with the smart contracts?

Liquid Staking Tokens

Curve Pools

Balancer Pools

Maverick Pools

Note: for LP positions that are staked at Convex/Aura there is an associated Convex/Aura ERC20 token that wraps the Curve LP token and is staked. If Tokemak stakes at Convex/Aura, we do not directly hold the ERC20, but rather wrap and stake in a single function.


Q: Which ERC721 tokens do you expect will interact with the smart contracts?

None


Q: Which ERC777 tokens do you expect will interact with the smart contracts?

None


Q: Are there any FEE-ON-TRANSFER tokens interacting with the smart contracts?

None


Q: Are there any REBASING tokens interacting with the smart contracts?

Yes, stETH (Lido Staked Ether)


Q: Are the admins of the protocols your contracts integrate with (if any) TRUSTED or RESTRICTED?

RESTRICTED


Q: Is the admin/owner of the protocol/contracts TRUSTED or RESTRICTED?

TRUSTED


Q: Are there any additional protocol roles? If yes, please explain in detail:

Yes, Tokemak V2 has a central access controller with specified roles. The roles are listed here: https://github.com/sherlock-audit/2023-06-tokemak/blob/83fb3c668c2f6caeb5d3e421cf9ad4a41e0a1c98/v2-core-audit-2023-07-14/src/libs/Roles.sol


Q: Is the code/contract expected to comply with any EIPs? Are there specific assumptions around adhering to those EIPs that Watsons should be aware of?

src/vault/LMPVault.sol should be 4626 compatible


Q: Please list any known issues/acceptable risks that should not result in a valid finding.

Q: Please provide links to previous audits (if any).

NA


Q: Are there any off-chain mechanisms or off-chain procedures for the protocol (keeper bots, input validation expectations, etc)?

Yes, there are several off-chain mechanisms

  1. LMPVault
    1. updateDebtReporting - initiated externally, but unprivileged operation
    2. rebalance/flashRebalance - initiated externally and is restricted to an allow list, but LMPStrategy’s fully validate the proposed actions.
  2. Stats - all stats contracts must have snapshots initiated by a keeper network at on-chain enforced intervals. With the exception of IncentivePricingStats these can be done in an unprivileged manner. IncentivePricingStats requires that snapshots are taken at randomized intervals, so is done by a privileged operator. More details can be found in Stats High Level Docs and Calculator Docs.
  3. src/beacon/FrxBeaconChainBacking - Will be written to by a protected off-chain component
  4. src/liquidation/LiquidationRow - claimVaultRewards() and liquidateVaultsForTokens() will be initiated by protected off-chain components.

Q: In case of external protocol integrations, are the risks of external contracts pausing or executing an emergency withdrawal acceptable? If not, Watsons will submit issues related to these situations that can harm your protocol's functionality.

Pausing or emergency withdrawals are not acceptable for Tokemak.


Q: Do you expect to use any of the following tokens with non-standard behaviour with the smart contracts?

Upgradeable: stETH (wstETH by proxy) and cbETH


Q: Add links to relevant protocol resources

README’s in the repo should provide further context.


Audit scope

v2-core-audit-2023-07-14 @ 62445b8ee3365611534c96aef189642b721693bf