-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DCA Order and Execution #1
Comments
cosmwasm implementation allows contracts to access some verified data produced at call-time. For more information, please see here. In most cosmos-based chains (such as Terra), this is produced by the median block time of the validator set. |
I understand the contracts can access verified data produced at call-time.. my question is how does the smart contract automatically perform "call-time" itself without a third party or someone else running a command. Smart contracts are not self running, so does this contract need an outside cron job or bot to send messages to the smart contract for example every minute or every hour and retieve verfied data from such as block height and time, and compare it to user dca order configuration, then run execution. Or does this contract have the ability to self run and do call-time verifications itself? |
It does not. An external user has to call |
ok thats what I thought, so a bot needs to run, and check for example every hour and check each users configurations with
then if the users orders are valid based on time and balance, then it needs to execute
Is this correct? |
Yep! |
Also can you update the Thanks |
The underlying process is still the same, so there is no need to update it |
https://github.com/kaimen-sano/astroport-dca/tree/master/contracts/dca#instantiatemsg "contract_ddr should be "contract_addr" also it missing "whitelisted_fee_assets" attributes |
If you create a DCA order
https://github.com/kaimen-sano/astroport-dca/tree/master/contracts/dca#create_dca_order
for example
"Example: Purchase 5 UST worth of Luna each day, with 15 UST."
How does the contract check the time and execute the order automatically? Don't we need an outside message sent via bot to the smart contract to "check and execute" for example check if its time to to run the DCA function
https://github.com/kaimen-sano/astroport-dca/tree/master/contracts/dca#perform_dca_purchase
The text was updated successfully, but these errors were encountered: