MENU

Bring the elevator up to the top!

0
448
0

Contract Interface specifies the WHAT but not the HOW.

Interfaces allow different contract classes to talk to each other.
Think of interfaces as an ABI (or API) declaration that forces contracts to all communicate in the same language/data structure.
But interfaces do not prescribe the logic inside the functions, leaving the developer to implement his own business layer.

Interfaces do not guarantee contract security. Remember that just because another contract uses the same interface, doesn’t mean it will behave as intended!

Be careful when inheriting contracts that extend from interfaces. Each layer of abstraction introduces security issues through information obscurity. This makes each generation of the contract less and less secure than the previous.

I made a game that shows security risks through interface.
In the game, seemly the elevator won’t let you reach the top of your building.
But if you understand the interface as described above, you can bring the elevator up to the top.

“Too much! Just show me the code?”

https://github.com/maAPPsDEV/elevator-attack

Sorry, the comment form is closed at this time.