Sensei strategies
Our sensei strategies are based on NFT holdings. Each user can only get one NFT and it is used to describe their position. The NFT ID of a user is simply their address in felt/number format.
starknetjs.num.getDecimalString(hexAddress)Functions
Deposit:
deposit(amount: u256, receiver: ContractAddress);Withdraw:
withdraw(amount: u256, receiver: ContractAddress, max_slippage_bps: u32);Get stratregy config
config() -> StrategyConfig
interface StrategyConfig {
// this is the token used by user to make the deposit (e.g. ETH)
main_token: ContractAddress,
main_offset: u128, // decimal offset used to handle shares
// internal token used by strategy to do looping (e.g. USDC)
secondary_token: ContractAddress,
secondary_offset: u128
}Get holdings by user address:
Last updated