The Argent wallet uses own token price oracle serving over 380 ERC20 tokens to provide the daily limit logic in the smart contract wallet. (See more on what the daily limit is here

Currently only 17 of those tokens are available via the Chainlink price feeds. Here, we've integrated those as preferred source for price data for the Argent wallet, aiming to gradually source all token prices from Chainlink, should they become available in future.

How I built it

Imported AggregatorV3Interface.sol into Argent's own Token price oracle and updated its getTokenPrice function to prioritise price data from Chainlink if available, and fallback to its own records otherwise.

Challenges I ran into

None really although the nesting of price feed aggregators which call into each other was a touch tedious to work through. Maybe this was necessary due to the contracts upgrade model so understandable.

Accomplishments that I'm proud of

Making the Argent wallet more decentralised. In the long term also saving gas on running own Argent oracle.

What I learned

How easy it is to integrate with the price feeds.

What's next for Integration with Argent wallet

Submit the PR to the Argent repo and get it into one of the next releases of the app.

Built With

Share this project: