astraly-labs / astraly-contracts

Astraly Cairo Contracts
https://testnet.astraly.xyz
Creative Commons Zero v1.0 Universal
39 stars 12 forks source link

Create & Design Investment Strategies #24

Closed EvolveArt closed 2 years ago

EvolveArt commented 2 years ago

Description

Design new investment strategies that could be used by the ZkPadStaking vault. Investment strategies are simply smart contracts that use part of the vault holding which is composed of ZKP and ZKP-LP tokens to generate yield throughout other DeFi protocols. Strategies can get as technical and complex as possible, although it's best to focus on battle-tested protocols.

Acceptance Criteria

A strategy should at least include the following functions :

@view
func underlying{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}() -> (
    address : felt
):
end

@external
func mint{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}(amount : Uint256) -> (
    res : Uint256
):
end

@external
func redeemUnderlying{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}(
    amount : Uint256
) -> (res : Uint256):
end

@external
func balanceOfUnderlying{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}(user : felt) -> (
    res : Uint256
):
end