Solidity Challenge - AMM DEX With No Storage

Subscribers:
1,210
Published on ● Video Link: https://www.youtube.com/watch?v=TzZHkH8EuOs



Duration: 0:19
79 views
0


Constant product automated market maker smart contract using only the stack and memory. Immutable storage does not actually use dynamic storage slots since it never changes. Swaps between Matic (Polygon msg.value) and Chainlink (ERC20 token interface).

Solidity Contract:
https://github.com/MarcusWentz/DEX_AMM_AND_ORACLE/blob/main/Contracts/AMM_DEX_NO_STORAGE.sol

Hardhat test:
https://github.com/MarcusWentz/DEX_AMM_AND_ORACLE/blob/main/test/AMM_DEX_NO_SLOTS.js