DeFi Basket
Search…
Architecture
A high-level overview of DeFi Basket architecture
DeFiBasket inherits from the ERC721 contract. Each NFT minted by DeFi Basket deploys a Wallet contract that is associated to this NFT and the owner of the NFT (i.e. the caller of the createPortfolio).
Only the NFT owner can use his Wallet contract to deposit or withdraw MATIC and ERC20-compliant tokens by using the DeFi Basket contract functions depositPortfolio, editPortfolio and withdrawPortfolio.
The communication between the Wallet and other DeFi protocols is made through the Bridge contracts: the function useBridges of each Wallet contract execute batched delegate calls to Bridge functions, allowing great extensibility and composability with multiple protocols.
DeFi Basket architecture
The DeFi Basket protocol acts as a gatekeeper to only allow Portfolio NFT owners to interact with their respective Wallet contracts.
Last modified 2mo ago
Copy link