[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/biz/ - Business & Finance


View post   

File: 558 KB, 699x518, 1531369426381.png [View same] [iqdb] [saucenao] [google]
10248634 No.10248634 [Reply] [Original]

Could I write a smart contract that would trigger payment to someone (or to me) upon btc reaching a certain price?

>> No.10248650
File: 537 KB, 1335x600, chainlink.png [View same] [iqdb] [saucenao] [google]
10248650

you would need to use a certain something to obtain the price of BTC

but yes

>> No.10248662

>>10248634
Don't forget about oracles, bro.

>> No.10248676

Do you need a smart contract for that or just API access to an exchange?

>> No.10248701

Yes, but you need a decentralized oracle. I would reccomend Mobious, the leaders in the industry.

>> No.10248729

>>10248676
just an API to exchange, that's what BITMEX does (ties the price of BTC to binance, coinbase and gemini i think). Anyone who is saying you would need an oracle for this is a retard. it's not real world information it already exists digitally ya dumb fucks

>> No.10248749

You can write an escrow contract that holds the funds until certain conditions are met, wether it be time or price level. For example if you bet someone 1 btc the price would be 100k by 2020, you both submit 1 btc to the contract and it would send the funds to the winner. Not really practical because who would want to lock up money for so long but idk how else you could do it and make sure the contract is enforced

>> No.10248750

>>10248729
They are trying to find a use case for their delusions

>> No.10248754

>>10248634
you don't need oracles for this you apes

https://www.coindesk.com/api/

use solidity to code it with the coindesk API. fucking chainlink apes don't even know

>> No.10248758

You can already do this without a smart contract. Your one investment in life is a meme

>> No.10248762

>>10248634
Check out Augur

>> No.10248771

>>10248729
If you want to interface with a blockchain pulling API data from an exchange = software oracle.
What I was asking is if you even really need a smart contract to do this if you want to buy/withdraw payments from somewhere upon reaching a certain price. Using an exchange here would give you the benefit of being able to buy it at market prices/fixed prices if you have FIAT (equivalents) on the exchange while you could just write a bot that has access to a wallet checking price information and triggering payments on it's own.
I'm struggling to see why you would want to write a smart contract for this over a simple bot, especially if it's just you using it.

>> No.10248789

>>10248729
>>10248750
>>10248754

Remember this?

https://www.cnbc.com/2017/06/22/ethereum-price-crash-10-cents-gdax-exchange-after-multimillion-dollar-trade.html

This is why you get oracles bro, because your smart contract would have triggered based on gdax's price even though it was wrong.

>> No.10248794

>>10248634
no because you're an idiot

>> No.10248796
File: 21 KB, 362x362, 1514581799000.jpg [View same] [iqdb] [saucenao] [google]
10248796

>>10248750
>uses the word delusion
>fancies himself smart
>likely says *clearly* a lot in conversation
>has no friends
>never invited to party
>single mom doesn't love him
>no linker
>year 2020
>Anon becomes an hero
You were an hero to all, Mitch.

>> No.10249090

>>10248789
there's something called the "mark" price which lags behind the real time trading price and it's to prevent that exact problem.