Multicall
Batch transaction with InitCore's multicall.
Multicall is a way to perform multiple interactions with a position (or multiple positions) while bypassing the health checks until the end of the multicall transaction. The function can only call methods in InitCore since the multicall uses delegatecall
to itself.
The function creates a convenient way for users to perform multiple actions on their positions such as collateral or debt swaps, and debt rebalancing in a single transaction. One key use-case of the multicall is "flash borrow". The caller can borrow out the tokens first and eventually put collaterals back at the end of the multicall function.
Multicall also returns a bytes array of results
.
Multicall accepts a list of bytes data as arguments. Each bytes data represents the encoded multicall data to be executed to InitCore.
Last updated