CIP No. | Title | Author | Status | Type | Created |
---|---|---|---|---|---|
71 |
Disable Anti-Reentrancy |
Chenxing Li <chenxing@confluxnetwork.org> |
Final |
Spec Breaking |
2021-05-18 |
Disable the anti-reentrancy for all the contracts.
Currently, Conflux VM has an anti-reentrancy mechanism. When a contract appears twice in the call stack, Conflux will forbid all the subsequent write operations such as SSTORE
, LOG0
to LOG4
and CALL
with a non-zero balance. This CIP aims to disable this feature.
Conflux introduces an anti-reentrancy mechanism to avoid some attacks for Defi applications. However, this will also forbid some valid operations. For example, if a borrower contract calls a flash loan contract and the flash loan contract calls the "callback" function of the borrower contract. Then the borrower contract will appear twice in the call stack and all the subsequent write operations will be forbidden. Although the developers can avoid this issue by changing the interaction logic among contracts, this introduces additional tasks for contract migration.
Parameters: BLOCK_NUMBER_CIP71
.
Disable the anti-reentrancy for all the transactions when block_number >= BLOCK_NUMBER_CIP71
.
This CIP is spec-breaking because it changes the execution process of some transactions.
TBA.
TBA.
Copyright and related rights waived via CC0.