Sample implementation of OpenZeppelin ERC4626 contract in Stylus using Rust which aims to enable heavy AI/ML computation for DeFi projects that want to enrich their smart vaults with machine learning capabilites that are historically performed offchain.
It provides a library with augmented ML capabilites thanks to the rustlearn crate, a machine learning package for Rust as seen in the rebalance function.
Smart Vault deployment address: https://stylus-testnet-explorer.arbitrum.io/address/0x6982aA8dB18E7153c614765dA4A581135e9Bf4a8
Insert your private key in an .env file using
cargo stylus check
cargo stylus deploy --private-key-path=./.env
You can interact with the smart contract on Arbitrum Stylus Testnet.
cd hardhat
yarn install
yarn hardhat run scripts/initialize.js