# Pricing across asynchronous vault steps, and what to re-check when a function is spammed

Mentorship Series #3 · 6 December 2025 · [@0xfirefist](https://x.com/0xFireFist) · Sukukfi · Code4rena

Mentorship Series · [The Contest Academy](https://0xsimao.com/the-contest-academy) · 0xSimao

---

We continued the Sukukfi [contest](https://code4rena.com/audits/2025-11-sukukfi) on Code4rena, and analyzed the ERC7575 vault contract.

**Lesson Summary:**

- If the flows are asynchronous (step-wise), how's the price calculated? In the current scenario, after step 2(fulfilling)'s price calculation, is the price also calculated on claiming? If it's the same, what happens if a slashing occurs between these 2 steps? Will the protocol stay solvent? Play with function inputs, try multiple small deposits, splitting, etc.
- Try spamming functions, see if variables are updated correctly every time.
- Check the initializing function: are all the inherited contracts that need initializing actually initialized?
- `decimals()` is not part of EIP-20, so it is not mandatory.
- A try/catch can revert without the catch branch being taken.
- Let's say you pick a flow/step, try to remember what variables are being updated there and use this knowledge when approaching other steps/flows.

https://youtu.be/Nfi1A1ARjBQ

Session video: https://youtu.be/Nfi1A1ARjBQ

---

Newer: [Sponsor answers on the three-step vault: who eats a share price move, and why the delay exists](https://0xsimao.com/the-contest-academy/mentorship-series-4) · Older: [Approaching a fresh codebase: base contracts first, then imports, inheritance and state](https://0xsimao.com/the-contest-academy/mentorship-series-2)
