diff --git a/programs/mango-v4/src/instructions/register_token.rs b/programs/mango-v4/src/instructions/register_token.rs index ef03347c5..395537ecc 100644 --- a/programs/mango-v4/src/instructions/register_token.rs +++ b/programs/mango-v4/src/instructions/register_token.rs @@ -40,6 +40,8 @@ pub struct RegisterToken<'info> { )] pub vault: Account<'info, TokenAccount>, + pub oracle: UncheckedAccount<'info>, + #[account(mut)] pub payer: Signer<'info>, @@ -81,6 +83,7 @@ pub fn register_token( group: ctx.accounts.group.key(), mint: ctx.accounts.mint.key(), vault: ctx.accounts.vault.key(), + oracle: ctx.accounts.oracle.key(), deposit_index: INDEX_START, borrow_index: INDEX_START, indexed_total_deposits: I80F48::ZERO, diff --git a/programs/mango-v4/src/state/token_bank.rs b/programs/mango-v4/src/state/token_bank.rs index a90267d89..a871cb623 100644 --- a/programs/mango-v4/src/state/token_bank.rs +++ b/programs/mango-v4/src/state/token_bank.rs @@ -8,6 +8,7 @@ pub struct TokenBank { pub group: Pubkey, pub mint: Pubkey, pub vault: Pubkey, + pub oracle: Pubkey, /// the index used to scale the value of an IndexedPosition /// TODO: should always be >= 0, add checks?