Giter Site home page Giter Site logo

DCA Order and Execution about astroport-dca HOT 8 OPEN

kailust avatar kailust commented on September 8, 2024
DCA Order and Execution

from astroport-dca.

Comments (8)

kaimen-sano avatar kaimen-sano commented on September 8, 2024

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.

from astroport-dca.

kailust avatar kailust commented on September 8, 2024

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?

from astroport-dca.

kaimen-sano avatar kaimen-sano commented on September 8, 2024

It does not. An external user has to call ExecuteMsg::PerformDcaPurchase in order to invoke purchases.

from astroport-dca.

kailust avatar kailust commented on September 8, 2024

ok thats what I thought, so a bot needs to run, and check for example every hour and check each users configurations with

QueryMsg::UserDcaOrders

then if the users orders are valid based on time and balance, then it needs to execute

ExecuteMsg::PerformDcaPurchase

Is this correct?

from astroport-dca.

kaimen-sano avatar kaimen-sano commented on September 8, 2024

Yep!

from astroport-dca.

kailust avatar kailust commented on September 8, 2024

Also can you update the
https://github.com/kaimen-sano/astroport-dca/tree/master/contracts/dca#create_dca_order
to use Luna and another cw20 token because UST is not on Terra 2.0

Thanks

from astroport-dca.

kaimen-sano avatar kaimen-sano commented on September 8, 2024

The underlying process is still the same, so there is no need to update it

from astroport-dca.

kailust avatar kailust commented on September 8, 2024

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

from astroport-dca.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.