Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJepsen committed Feb 22, 2024
1 parent 968c942 commit b80f2de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use std::{pin::Pin, sync::Arc};

use arbiter_bindings::bindings::arbiter_token::ArbiterToken;
use bindings::portfolio_tracker::PortfolioTracker;
use clients::protocol::{G3mF64, PoolInitParamsF64, ProtocolClient};
use ethers::{abi::Event, types::U256, utils::parse_ether};
use futures::stream::Stream;

use self::position::Position;

use super::{agent::*, *};
use crate::agents::base::token_admin::TokenAdmin;

Expand All @@ -20,6 +20,7 @@ pub struct G3mLiquidityProvider {
initial_x_amount: f64,
initial_price: f64,
initial_wx: f64,
pub liquidity_tracker: PortfolioTracker<ArbiterMiddleware>,
}

#[async_trait::async_trait]
Expand Down Expand Up @@ -108,12 +109,10 @@ impl<Event> Position<Event> for G3mLiquidityProvider {

fn stream_value(&self, event: Event) -> f64 {
// what chain data do we need to get the value of the position?
// does it actually make sense for E to be events
// does it actually make sense for E to be events
// Change to the right event type
todo!()
}


}

#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
Expand Down
2 changes: 1 addition & 1 deletion crates/dfmm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ pub mod agents;
pub mod configuration;
pub mod engine;
pub mod portfolio;
pub mod position;
pub mod rmm;
pub mod scenarios;
pub mod settings;
pub mod position;

use std::{any::Any, path::Path};

Expand Down
4 changes: 1 addition & 3 deletions crates/dfmm/src/position.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use futures::stream::Stream;



pub trait Position<E> {
type EventStream: Stream<Item = E>;
fn stream_value(&self, event: E) -> f64;
}
}

0 comments on commit b80f2de

Please sign in to comment.