Encode-Solidity-Bootcamp-Team-9 / final-project

Final bootcamp project
0 stars 0 forks source link

What we need to define if there is an arbitrage opportunity #13

Open raouf2ouf opened 1 year ago

raouf2ouf commented 1 year ago

1- gasCost: maybe through simulation. solution => put a hard ceiling on gas cost (0.1?) 2- fees: Sushiswap has a fixed fee 0.3%. Uniswap (self defined) 0.3% 3- slippage: TODO

4- After that we need to define an algorith to get the amount of token to buy / sell

=========================================== We use an inital budget

raouf2ouf commented 1 year ago

We have 3 main ways of doing this: 1- Via a budget (easy not sexy enough) 2- Via flashloans (difficult + too much gas cost) 3- Via using staked STBL (easy???): so staking would give the smartcontract the "right" to spend it. The percentage of your stake at the moment of the transaction.

After every arbitrage transaction we need to calculate the profit for each user!!!!! Using a struct!

So every arbitrage would add more staking to the user?

Can the smartcontract "reuse" the profits?

Conclusion: keep them separate at first for now

Make the smartcontract upgradable?