To allow a user to invest in a protocol, you must create a deposit operation using the endpoint specified below and following the required parameters. It is mandatory to use our broadcast method to execute the operation. Do not send transactions directly through the blockchain using other methods, as this may break the flow. Always use the platform’s broadcast method to ensure proper execution.
The response returned in each operation corresponds to the result of an unsigned transaction generated by our system, along with a position_id.It is recommended to store the position_id in your database (storage) and associate it with the user. Note that each position_id is unique per provider/protocol where the user invests.This identifier is primarily used for position rebalancing across protocols.
4
Signing a operation transaction
When performing an operation, it is essential to never send it directly using sendTransaction or any external broadcast method.For the operation to succeed, it must only be signed and submitted through StarkFi’s internal broadcast system via our HTTP API.