RUVIDEO
Поделитесь видео 🙏

Curve Vyper Tutorial Lesson 12 - DynArray

? Curve Vyper Tutorial Video 12: Dynamic Arrays ?

## TUTORIAL RESOURCES
* [Github] (https://github.com/curvefi/vyper-tutorial)
* [YouTube] (https://www.youtube.com/playlist?list=PLVOHzVzbg7bFnLnl3t5egG5oWpOhfdD1D)

With our stablecoin at feature parity, this lesson covers more advanced concepts.

Specifically, we focus on upgrading our stablecoin to utilize the concept of liquidity bands from the actual $crvUSD. Instead of adding liquidity at a specific liquidation price, the real $crvUSD adds liquidity at a range of liquidity prices, and smoothly liquidates and de-liquidates as the price sweeps throughout this range.

To accomplish this, we introduce two new concepts in this video. We store the concept of liquidity bands as a Vyper `dynamic array`, and store the maximum number of possible bands as a `constant`.

Due to the complexity of the solution, we do not walk through the entire upgrade in the video. Our solution is stored in the `solved/` directory and may be different from your solution. We encourage you to share your solution with us for feedback.


## VYPER DYNAMIC ARRAY
A variable type that functions similar to a Python array, up to a maximum length.
The EVM can't process uncapped arrays, so forcing a ceiling allows for compiler optimizations.

my_array: DynArray[type, max_length]


## VYPER CONSTANT
A constant can be used whenever Vyper requires a fixed number, like in loops.
Constants are the only state variable type defined directly on instantiation.

MY_CONSTANT: constant(uint256) = 10000


## FURTHER READING

* https://github.com/curvefi/curve-stablecoin
* https://github.com/curvefi/curve-stablecoin-js

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Curve Vyper Tutorial Lesson 12 - DynArray», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.