Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOR: Confirm ERC4626/Buffers use correct rate #1266

Open
johngrantuk opened this issue Dec 11, 2024 · 0 comments
Open

SOR: Confirm ERC4626/Buffers use correct rate #1266

johngrantuk opened this issue Dec 11, 2024 · 0 comments

Comments

@johngrantuk
Copy link
Member

Previous assumption was that token price rate could be used as rate for buffer wrap/unwrap but this isn't always the case.
Instead we should use the wrap/unwrap rate from the ERC4626 instead using convertToAssets.

image

See Gnosis pool as an example:
Rate provider, 0x30eacec6bd250589043de026e45dc9a158c65a1f, uses a multiplicative rate to capture all yield.
{
"id": "0x272d6be442e30d7c87390edeb9b96f1e84cecd8d",
"type": "WEIGHTED",
"poolTokens": [
{
"isErc4626": true,
"address": "0x773cda0cade2a3d86e6d4e30699d40bb95174ff2",
"symbol": "waGnowstETH",
"priceRateProvider": "0x30eacec6bd250589043de026e45dc9a158c65a1f",
"underlyingToken": {
"symbol": "wstETH",
"isErc4626": false,
"address": "0x6c76971f98945ae98dd7d4dfca8711ebea946ea6"
}
},
{
"isErc4626": true,
"address": "0x7c16f0185a26db0ae7a9377f23bc18ea7ce5d644",
"symbol": "waGnoGNO",
"priceRateProvider": "0xbbb4966335677ea24f7b86dc19a423412390e1fb",
"underlyingToken": {
"symbol": "GNO",
"isErc4626": false,
"address": "0x9c58bacc331c9aa871afd802db6379a98e80cedb"
}
}
]
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant