Hey, some implementation details from the Lido on Polkadot and Kusama team:
- There are certain use cases of nesting calls we have for liquid staking at Lido on Polkadot and Kusama. For staking via XCM we use three nested calls (RuntimeCall::utility + RuntimeCall::utility + RuntimeCall::Staking or RuntimeCall::xcmPallet).
Here is the full list of calls used:
- nominate()
- bond()
- bondExtra()
- unbond()
- withdrawUnbonded()
- rebond()
- chill()
- limitedReserveTransferAssets()
-
Abusive nesting usage may be addressed either by whitelisting those calls that are confirmed to be in use by different teams/products or by restricting nesting levels at a certain constant, also confirmed by exact use cases, e.g. five.
-
Whitelisting
as_derivativealso helps: Introduce whitelist for Transact and limit UMP processing to 10 messages per block by KiChjang · Pull Request #6280 · paritytech/polkadot · GitHub