What this does
This plug converts a dollar amount into a token amount using the price an Aave market will enforce, not a quote from anywhere else. It takes three inputs: the token to price, the Aave market to read against, and the dollar value to convert. The oracle read and the division happen in the same transaction, so the amount a later step supplies or repays is sized on the number the market is using at that moment. Sizing against a stale quote instead is what leaves a position short.
Actions · 4




Related plugs · 8